# HG changeset patch # User Christophe Lincoln # Date 1305821986 -7200 # Node ID 0fc448aca6fe80537bb67256826e3db194a383ef # Parent d45b76bbf023db553c4305e67b0670b0a6d0e02c glibc: dont build with -Os and better use default CFLAGS also need --build and --host diff -r d45b76bbf023 -r 0fc448aca6fe glibc/receipt --- a/glibc/receipt Thu May 19 14:30:25 2011 +0000 +++ b/glibc/receipt Thu May 19 18:19:46 2011 +0200 @@ -27,6 +27,7 @@ mkdir ../glibc-build && cd ../glibc-build # glibc no longer support i386, so use -march=i486 for better compatibility. + # If i686 ??? case $ARCH in i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;; esac @@ -78,12 +79,22 @@ # to the source tree to keep $src and $_pkg for genpkg. mkdir -p $WOK/$PACKAGE/install/etc touch $WOK/$PACKAGE/install/etc/ld.so.conf - echo "CFLAGS += $CFLAGS" > configparms + # Use -march=i486 for better compatibility. Also Glibc dont build with -Os. + unset CFLAGS + case $ARCH in + i386|i486) + echo "CFLAGS += -O2 -march=i486 -pipe -fomit-frame-pointer" > \ + configparms ;; + *) + echo "CFLAGS += -O2 -march=$ARCH -pipe -fomit-frame-pointer" > \ + configparms ;; + esac { $src/configure \ --disable-profile \ --enable-add-ons \ --enable-kernel=2.6.22.5 \ - --libexecdir=/usr/lib/glibc && + --libexecdir=/usr/lib/glibc \ + $CONFIGURE_ARGS && make && make install_root=$DESTDIR install } || return 1