bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFLAG kills compile


From: Sam Halliday
Subject: CFLAG kills compile
Date: Mon, 14 Oct 2002 21:09:36 +0100

hi there,

i am trying to build glibc-2.3.1 but i decided that this time i would add
-march=i686 to my CFLAGS. I compile like this...

export CFLAGS='-march=i686'
export CXXFLAGS=$CFLAGS
touch /etc/ld.so.conf &&
mkdir ../glibc-build &&
cd ../glibc-build &&
../glibc-2.3.1/configure --prefix=/usr --disable-profile \
   --enable-add-ons --libexecdir=/usr/bin \
   --enable-kernel=2.2.0 &&
echo "cross-compiling = no" > configparms &&
make

unfortunately the compile dies very soon like this...

# start of error
make[2]: Entering directory `/usr/src/glibc-2.3.1/csu'
gcc -s ../sysdeps/unix/sysv/linux/init-first.c -c -Wall -Winline 
-Wstrict-prototypes -Wwrite-strings -march=i686      -I../include -I. 
-I/usr/src/glibc-build/csu -I.. -I../libio  -I/usr/src/glibc-build 
-I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread 
-I../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 
-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/ldbl-96 
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I!
../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -I 
/lib/modules/2.4.19/build/include -D_LIBC_REENTRANT -include 
../include/libc-symbols.h      -DHAVE_INITFINI -o 
/usr/src/glibc-build/csu/init-first.o
In file included from ../include/libc-symbols.h:56,
                 from <command line>:1:
/usr/src/glibc-build/config.h:3:3: #error "glibc cannot be compiled without 
optimization"
make[2]: *** [/usr/src/glibc-build/csu/init-first.o] Error 1
# end of error

for sake of reference, if i don't set CFLAGS, the following is the command line 
which
is executed as opposed to the above

#start of command
gcc -s ../sysdeps/unix/sysv/linux/init-first.c -c -O2 -Wall -Winline 
-Wstrict-prototypes -Wwrite-strings -g      -I../include -I. 
-I/usr/src/glibc-build/csu -I.. -I../libio  -I/usr/src/glibc-build 
-I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread 
-I../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 
-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/ldbl-96 
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sy!
sdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -I 
/lib/modules/2.4.19/build/include -D_LIBC_REENTRANT -include 
../include/libc-symbols.h      -DHAVE_INITFINI -o 
/usr/src/glibc-build/csu/init-first.o
#end of command

you may notice that the -O2 flag is absent when i specify my own
opts... was this the intention? as a workaround i have to set
CFLAGS='-O2 -march=i686'

thanks in advance, and i apologise if this is not considered a bug in the 
compile.
(although maybe its just the INSTALL file which needs updating as it says on 
line
161 that just adding an -mcpu=x flag 'will do the trick')

Sam
building glibc-2.3.1 on
linux-2.4.19
gcc-3.2
system is LFS-4.0
-- 
"I'm not afraid of dying, I just don't want to be there when it happens."
-- Woody Allen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]