[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gm2-6.4.0 ignore LDFLAGS
From: |
Gaius Mulley |
Subject: |
Re: gm2-6.4.0 ignore LDFLAGS |
Date: |
Thu, 07 May 2020 10:29:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
john o goyo <address@hidden> writes:
> Greetings, Gaius.
>
> I am trying to build gcc+gm2-6.4.0-20181220 with gcc-6.3.0. (The
> latter builds without problem.)
>
> The build of gm2 fails at pg. On Solaris, recv() and friends reside
> in the nsl and socket libraries.
> These libraries were added to LDFLAGS but these flags are ignored in
> the build of ppg.
>
> /home/build/gcc/6.3.0/bin/gcc -g -o gm2/pg gm2/gm2-pg-boot/Glibc.o
> gm2/gm2-pg-boot/Gmcrts.o gm2/gm2 g-boot/GUnixArgs.o
> gm2/gm2-pg-boot/GSelective.o gm2/gm2-pg-boot/Gtermios.o
> gm2/gm2-pg-boot/GSysExce ions.o gm2/gm2-pg-boot/Gldtoa.o
> gm2/gm2-pg-boot/Gdtoa.o gm2/gm2-pg-boot/Gwrapc.o gm2/gm2-pg-boot/Gp
> .o gm2/gm2-pg-boot/GSYSTEM.o gm2/gm2-pg-boot/Gerrno.o
> gm2/gm2-pg-boot/GSymbolKey.o gm2/gm2-pg-boot/ ameKey.o
> gm2/gm2-pg-boot/GLists.o gm2/gm2-pg-boot/Gbnflex.o
> gm2/gm2-pg-boot/GASCII.o gm2/gm2-pg-boo GArgs.o
> gm2/gm2-pg-boot/GFIO.o gm2/gm2-pg-boot/GStrIO.o
> gm2/gm2-pg-boot/GStrLib.o gm2/gm2-pg-boot/G dexing.o
> gm2/gm2-pg-boot/GStorage.o gm2/gm2-pg-boot/GDebug.o
> gm2/gm2-pg-boot/GIO.o gm2/gm2-pg-boot/ tdIO.o
> gm2/gm2-pg-boot/GM2EXCEPTION.o gm2/gm2-pg-boot/GStrCase.o
> gm2/gm2-pg-boot/GNumberIO.o gm2/gm pg-boot/GAssertion.o
> gm2/gm2-pg-boot/GPushBackInput.o gm2/gm2-pg-boot/GSysStorage.o
> gm2/gm2-pg-boot DynamicStrings.o gm2/gm2-pg-boot/GM2RTS.o
> gm2/gm2-pg-boot/GRTExceptions.o gm2/gm2-pg-boot/Gpg.o gm2
> m2-pg-boot/main.o -lm -lpth
>
> (It also failed at ppg.)
>
> If I run the above with -lnsl -lsocket added, pg builds (as did ppg
> with manually adding the libraries).
>
> My question: What invokes the pg/ppg builds (so that I can manually
> add the libraries need)?
Hello John,
sure the Makefile fragment in:
gcc/gm2/Make-lang.in:2130
gm2/ppg$(exeext): gm2/boot-bin/mc $(BUILD-PPG-O) $(BUILD-MC-INTERFACE-O)
gm2/gm2-ppg-boot/main.o
$(CC) -g -o $@ $(BUILD-PPG-O) gm2/gm2-ppg-boot/main.o -lm -lpth
with the $(CC) recipe
and also at
gcc/gm2/Make-lang.in:2174 for pg
gm2/pg$(exeext): gm2/boot-bin/mc \
$(BUILD-PG-O) $(GM2-PPG-MODS:%.mod=gm2/gm2-pg-boot/%.o) \
$(BUILD-MC-INTERFACE-O) gm2/gm2-pg-boot/main.o
$(CC) -g -o $@ $(BUILD-PG-O) gm2/gm2-pg-boot/main.o -lm -lpth
and
gcc/gm2/Make-lang.in:2237
gm2/pge$(exeext): gm2/boot-bin/mc \
$(BUILD-PGE-O) $(GM2-PPG-MODS:%.mod=gm2/gm2-pge-boot/%.o) \
$(BUILD-MC-INTERFACE-O) gm2/gm2-pge-boot/main.o
$(CC) -g -o $@ $(BUILD-PGE-O) gm2/gm2-pge-boot/main.o -lm -lpth
$(srcdir)/gm2/tools-src/buildpg $(srcdir)/gm2/gm2-compiler/ppg.mod t >
gm2/gm2-auto/t.bnf
./gm2/pge$(exeext) gm2/gm2-auto/t.bnf > gm2/gm2-auto/t1.mod
./gm2/pg$(exeext) gm2/gm2-auto/t.bnf > gm2/gm2-auto/t2.mod
$(QUIAT)if ! diff gm2/gm2-auto/t1.mod gm2/gm2-auto/t2.mod > /dev/null ;
then \
echo "failure: pg (with error recovery) failed" ; \
$(RM) gm2/pge$(exeext) ; \
exit 1 ; \
fi
$(RM) gm2/gm2-auto/t.mod gm2/gm2-auto/t1.mod gm2/gm2-auto/t2.mod
hope that helps,
regards,
Gaius