From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8598 invoked by alias); 16 Jan 2012 15:03:43 -0000 Received: (qmail 8585 invoked by uid 22791); 16 Jan 2012 15:03:41 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 15:03:25 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id q0GF3GWl065012 ; Mon, 16 Jan 2012 16:03:16 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [130.79.204.13]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id q0GF3FLX013974 ; Mon, 16 Jan 2012 16:03:15 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id q0GF3Ex3032556 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Mon, 16 Jan 2012 16:03:14 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Cc: "'Eli Zaretskii'" , , "'Tom Tromey'" Subject: Possible fix for mingw32 directory relocation problems Date: Mon, 16 Jan 2012 15:17:00 -0000 Message-ID: <000001ccd45f$f8fe2a90$eafa7fb0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00544.txt.bz2 After some debugging, we finally managed to find out that mingw32 specific directory relocations are related to msys -> mingw32 argument conversions. http://sourceware.org/ml/gdb-patches/2012-01/msg00537.html This is explained in: http://www.mingw.org/wiki/Posix_path_conversion This page also allows to understand why using mingw32 style paths for prefix at configure level works and avoid the troubles encountered. This conversion concerns defines passed by command line arguments to gcc, which are specific to main.o compilation, as found in gdb/Makefile.in 1520- 1521:# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. 1522-main.o: $(srcdir)/main.c 1523: $(COMPILE) $(TARGET_SYSTEM_ROOT_DEFINE) -DBINDIR=\"$(bindir)\" $(srcdir)/main.c 1524- $(POSTCOMPILE) 1525- But this leads to a conversion: -DBINDIR="/usr/local/bin\" gets transformed into '-D' 'BINDIR="E:/msys/mingw32/msys/1.0/local/bin"' While other pates used in relocate_gdb_directory calls are macros defined inside gdb/config.h config.h:#define DEBUGDIR "/usr/local/lib/debug" config.h:#define GDB_DATADIR "/usr/local/share/gdb" config.h:#define JIT_READER_DIR "/usr/local/lib/gdb" Those are of course not affected by msys command-line argument conversion. The first question is: Why do we need to pass BINDIR (and TARGET_SYSTEM_ROOT_DEFINE) at the command line instead of inside config.h as for other directories? If the answer to the first question is "we don't", then I need help about how to convert those Makefile.in variables into new entries of generated config.h file. I don't have enough knowledge about autoconf scripts to handle this... An extra bonus of this change would be that it would render the special rule for main.o compilation unnecessary. Comments most welcome and help needed... Pierre Muller GDB pascal language maintainer