From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23521 invoked by alias); 15 Jan 2012 22:03:53 -0000 Received: (qmail 23510 invoked by uid 22791); 15 Jan 2012 22:03:51 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_CX,TW_DC,TW_JL X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Jan 2012 22:03:37 +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 q0FM3AiP041001 ; Sun, 15 Jan 2012 23:03:10 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms6.u-strasbg.fr [130.79.204.15]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id q0FM3A0H054984 ; Sun, 15 Jan 2012 23:03:10 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id q0FM37Ub065869 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Sun, 15 Jan 2012 23:03:08 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: , , , References: <83hb03e9sx.fsf@gnu.org> <838vlfe0k9.fsf@gnu.org> <4F0CD948.8080909@gmail.com> <4F0E266C.8080208@gmail.com> <20120112064721.GN31383@adacore.com> <20120112115355.GO31383@adacore.com> <838vlclv4r.fsf@gnu.org> <4F103C20.8070204@gmail.com> <83ipkfk3hg.fsf@gnu.org> <4F117B33.8080906@gmail.com> <834nvyjsqj.fsf@gnu.org> <000001ccd30c$5ce854e0$16b8fea0$%muller@ics-cnrs.unistra.fr> <83sjjhips3.fsf@gnu.org> <000301ccd3a7$3db8c460$b92a4d20$%muller@ics-cnrs.unistra.fr> <83obu4iynl.fsf@gnu.org> In-Reply-To: <83obu4iynl.fsf@gnu.org> Subject: RE: Building GDB 7.3.92 with MinGW Date: Mon, 16 Jan 2012 03:08:00 -0000 Message-ID: <001501ccd3d1$787c0100$69740300$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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/msg00538.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: dimanche 15 janvier 2012 19:55 > =C0=A0: Pierre Muller > Cc=A0: asmwarrior@gmail.com; brobecker@adacore.com; dje@google.com; gdb- > patches@sourceware.org > Objet=A0: Re: Building GDB 7.3.92 with MinGW >=20 > > From: "Pierre Muller" > > Cc: , , , > > > > Date: Sun, 15 Jan 2012 18:00:51 +0100 > > > > I also wrongly supposed that configure prefix or related entries should > > be msys pathes. >=20 > If the configury supports d:/foo/bar file names (and most modern > versions of Autoconf and libtool do), then using MSYS /d/foo/bar style > of file names is not necessary. Only of d:/foo fails, you should fall > back on the MSYS style. In fact, I think I have now finally found where the problem starts if you do not specify any --prefix to configure: --prefix has a default /usr/local value, this sets prefix inside gdb/Makefile and three directories inside config.h $ grep 'DIR "' *.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" But what about BINDIR which is used for reloacate_gdb_directory.. This one is not inside config.h : $ grep -n -C 3 BINDIR * Makefile-1520-# Some files need explicit build rules (due to -Werror problems) or due Makefile-1521-# to sub-directory fun 'n' games. Makefile-1522- Makefile:1523:# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. Makefile-1524-main.o: $(srcdir)/main.c Makefile:1525: $(COMPILE) $(TARGET_SYSTEM_ROOT_DEFINE) -DBINDIR=3D\"$(bindir)\" $(srcdir)/main.c Makefile-1526- $(POSTCOMPILE) Makefile-1527- =20 OK, but defining a macro inside config.h or on command line should=20 not make any difference, no? The following will prove otherwise! For testing purpose, I tried to recompile main.o adding --verbose option to compiler $ make main.o CFLAGS=3D"-g -O0 --save-temps --verbose" make[1]: Entering directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb' make[2]: Entering directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb/gn ulib' make all-recursive make[3]: Entering directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb/gn ulib' make[4]: Entering directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb/gn ulib' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb/gnu lib' make[3]: Leaving directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb/gnu lib' make[2]: Leaving directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb/gnu lib' make[1]: Leaving directory `/usr/local/src/gdbcvs/mingw32-puresrc-python/gdb' gcc -g -O0 --save-temps --verbose -I. -I../../puresrc/gdb -I../../puresrc/gdb/ common -I../../puresrc/gdb/config -DLOCALEDIR=3D"\"/usr/local/share/locale\= "" -DHA VE_CONFIG_H -I../../puresrc/gdb/../include/opcode -I../../puresrc/gdb/../opcodes /.. -I../../puresrc/gdb/../readline/.. -I../bfd -I../../puresrc/gdb/../bfd -I../ ../puresrc/gdb/../include -I../libdecnumber -I../../puresrc/gdb/../libdecnumber -I../../puresrc/gdb/gnulib -Ignulib -Ic:/Python27/include -Ic:/Python27/incl ude -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno -pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char -subscripts -Wno-format -Werror -c -o main.o -MT main.o -MMD -MP -MF .deps/main. Tpo -DTARGET_SYSTEM_ROOT=3D\"\" -DTARGET_SYSTEM_ROOT_RELOCATABLE=3D0 -DBINDIR=3D\"/usr /local/bin\" ../../puresrc/gdb/main.c Using built-in specs. COLLECT_GCC=3DE:\msys\mingw32\bin\gcc.exe COLLECT_LTO_WRAPPER=3De:/msys/mingw32/bin/../libexec/gcc/mingw32/4.6.1/lto-= wra pper .exe Target: mingw32 Configured with: ../gcc-4.6.1/configure --enable-languages=3Dc,c++,fortran,objc,ob j-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp - -disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runti me-libs --build=3Dmingw32 --prefix=3D/mingw Thread model: win32 gcc version 4.6.1 (GCC) COLLECT_GCC_OPTIONS=3D'-g' '-O0' '-save-temps' '-v' '-I' '.' '-I' '../../puresrc/g db' '-I' '../../puresrc/gdb/common' '-I' '../../puresrc/gdb/config' '-D' 'LOCALE DIR=3D"E:/msys/mingw32/msys/1.0/local/share/locale"' '-D' 'HAVE_CONFIG_H' '= -I' '.. /../puresrc/gdb/../include/opcode' '-I' '../../puresrc/gdb/../opcodes/..' '-I' ' ../../puresrc/gdb/../readline/..' '-I' '../bfd' '-I' '../../puresrc/gdb/../bfd' '-I' '../../puresrc/gdb/../include' '-I' '../libdecnumber' '-I' '../../puresrc/g db/../libdecnumber' '-I' '../../puresrc/gdb/gnulib' '-I' 'gnulib' '-I' 'c:/Pytho n27/include' '-I' 'c:/Python27/include' '-Wall' '-Wdeclaration-after-statement' '-Wpointer-arith' '-Wformat-nonliteral' '-Wno-pointer-sign' '-Wno-unused' '-Wunu sed-value' '-Wunused-function' '-Wno-switch' '-Wno-char-subscripts' '-Wno-format ' '-Werror' '-c' '-o' 'main.o' '-MT' 'main.o' '-MMD' '-MP' '-MF' '.deps/main.Tpo ' '-D' 'TARGET_SYSTEM_ROOT=3D""' '-D' 'TARGET_SYSTEM_ROOT_RELOCATABLE=3D0' = '-D' 'BIN DIR=3D"E:/msys/mingw32/msys/1.0/local/bin"' '-mtune=3Di386' '-march=3Di386' e:/msys/mingw32/bin/../libexec/gcc/mingw32/4.6.1/cc1.exe -E -quiet -v -I . -I . ./../puresrc/gdb -I ../../puresrc/gdb/common -I ../../puresrc/gdb/config -I ../. ./puresrc/gdb/../include/opcode -I ../../puresrc/gdb/../opcodes/.. -I ../../pure src/gdb/../readline/.. -I ../bfd -I ../../puresrc/gdb/../bfd -I ../../puresrc/gd b/../include -I ../libdecnumber -I ../../puresrc/gdb/../libdecnumber -I ../../pu resrc/gdb/gnulib -I gnulib -I c:/Python27/include -I c:/Python27/include -iprefi x e:\msys\mingw32\bin\../lib/gcc/mingw32/4.6.1/ -MMD main.d -MF .deps/main.Tpo - MP -MT main.o -D LOCALEDIR=3D"E:/msys/mingw32/msys/1.0/local/share/locale" = -D HAVE _CONFIG_H -D TARGET_SYSTEM_ROOT=3D"" -D TARGET_SYSTEM_ROOT_RELOCATABLE=3D0 = -D BINDIR =3D"E:/msys/mingw32/msys/1.0/local/bin" ../../puresrc/gdb/main.c -mtune=3Di= 386 -marc h=3Di386 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral - Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-c har-subscripts -Wno-format -Werror -g -fworking-directory -O0 -fpch-preprocess - o main.i Did you see want happens? -DBINDIR=3D"/usr/local/bin\" gets transformed into '-D' 'BINDIR=3D"E:/msys/mingw32/msys/1.0/local/bin"' inside COLLECT_GCC_OPTIONS! So that once this compiled gdb executable is put to e:\pas\fpc-2.7.1\gdb\bin relocate_gdb_directory function doesn't find any common part between E:/msys/mingw32/msys/1.0/local/bin and /usr/local/share/gdb which leads to failure in directory relocation. I think that moving BINDIR also into config.h should fix that msys specific failure. Pierre Muller