i386-gentoo-linux-uclibc-gcc -I../../../include/GL -I../../../include -I.. -I../main -I../math -I../glapi -I../tnl -Wall -Os -pipe -Wstack-protector -Wformat=2 -fPIC -m32 -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR='"/usr/lib/xorg/modules/dri"' -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -std=c99 -ffast-math gen_matypes.c -o gen_matypes ./gen_matypes > matypes.h /bin/sh: line 1: 31794 Segmentation fault ./gen_matypes >matypes.h make[5]: *** [matypes.h] Error 139 make[5]: Leaving directory `/var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2/src/mesa/x86' When I ran without the -ffast-math it worked: make CFLAGS="-Wall -Os -pipe -Wstack-protector -Wformat=2 -fPIC -m32 -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR='"/usr/lib/xorg/modules/dri"' -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -std=c99" It might be there should be a sed -i 's/-ffast-math//g' configs/* if you have a gcc-4. Note that I dont have -ffast-math in my CFLAGS (it might be its triggered byt the -Os -ffast-math combination): Portage 2.1.1 (uclibc/x86/2005.1, gcc-4.1.1, uclibc-0.9.28-r0, 2.6.18-gentoo i686) ================================================================= System uname: 2.6.18-gentoo i686 Intel(R) Pentium(R) D CPU 3.00GHz Gentoo Base System version 1.12.5 Last Sync: Mon, 09 Oct 2006 06:00:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: [Not Present] dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i386-gentoo-linux-uclibc" CFLAGS="-Os -pipe -Wstack-protector -Wformat=2" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-Os -pipe" DISTDIR="/var/cache/distfiles" FEATURES="autoconfig buildpkg distclean distlocks genpkgindex metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="" MAKEOPTS="-j4" PKGDIR="/var/cache/packages/i386-gentoo-linux-uclibc/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/alpine-portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="bindist bitmap-fonts cli dlloader dri elibc_uclibc input_devices_evdev input_devices_keyboard input_devices_mouse kernel_linux minimal ncurses pcre readline reflection session spl truetype truetype-fonts type1-fonts uclibc userland_GNU video_cards_dummy video_cards_fbdev video_cards_v4l x86 xorg zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
This is fixed in current ~arch of mesa, mesa-progs, xorg-server, and x11-drivers/ stuff. I realize gcc4 is stable -- we plan to stable X.Org 7.1 soon (within days), so I'm marking this as fixed. However, I do suspect this is more of an -Os bug as nobody else has been reporting -ffast-math breakage, so it must be something uncommon.
(In reply to comment #1) > This is fixed in current ~arch of mesa, mesa-progs, xorg-server, and > x11-drivers/ stuff. I realize gcc4 is stable -- we plan to stable X.Org 7.1 > soon (within days), so I'm marking this as fixed. > > However, I do suspect this is more of an -Os bug as nobody else has been > reporting -ffast-math breakage, I read the other day that -ffast-math is known to be broken in gcc-4 and it helped me to find th workaroung in no-time. Since you mentioned it, I tried to compile with -ffast-math and without -Os: mm x86 # make CFLAGS="-Wall -pipe -Wstack-protector -Wformat=2 -fPIC -m32 -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR='"/usr/lib/xorg/modules/dri"' -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -std=c99 -ffast-math" i386-gentoo-linux-uclibc-gcc -I../../../include/GL -I../../../include -I.. -I../main -I../math -I../glapi -I../tnl -Wall -pipe -Wstack-protector -Wformat=2 -fPIC -m32 -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR='/usr/lib/xorg/modules/dri' -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -std=c99 -ffast-math gen_matypes.c -o gen_matypes ./gen_matypes > matypes.h /bin/sh: line 1: 25953 Segmentation fault ./gen_matypes >matypes.h make: *** [matypes.h] Error 139 > so it must be something uncommon. I use uclibc. Thanks!