Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101109 - gnat.eclass garbles CFLAGS args on 32-bit AMD64 system
Summary: gnat.eclass garbles CFLAGS args on 32-bit AMD64 system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: David Holm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-02 10:04 UTC by Luke Maurer (Jyrinx)
Modified: 2005-08-03 01:40 UTC (History)
0 users

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


Attachments
Adding line to handle -march=athlon64 (patch,458 bytes, patch)
2005-08-02 10:11 UTC, Luke Maurer (Jyrinx)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Maurer (Jyrinx) 2005-08-02 10:04:48 UTC
I tried to compile gtkada on my AMD64 system within my 32-bit chroot
environment; it failed complaining that "i68664" is not a valid argument to
-march (who'd'a thunk it? :-) ). I found that gnat.eclass does some rather
simplistic mangling of the CFLAGS variable, using a regular expression to change
all instances of several known -march arguments, including athlon but NOT
including athlon64, to i686. I added a line (diff attached) to the eclass, and
now it's compiling happily.

emerge --info:

root@mythrilspoon (32) ~ # emerge --info
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-4.0.1,
glibc-2.3.5.20050421-r0, 2.6.12-gentoo-r3 i686)
=================================================================
System uname: 2.6.12-gentoo-r3 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.12
distcc 2.18.3 i386-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.9
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.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/jyrinx/var/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm avi bash-completion berkdb bitmap-fonts crypt cscope cups
eds emboss encode flac foomaticdb fortran gcj gd gdbm gif gpm gstreamer gtk gtk2
imlib ipv6 java jpeg junit libg++ libwww mad mikmod mozilla mp3 mpeg ncurses nls
nptl ogg oggvorbis opengl pam pdflib perl png python qt quicktime readline spell
ssl tcpd truetype truetype-fonts type1-fonts vorbis xine xml2 xmms xv xvid zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Luke Maurer (Jyrinx) 2005-08-02 10:11:26 UTC
Created attachment 64944 [details, diff]
Adding line to handle -march=athlon64

(An afterthought: Just to clarify, I realize gnat isn't supported under AMD64;
it's just the chroot that makes it act like a bona fide x86 system. Really,
this same bug would apply to someone with a full 32-bit install on an Athlon 64
system, which could have the same CFLAGS.)
Comment 2 David Holm (RETIRED) gentoo-dev 2005-08-03 01:40:55 UTC
Thanks you Luke. Your fix has been added to CVS.