Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330695 - =sys-boot/grub-0.97-r10 failure to compile with -march=core2
Summary: =sys-boot/grub-0.97-r10 failure to compile with -march=core2
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2010-08-01 13:14 UTC by Kobboi
Modified: 2010-11-30 18:57 UTC (History)
1 user (show)

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

build.log (build.log,49.45 KB, text/plain)
2010-08-01 13:14 UTC, Kobboi
build.log with gcc-4.4.4 (build.log,49.43 KB, text/plain)
2010-08-03 19:40 UTC, Kobboi

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2010-08-01 13:14:40 UTC
x86_64-pc-linux-gnu-gcc -march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe -g -DHAVE_CONFIG_H -I. -I.. -I../stage1  -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-stack-protector -fno-builtin -nostdinc  -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DSUPPORT_GRAPHICS=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -g -MT pre_stage2_exec-fsys_jfs.o -MD -MP -MF .deps/pre_stage2_exec-fsys_jfs.Tpo -c -o pre_stage2_exec-fsys_jfs.o `test -f 'fsys_jfs.c' || echo './'`fsys_jfs.c
fsys_fat.c: Assembler messages:
fsys_fat.c:60: Error: Incorrect register `%rdx' used with `l' suffix
fsys_fat.c:60: Error: Incorrect register `%rax' used with `l' suffix

Reproducible: Always
Comment 1 Kobboi 2010-08-01 13:14:59 UTC
Created attachment 240917 [details]
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-08-01 13:19:35 UTC
emerge --info please
Comment 3 Kobboi 2010-08-01 13:36:43 UTC
Portage 2.2_rc67 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-gentoo-r1 x86_64)
System uname: Linux-2.6.34-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_930_@_2.80GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 01 Aug 2010 11:10:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
CFLAGS="-march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe -g"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2 -pipe -g"
FEATURES="assume-digests buildpkg distlocks fixpackages installsources news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/gnome /home/christophe/kobboi"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran fuse gdbm gif gnome gpm gtk iconv ipv6 jpeg kde lcms ldap libnotify lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid xvmc 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" 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" 
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2010-08-01 16:27:16 UTC
Your CFLAGS dont look that safe to me especially these: -mcx16 -mpopcnt -msahf

Can you remove those any try again?
Comment 5 Kobboi 2010-08-01 19:18:03 UTC
(In reply to comment #4)
> Your CFLAGS dont look that safe to me especially these: -mcx16 -mpopcnt -msahf
> Can you remove those any try again?

I have reduced the CFLAGS set to -march=core2 and still the same error message appears. Updating bug summary.
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2010-08-01 19:19:10 UTC
(In reply to comment #4)
> Your CFLAGS dont look that safe to me especially these: -mcx16 -mpopcnt -msahf
> Can you remove those any try again?

-march=native might use the same flags, at least for my CPU.
Although I can't neither reproduce it on my AMD system nor my Intel system.

The CFLAGS seem to be even ignored in this case.
Comment 7 Kobboi 2010-08-01 19:25:17 UTC
Just tell me what to do to provide relevant info.
Comment 8 SpanKY gentoo-dev 2010-08-02 04:31:28 UTC
post the output of `emerge grub -pv`.  most likely it's because of your USE=custom-cflags.
Comment 9 Kobboi 2010-08-02 08:04:05 UTC
(In reply to comment #8)
> post the output of `emerge grub -pv`.  most likely it's because of your
> USE=custom-cflags.


[ebuild     U ] sys-boot/grub-0.97-r10 [0.97-r9] USE="ncurses -custom-cflags -netboot -static" 0 kB
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-03 18:16:31 UTC
1. Test with gcc-4.4.4 please
2. Please provide new build.log output w/ gcc-4.4.4 and CFLAGS='-march=core2' (I'm esp interested to see if it's still complaining about asm register codes).
Comment 11 Kobboi 2010-08-03 19:40:28 UTC
Created attachment 241309 [details]
build.log with gcc-4.4.4
Comment 12 Kobboi 2010-08-03 19:41:46 UTC
(In reply to comment #11)
> Created an attachment (id=241309) [details]
> build.log with gcc-4.4.4

I reset my CFLAGS to my original settings for this though 

Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-04 00:21:06 UTC
"x86_64-pc-linux-gnu-gcc -march=core2 -msse4 -mcx16 -mpopcnt -msahf -O2"
I told you to use just CFLAGS="-march=core2" (and -O2 is fine).

please try that, and then each of your -m flags to see which of them is causing the problem.
Comment 14 SpanKY gentoo-dev 2010-08-04 02:12:00 UTC
i think the outstanding issue is why his CFLAGS are being respected at all.  he isnt using USE=custom-cflags, so they should be cleared.
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-11-30 08:06:58 UTC
No response from user, assuming it's his system, as I cannot reproduce this.
Comment 16 Kobboi 2010-11-30 12:31:05 UTC
I currently have only gcc-4.5.1 in use and in the meantime have recompiled 99% of all packages on my system. grub compiles fine now and if I step back to gcc-4.4.4 grub also compiles ok. Agree to close this, even though there might have been something going on...
Comment 17 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-11-30 18:57:22 UTC
Closing. The root issue here was that I cannot reproduce how/why your system was passing CFLAGS to the configure, when they should have been entirely removed.