Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399251 - sys-libs/glibc-2.15: amd64 build fails due to __floor being defined
Summary: sys-libs/glibc-2.15: amd64 build fails due to __floor being defined
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 04:53 UTC by Chris Smith
Modified: 2012-01-27 21:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
glibc-2.15-build.log.bz2 (glibc-2.15-build.log.bz2,143.23 KB, application/x-bzip)
2012-01-18 07:24 UTC, iGentoo
Details
amd64_glibc-2.15-floor.patch (amd64_glibc-2.15-floor.patch,1.55 KB, patch)
2012-01-18 07:28 UTC, iGentoo
Details | Diff
output of "gcc -Q --help=target -march=native" (gcc.native,3.86 KB, text/plain)
2012-01-18 23:52 UTC, Chris Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2012-01-18 04:53:19 UTC
sys-libs/glibc-2.15 rev. 1.4 doesn't build on amd64, x86 is OK

Reproducible: Always

Actual Results:  
x86_64-pc-linux-gnu-gcc -m64 ../sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -march=native -pipe -Wstrict-prototypes      -Wno-uninitialized -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -I../include -I/var/tmp/portage/sys-libs/glibc-2.15/work/build-amd64-x86_64-pc-linux-gnu-nptl/math -I/var/tmp/portage/sys-libs/glibc-2.15/work/build-amd64-x86_64-pc-linux-gnu-nptl -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed -isystem /usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1 -DIS_IN_libm=1    -o /var/tmp/portage/sys-libs/glibc-2.15/work/build-amd64-x86_64-pc-linux-gnu-nptl/math/s_floor.o -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.15/work/build-amd64-x86_64-pc-linux-gnu-nptl/math/s_floor.o.dt -MT /var/tmp/portage/sys-libs/glibc-2.15/work/build-amd64-x86_64-pc-linux-gnu-nptl/math/s_floor.o
../sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c:50:1: error: expected identifier or ‘(’ before ‘{’ token
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.15/work/build-amd64-x86_64-pc-linux-gnu-nptl/math/s_floor.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.15/work/glibc-2.15/math'
make[1]: *** [math/others] Error 2



# emerge --info
Portage 2.2.0_alpha84 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.15, 3.2.1-gentoo x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.1
Timestamp of tree: Wed, 18 Jan 2012 03:45:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.2
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.15
Repositories: gentoo tcg mythtv
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://mirrors.rit.edu/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/mythtv_portage/Gentoo"
SYNC="rsync://rsync11.us.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apache2 audiofile bash-completion berkdb bzip2 cairo caps cdaudio cddb cdparanoia cdr cdrdao chm cli consolekit cracklib crypt cups curl cxx dbus designer-plugin djvu dri dts dv dvb dvd dvdr ebook encode exif fam ffmpeg flac fortran gdbm gif gmp gnome gphoto2 gpm gps graphite gstreamer gtk iconv icu ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k kpathsea lame lcd lcms ldap libffi libnotify mad marble midi mmap mmx modules mozilla mp3 mudflap multilib musicbrainz mythtv ncurses network nls nodrm nptl nptlonly nsplugin nvidia ofx ogg openexr opengl openmp pam pcre pdf png policykit pulseaudio quicktime readline samba sasl scanner sdl semantic-desktop session slp smp sndfile spell sse sse2 ssl subversion svg sysfs theora threads tiff tk transparency truetype udev unicode usb vcd vdpau vim-syntax vorbis wav wavpack wmf x264 xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp hpet hrtimer rtctimer seqdummy virmidi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 iGentoo 2012-01-18 07:22:51 UTC
I have the same problem:
../sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c:50:1: error: expected identifier or ‘(’ before ‘{’ token


# cd /usr/portage/sys-libs/glibc/
# MAKEOPTS="-j1" MULTILIB_ABIS=amd64 CFLAGS="-Wall -march=native -pipe -O2" CXXFLAGS="-Wall -march=native -pipe -O2" ebuild glibc-2.15.ebuild package

CFLAGS					Result
-march=native -mno-sse4.1		compile success
-march=native ( with -msse4.1 )		compile fail
-march=native ( with -mavx )		...unknown...

# gcc -E -v - <<<'' 2>&1 | grep cc1
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.2/cc1 -E -quiet -v - -fno-strict-overflow -mtune=generic -march=x86-64 -fPIE -fstack-protector-all

# gcc -E -v - <<<'' 2>&1 -march=native | grep cc1
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.2/cc1 -E -quiet -v - -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -fno-strict-overflow -fPIE -fstack-protector-all



Portage 2.2.0_alpha84 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.15, 3.2.1-custom x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.1-custom-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Wed, 18 Jan 2012 06:30:02 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7::kde
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.2
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2::custom
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.15::custom
Repositories: gentoo gnome kde qting-edge systemd custom
Installed sets: @custom-initramfs-rebuild, @custom-protected, @custom-selibs-rebuild, @kdebase-4.8
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS=""
GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--sort-section=alignment"
LINGUAS="en en_US zh zh_CN"
MAKEOPTS="V=1 -j10"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9ef"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gnome /var/lib/layman/kde /var/lib/layman/qting-edge /var/lib/layman/systemd /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 audit bash-completion berkdb bzip2 c++0x cairo caps cli cracklib crypt cxx dbus dri gdbm gmp gnome gpm gtk gtk3 hardened iconv ipv6 jpeg jpeg2k mmx modules mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre png pppd pulseaudio qt4 readline selinux session sse sse2 ssl svg sysfs tcpd threads tiff unicode vim-syntax xattr xinetd xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="btrfs caps dmsquash-live gensplash livenet lvm nbd nfs plymouth syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh zh_CN" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-libs/glibc-2.15 was built with the following:
USE="gd glibc-omitfp hardened (multilib) selinux -debug -profile -vanilla"
CFLAGS="-Wall -march=native -pipe -O2 -fno-strict-aliasing -fno-stack-protector"
CXXFLAGS="-Wall -march=native -pipe -O2 -fno-strict-aliasing"
Comment 2 iGentoo 2012-01-18 07:24:35 UTC
Created attachment 299211 [details]
glibc-2.15-build.log.bz2
Comment 3 iGentoo 2012-01-18 07:28:07 UTC
Created attachment 299213 [details, diff]
amd64_glibc-2.15-floor.patch

Reference...
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8a6d525522b2fb04cec86b48c5b25818d395bbbd
Comment 4 SpanKY gentoo-dev 2012-01-18 11:44:39 UTC
it built fine for me.  is it related to your CFLAGS ?
Comment 5 iGentoo 2012-01-18 12:40:33 UTC
Yes, is it related to my CFLAGS.

When compiling with CFLAGS -mno-sse4.1 -mno-avx, everything is fine.
When compiling with CFLAGS -msse4.1 -mno-avx, fail.
When compiling with CFLAGS -msse4.1 -mavx ( -march=corei7 ? ), I guess it will fail, too.
Comment 6 Chris Smith 2012-01-18 15:50:15 UTC
(In reply to comment #4)
> it built fine for me.  is it related to your CFLAGS ?

Not in my case, as can be seen from the emerge --info provided.
Comment 7 Chris Smith 2012-01-18 15:56:38 UTC
Just to be clear, rev. 1.1 built fine for me on amd64, but not on x86, and this one, rev. 1.4 builds on x86 but not on amd64.
Comment 8 SpanKY gentoo-dev 2012-01-18 18:11:25 UTC
earlier revs isn't terribly relevant to the "__floorf is getting defined earlier".  i know what patch is triggering this failure, but i'm more interested in the root cause, and that patch is most likely not it.
Comment 9 Jonathan Isom 2012-01-18 23:33:34 UTC
I getting this as well.  Using --march=bdver1. "-mno-sse4.1 -mno-avx" fixes the install.

@Chris
   What does this output. "gcc -Q --help=target -march=native"

Your --march=native could be bringing in things in that you don't realize.
Comment 10 Chris Smith 2012-01-18 23:52:58 UTC
Created attachment 299277 [details]
output of "gcc -Q --help=target -march=native"

(In reply to comment #9)
> I getting this as well.  Using --march=bdver1. "-mno-sse4.1 -mno-avx" fixes the
> install.
> 
> @Chris
>    What does this output. "gcc -Q --help=target -march=native"
> 
> Your --march=native could be bringing in things in that you don't realize.
Comment 11 Jonathan Isom 2012-01-19 00:03:10 UTC
(In reply to comment #10)
> Created attachment 299277 [details]
> output of "gcc -Q --help=target -march=native"
-mno-sse4.1 -mno-avx are both defined. see comment #5




> (In reply to comment #9)
> > I getting this as well.  Using --march=bdver1. "-mno-sse4.1 -mno-avx" fixes the
> > install.
> > 
> > @Chris
> >    What does this output. "gcc -Q --help=target -march=native"
> > 
> > Your --march=native could be bringing in things in that you don't realize.
Comment 12 iGentoo 2012-01-19 08:15:51 UTC
/**** sysdeps/x86_64/fpu/multiarch/s_floor-c.c ***/
#undef __floor
#define __floor __floor_c
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>

/*** sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c ***/
...
#include "math_private.h"
...
double
__floor (double x)
{
	...;
}

/*** sysdeps/x86_64/fpu/math_private.h ***/
#ifdef __SSE4_1__
...
# ifndef __floor
#  ifdef __AVX__
#   define __floor(d) ({ ...;})
#  else
#   define __floor(d) ({ ...;})
#  endif
# endif
...
#endif

When "0081_all_glibc-2.15-math64crash.patch" not being applied, we use sysdeps/x86_64/fpu/multiarch/s_floor-c.c:
gcc -m64 ../sysdeps/x86_64/fpu/multiarch/s_floor-c.c -c ...flags... -o build-amd64-x86_64-pc-linux-gnu-nptl/math/s_floor-c.o
( define __floor __floor_c )

When "0081_all_glibc-2.15-math64crash.patch" being applied, we use sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c:
gcc -m64 ../sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c -c ...flags... -o build-amd64-x86_64-pc-linux-gnu-nptl/math/s_floor.o
if __SSE4_1__ is not defined, everything is fine.
if __SSE4_1__ is defined, we define __floor(d) ({ ...;}), and then:
../sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c:50:1: error: expected identifier or ‘(’ before ‘{’ token
Comment 13 iGentoo 2012-01-20 16:39:26 UTC
=================================================================
                        Package Settings
=================================================================

sys-libs/glibc-2.15 was built with the following:
USE="debug gd glibc-omitfp hardened (multilib) selinux -profile -vanilla"
CFLAGS="-ggdb3 -pipe -O2 -fno-strict-aliasing -fno-stack-protector"
CXXFLAGS="-ggdb3 -pipe -O2 -fno-strict-aliasing"
LDFLAGS=""


x11-libs/gdk-pixbuf-2.24.1 was built with the following:
USE="X debug introspection jpeg jpeg2k (multilib) test tiff -doc"
CFLAGS="-ggdb3 -O0 -pipe"
CXXFLAGS="-ggdb3 -O0 -pipe"
LDFLAGS="-Wl,--as-needed"



# gdb gdk-pixbuf-query-loaders 
GNU gdb (Gentoo 7.3.1 p2) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/gdk-pixbuf-query-loaders...done.
(gdb) run 
Starting program: /usr/bin/gdk-pixbuf-query-loaders 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00000000000065b6 in ?? ()
(gdb) backtrace 
#0  0x00000000000065b6 in ?? ()
#1  0x00007ffff6795f09 in atan () from /lib64/libm.so.6
#2  0x00007ffff7de69bb in _dl_relocate_object () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7ded9e6 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de9116 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7ded37a in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff70bf0d6 in dlopen_doit () from /lib64/libdl.so.2
#7  0x00007ffff7de9116 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff70bf6bf in _dlerror_run () from /lib64/libdl.so.2
#9  0x00007ffff70bf171 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
#10 0x00007ffff7bd7840 in g_module_open () from /usr/lib64/libgmodule-2.0.so.0
#11 0x000055555555565b in query_module (contents=0x555555758e00, dir=0x555555555e98 "/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders", 
    file=0x5555557599b3 "libpixbufloader-svg.so") at queryloaders.c:166
#12 0x0000555555555a20 in main (argc=1, argv=0x7fffffffde88) at queryloaders.c:354
(gdb) up
#1  0x00007ffff6795f09 in atan () from /lib64/libm.so.6
(gdb) info registers
rax            0x7ffff677fa80	140737328446080
rbx            0x55555576c720	93824994428704
rcx            0xa	10
rdx            0x5555557645f0	93824994395632
rsi            0x7ffff6795f00	140737328537344
rdi            0x0	0
rbp            0x7fffffffd7e0	0x7fffffffd7e0
rsp            0x7fffffffd6d0	0x7fffffffd6d0
r8             0x1f250ea	32657642
r9             0x0	0
r10            0x7fffffffd520	140737488344352
r11            0x7fffffffd690	140737488344720
r12            0x7ffff2281b10	140737256102672
r13            0x7ffff22ddf30	140737256480560
r14            0x7	7
r15            0x7ffff2690fa8	140737260359592
rip            0x7ffff6795f09	0x7ffff6795f09 <atan+9>
eflags         0x10202	[ IF RF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) disassemble 0x00007ffff6795f09
Dump of assembler code for function atan:
   0x00007ffff6795f00 <+0>:	sub    $0x8,%rsp
   0x00007ffff6795f04 <+4>:	callq  0x7ffff67815b0 <__get_cpu_features@plt>
=> 0x00007ffff6795f09 <+9>:	testb  $0x1,0x22(%rax)
   0x00007ffff6795f0d <+13>:	jne    0x7ffff6795f30 <atan+48>
   0x00007ffff6795f0f <+15>:	testb  $0x10,0x13(%rax)
   0x00007ffff6795f13 <+19>:	mov    0x2dd016(%rip),%rax        # 0x7ffff6a72f30
   0x00007ffff6795f1a <+26>:	cmove  0x2dd03e(%rip),%rax        # 0x7ffff6a72f60
   0x00007ffff6795f22 <+34>:	add    $0x8,%rsp
   0x00007ffff6795f26 <+38>:	retq   
   0x00007ffff6795f27 <+39>:	nopw   0x0(%rax,%rax,1)
   0x00007ffff6795f30 <+48>:	mov    0x2dd089(%rip),%rax        # 0x7ffff6a72fc0
   0x00007ffff6795f37 <+55>:	add    $0x8,%rsp
   0x00007ffff6795f3b <+59>:	retq   
End of assembler dump.
(gdb) disassemble 0x7ffff67815b0
Dump of assembler code for function __get_cpu_features@plt:
   0x00007ffff67815b0 <+0>:	jmpq   *0x2f18ea(%rip)        # 0x7ffff6a72ea0
   0x00007ffff67815b6 <+6>:	pushq  $0x4
   0x00007ffff67815bb <+11>:	jmpq   0x7ffff6781560
End of assembler dump.
(gdb) disassemble 0x7ffff6a72ea0
No function contains specified address.
(gdb) x 0x7ffff6a72ea0
0x7ffff6a72ea0:	0x000065b6


http://sourceware.org/bugzilla/show_bug.cgi?id=13580
Comment 14 SpanKY gentoo-dev 2012-01-27 21:07:14 UTC
(In reply to comment #12)

thx ... good info.  should be fixed in latest cvs, so sync up and rebuild.