compiling glibc with a compiler flag

Mike Frysinger vapier@gentoo.org
Sat Apr 14 17:21:00 GMT 2007


On Saturday 14 April 2007, Jakub Jelinek wrote:
> On Sat, Apr 14, 2007 at 11:54:40AM +0300, Metuki Sabhe wrote:
> > How can I compile glibc with some additional compiler flags ?
>
> Just tell it to configure, say:
> CC=gcc CXX=g++ CFLAGS="-g -O2 -mtune=generic -DNDEBUG=1" \
>   ../configure --prefix=/usr --enable-add-ons=nptl,libidn \
>   --without-cvs --enable-kernel=2.6.9 --with-headers=/usr/include \
>   --enable-bind-now --with-tls --with-__thread --build x86_64-redhat-linux
> \ --host x86_64-redhat-linux

on that note, is there a reason for CPPFLAGS not being respected even though 
CFLAGS/ASFLAGS are ?  you can half cheat and stick your CPPFLAGS into CFLAGS 
(like -DNDEBUG=1), but that wont help when compiling .S files as 
CPPFLAGS/ASFLAGS are only used in that step ... 
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070414/8be482a2/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0030_all_glibc-respect-env-CPPFLAGS.patch
Type: text/x-diff
Size: 854 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070414/8be482a2/attachment.bin>


More information about the Libc-alpha mailing list