current gcc development version (2.96) and csu/crt[in]* (again)
Andreas Jaeger
ajATarthur.rhein-neckar.de
Fri Sep 17 07:32:00 GMT 1999
Hi all,
Building the current glibc mainstream version with a current glibc cvs
version lead to the problem Zack already reported:
/usr/src/build-glibc/19990917-main/csu/crti.o: In function `_init':
/usr/src/build-glibc/19990917-main/csu/crti.o(.init+0x8): undefined reference to `LPR0'
/usr/src/build-glibc/19990917-main/csu/crti.o: In function `_fini':
/usr/src/build-glibc/19990917-main/csu/crti.o(.fini+0x8): undefined reference to `LPR0'
collect2: ld returned 1 exit status
make[2]: *** [/usr/src/build-glibc/19990917-main/db2/makedb] Error 1
The call to generate initfini.s was:
/opt/gcc-2.96/bin/gcc initfini.c -c -O3 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mpentiumpro -pipe -g0 -fPIC -fno-inline-functions -DWEAK_GMON_START -march=i386 -I../include -I. -I/usr/src/build-glibc/19990917-main/csu -I.. -I../libio -I/usr/src/build-glibc/19990917-main -I../sysdeps/i386/elf -I../crypt/sysdeps/unix -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../!
sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -S -g0 -fPIC -fno-inline-functions -DWEAK_GMON_START -march=i386 -finhibit-size-directive \
-fno-exceptions -o /usr/src/build-glibc/19990917-main/csu/initfini.s
and results in the usage of these options (I added -fverbose-asm):
# GNU C version 2.96 19990917 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.96 19990917 (experimental).
# options passed: -mcpu=pentiumpro -mpentiumpro -march=i386 -march=i386 -g
# -g0 -g0 -O3 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -fPIC
# -fno-inline-functions -fPIC -fno-inline-functions
# -finhibit-size-directive -fno-exceptions -fverbose-asm
# options enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
# -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole
# -fforce-mem -ffunction-cse -finline -fkeep-static-consts -fcaller-saves
# -fpcc-struct-return -fgcse -frerun-cse-after-loop -frerun-loop-opt
# -fschedule-insns2 -fsched-interblock -fsched-spec -fPIC -fnew-exceptions
# -fcommon -finhibit-size-directive -fverbose-asm -fgnu-linker -fregmove
# -foptimize-register-move -fargument-alias -fstrict-aliasing -fident
# -fpeephole2 -fmath-errno -m80387 -mhard-float -mno-soft-float -mieee-fp
# -mfp-ret-in-387 -mcpu=pentiumpro -march=i386
Adding explicitly -mcpu=i386 resulted in working crt[in] files. I'm
appending a patch.
Btw. my CFLAGS are set in configparms as:
CFLAGS= -momit-leaf-frame-pointer -pipe -O3 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mpentiumpro
Andreas
1999-09-17 Andreas Jaeger <aj@suse.de>
* sysdeps/i386/Makefile (CFLAGS-initfini.s): Add also -mcpu=i386
to override user settings.
--- sysdeps/i386/Makefile.~1~ Tue Aug 31 05:21:28 1999
+++ sysdeps/i386/Makefile Fri Sep 17 16:05:23 1999
@@ -8,7 +8,7 @@
ifeq ($(subdir),csu)
# On i686 we must avoid generating the trampoline functions generated
# to get the GOT pointer.
-CFLAGS-initfini.s += -march=i386
+CFLAGS-initfini.s += -march=i386 -mcpu=i386
endif
ifeq ($(subdir),db2)
--
Andreas Jaeger aj@suse.de aj@arthur.rhein-neckar.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
More information about the Libc-hacker
mailing list