There is bad CFLAGS/CXXFLAGS filtering there. Removing -O* family of flags breaks ttmkfdir. During my testing, I removed -O -O? from the filter-flags in the ebuild (I took the 3.0.9-r2 as a base), then added append-flags -O${optim_level_to_test} right after filter-flags. -O[123s] worked, but not -O0. After that, I removed the append-flags line and it worked. There must some reason why -O* were filtered. However, I did not find a bug when I searched for "ttmkfdir optimisation", "ttmkfdir optimization" and "ttmkfdir CFLAGS". I would like comments from the arch maintainers. Reproducible: Always Steps to Reproduce: 1. emerge ttmkfdir 2. cd /usr/share/fonts/local 3. ttmkfdir Actual Results: The good old 'Segmentation fault' (happens when built without optimisation). Expected Results: ttmkfdir generates a file named fonts.dir inside /usr/share/fonts/local. Gentoo Base System version 1.4.16 Portage 2.0.51.19 (uclibc/x86/hardened/2.4, gcc-3.3.5-20050130, uclibc-0.9.27-r0, 2.4.30-hardened-r1 i686) ================================================================= System uname: 2.4.30-hardened-r1 i686 AMD Athlon(tm) XP 2500+ Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr 16 2005, 22:10:58)] dev-lang/python: 2.3.4-r1 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.7.9-r1, 1.5, 1.9.4, 1.6.3, 1.4_p6, 1.8.5-r3 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-pipe -O2 -march=pentium3 -mcpu=athlon-xp -fomit-frame-pointer" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -O2 -march=pentium3 -mcpu=athlon-xp -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig buildpkg ccache digest distlocks nodoc noinfo sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo http://adelie.polymtl.ca/ http://gentoo.seren.com/gentoo ftp://gentoo.mirrors.tds.net/gentoo" LANG="fr_CA" LC_ALL="fr_CA" MAKEOPTS="-j2 -s" PKGDIR="/usr/local/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 16bit 3dfx 3dnow 3dnowext a52 aac apm asm async bidi bitmap-fonts blender-game bmp bootsplash bzip2 cap cdparanoia cdr chroot cjk cracklib crypt dga dhcp dlloader droproot dv dvd dvdr dvdread encode exif expat faad ftp gatos gd-external gif glep gpm gtk2 hal hardened hardenedphp immqt-bc innodb jack jit jpeg justify kdeenablefinal kdexdeltas lcms libclamav lm_sensors logitech-mouse lzw mad md5sum mdb minimal mmx mmx2 mozdevelop mozp3p mozsvg mp3 mpeg4 msn multicall native ncurses noplugin oggvorbis openal oscar oss pcre pdflib pic png posix readline sharedmem spell sql sqlite sse subversion svg svgz sysvipc tcpmd5 theora threads truetype truetype-fonts uclibc ucs2 usb userlocales utf8 v4l vanilla vim-pager voodoo3 xpm xrandr xscreensaver xv xvmc zlib userland_GNU kernel_linux elibc_uclibc" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS, LINGUAS
Did you read the ChangeLog? 06 Feb 2004; Brandon Hale <tseng@gentoo.org> ttmkfdir-3.0.9-r1.ebuild, ttmkfdir-3.0.9.ebuild: Filter all -O levels, these cause the build to fail. (Bug #40411)
Looks like the problems are sensitive to GCC version: GCC 3.2.x (see bug 40411): optimisation must be disabled GCC 3.3.5-20050120-r1: ensure optimisation is enabled It could also because I use uclibc.
I tested with 3.3.6, 3.4.5, 4.0.2 and 4.1_beta20060210 and all worked with the current ebuild.