From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32460 invoked by alias); 22 Dec 2007 21:16:53 -0000 Received: (qmail 32448 invoked by uid 22791); 22 Dec 2007 21:16:52 -0000 X-Spam-Check-By: sourceware.org Received: from elasmtp-banded.atl.sa.earthlink.net (HELO elasmtp-banded.atl.sa.earthlink.net) (209.86.89.70) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Dec 2007 21:16:44 +0000 Received: from [67.169.18.28] (helo=ix.netcom.com) by elasmtp-banded.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1J6Bi4-0005FX-3y; Sat, 22 Dec 2007 16:16:40 -0500 Message-ID: <476D7E2E.9050205@ix.netcom.com> Date: Sat, 22 Dec 2007 21:16:00 -0000 From: Thomas Dineen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org CC: Thomas Dineen Subject: Re: Problem building gcc-4.2.2 64-bit on hp-ux 11.11, more problems, SUCCESS References: <4768E619.1040609@cadenas.de> <20071219122405.8crmniqubok8kwks@webmail.kwsoft.de> <4769057B.1040408@cadenas.de> <476A2E8B.4030005@cadenas.de> <20071220100431.b85i4lcu0wkkg84s@webmail.kwsoft.de> <476A7FC0.7060500@cadenas.de> In-Reply-To: <476A7FC0.7060500@cadenas.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-ELNK-Trace: 8fd196f32229d336776432462e451d7bd15d05d9470ff710efa12614b47e5b8d0e9d6c4120213040350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00404.txt.bz2 Andreas: "For the "ld" you should use the OS "ld"" Why is the local OS's ld preferable to the GNU ld? Thomas Dineen Thomas Mittelstaedt wrote: > Thank you, Andreas, > > That got it through, though not cleanly as I had to specify those > linker flags '-pthread -lpthread' in 2 > more generated Makefile's, gcc-build/Makefile and fixincludes/Makefile > after the comparison and when libstdc++ was > built. Somebody can be point to the way to do this properly? > The installed gcc still complains about unsatisfied symbols when > linking a small test program. Have add -lpthread all the time. > > > ld: Unsatisfied symbol "pthread_mutex_unlock" in file > /localbuild/opt/gcc64-4.2.2/lib/gcc/hppa64-hp-hpux11.11/4.2.2/libgcc_eh.a[unwind-dw2-fde.o] > > ld: Unsatisfied symbol "pthread_mutex_lock" in file > /localbuild/opt/gcc64-4.2.2/lib/gcc/hppa64-hp-hpux11.11/4.2.2/libgcc_eh.a[unwind-dw2-fde.o] > > 2 errors. > collect2: ld returned 1 exit status > > > > > > > > Here is my build script: > PATH=/opt/gcc-4.1.2-64/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/pd/bin:/opt/resmon/bin:/opt/gnome/bin:/opt/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/atok/bin:/opt/egb/bin:/usr/sbin/diag/contrib:/opt/vje/bin:/opt/hpsmh/bin:/opt/perl/bin: > > > > LDFLAGS='-pthread -lpthread' > BOOT_LDFLAGS='-pthread -lpthread' > LDFLAGS_FOR_BUILD='-pthread -lpthread' > export PATH LDFLAGS BOOT_LDFLAGS LDFLAGS_FOR_BUILD > > export CONFIG_SHELL=/usr/local/bin/bash > export LANG=C > export CC='/opt/gcc-4.1.2-64/bin/gcc' > > ../gcc-4.2.2/configure --prefix=/localbuild/opt/gcc64-4.2.2 > --enable-version-specific-runtime-libs --enable-static --enable-shared > --with-ar=/usr/bin/ar --with-gnu-as --with-as=/opt/gcc-4.1.2-64/bin/as > --enable-threads=posix --disable-nls --without-gnu-ld > --with-ld=/usr/ccs/bin/ld --enable-languages=c,c++,objc > > make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 > -fno-implicit-templates' LDFLAGS='-pthread -lpthread' > BOOT_LDFLAGS='-pthread -lpthread' LDFLAGS_FOR_BUILD='-pthread > -lpthread' bootstrap > > > > *** Makefile~ Thu Dec 20 11:51:02 2007 > --- Makefile Thu Dec 20 15:21:51 2007 > *************** > *** 149,155 **** > CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ > DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ > LD="$(LD)"; export LD; \ > ! LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \ > NM="$(NM)"; export NM; \ > RANLIB="$(RANLIB)"; export RANLIB; \ > WINDRES="$(WINDRES)"; export WINDRES; \ > --- 149,155 ---- > CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ > DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ > LD="$(LD)"; export LD; \ > ! LDFLAGS="$(LDFLAGS) -pthread -lpthread"; export LDFLAGS; \ > NM="$(NM)"; export NM; \ > RANLIB="$(RANLIB)"; export RANLIB; \ > WINDRES="$(WINDRES)"; export WINDRES; \ > *************** > *** 10502,10508 **** > srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ > libsrcdir="$$s/libstdc++-v3"; \ > rm -f no-such-file || : ; \ > ! CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ > $(TARGET_CONFIGARGS) $${srcdiroption} \ > || exit 1 > > --- 10502,10508 ---- > srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ > libsrcdir="$$s/libstdc++-v3"; \ > rm -f no-such-file || : ; \ > ! CONFIG_SITE=no-such-file LDFLAGS='-pthread -lpthread' $(SHELL) > $${libsrcdir}/configure \ > $(TARGET_CONFIGARGS) $${srcdiroption} \ > || exit 1 > > *************** > *** 12017,12023 **** > srcdiroption="--srcdir=$${topdir}/libiberty"; \ > libsrcdir="$$s/libiberty"; \ > rm -f no-such-file || : ; \ > ! CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ > $(TARGET_CONFIGARGS) $${srcdiroption} \ > || exit 1 > > --- 12017,12023 ---- > srcdiroption="--srcdir=$${topdir}/libiberty"; \ > libsrcdir="$$s/libiberty"; \ > rm -f no-such-file || : ; \ > ! CONFIG_SITE=no-such-file LDFLAGS='-pthread -lpthread' $(SHELL) > $${libsrcdir}/configure \ > $(TARGET_CONFIGARGS) $${srcdiroption} \ > || exit 1 > > *************** > *** 12970,12976 **** > srcdiroption="--srcdir=$${topdir}/libgomp"; \ > libsrcdir="$$s/libgomp"; \ > rm -f no-such-file || : ; \ > ! CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ > $(TARGET_CONFIGARGS) $${srcdiroption} \ > || exit 1 > > --- 12970,12976 ---- > srcdiroption="--srcdir=$${topdir}/libgomp"; \ > libsrcdir="$$s/libgomp"; \ > rm -f no-such-file || : ; \ > ! CONFIG_SITE=no-such-file LDFLAGS='-pthread -lpthread' $(SHELL) > $${libsrcdir}/configure \ > $(TARGET_CONFIGARGS) $${srcdiroption} \ > || exit 1 > > *** ./fixincludes/Makefile~ Thu Dec 20 14:53:07 2007 > --- ./fixincludes/Makefile Thu Dec 20 14:55:46 2007 > *************** > *** 103,109 **** > twoprocess : test-stamp $(AF) > > full-stamp : $(ALLOBJ) $(LIBIBERTY) > ! $(CC) $(CFLAGS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY) > $(STAMP) $@ > > test-stamp : $(TESTOBJ) $(LIBIBERTY) > --- 103,109 ---- > twoprocess : test-stamp $(AF) > > full-stamp : $(ALLOBJ) $(LIBIBERTY) > ! $(CC) $(CFLAGS) $(LDFLAGS) -pthread -lpthread -o $(FI) > $(ALLOBJ) $(LIBIBERTY) > $(STAMP) $@ > > test-stamp : $(TESTOBJ) $(LIBIBERTY) > > > > > > Listaccount schrieb: > >> Zitat von Thomas Mittelstaedt : >> >> >> >>> With a lot of ugly fixing in generated Makefile's, I got past stage 3, >>> but now libstdc++ does not build. >>> The generated config.h in hppa64-hp-hpux11.11/libstdc++-v3 seems to be >>> wrong, as there is an fabsf and altera >>> on my system, at least in the headers. >>> >> >> >> That's how we succed after some trouble when compiling GCC 4.2.2 on >> HP-UX 11.11 (PA-RISC) : >> >> export CONFIG_SHELL=/usr/bin/bash >> (Installed from OSS Archiv) >> >> export LANG=C >> (wird für gcc 4.x wegen awk/sed auf HPUX und AIX benötigt!!) >> >> export CC= >> We used some gcc 3.4.x in 32/64Bit build >> >> Config/Build für PA-32Bit 4.2.2: ../configure >> --prefix=/opt/gcc-4.2.2 --mandir=/usr/local/man --with-gnu-as >> --with-as=/usr/local/bin/gnu-as --without-gnu-ld >> --with-ld=/usr/ccs/bin/ld --disable-nls --enable-threads=posix >> --enable-languages=c,c++ >> >> Config/Build für PA-64Bit 4.2.2: ../configure >> --prefix=/opt/gcc64-4.2.2 --mandir=/usr/local/man >> --with-ar=/usr/bin/ar --with-gnu-as >> --with-as=/usr/local/bin/gnu64-as --without-gnu-ld >> --with-ld=/usr/ccs/bin/ld --disable-nls --enable-threads=posix >> --enable-languages=c,c++ >> >> Important is to *not* use the OS "as" but use some GNU-as with the >> matching 32/64Bit build. For the "ld" you should use the OS "ld", >> but your system should be on a recent patchlevel. It is useful to >> have GNU "awk" and "sed" instead of the OS ones. >> >> For all of the used tools you should always double-check if the >> intentioned one is used by configure. >> >> Regards & good luck >> >> Andreas >> >> >> >> > >