Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54943 - Bug in iproute2 makefile breaks cross-compiling distcc
Summary: Bug in iproute2 makefile breaks cross-compiling distcc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-23 17:03 UTC by Adrian Rutledge
Modified: 2008-06-12 00:38 UTC (History)
0 users

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


Attachments
Proposed patch to fix bug (iproute2.patch,100 bytes, text/plain)
2004-06-23 17:07 UTC, Adrian Rutledge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Rutledge 2004-06-23 17:03:54 UTC
Cross-compiling distcc tends to require that CC be set to something besides "gcc" and not be ignored.  A bug in the makefile for iproute2-2.4.7-20020116 makes it override CC to gcc.

Reproducible: Always
Steps to Reproduce:
1. Set $CC to anything besides "gcc".
2. Emerge iproute2-2.4.7-20020116 and notice that it uses gcc and not the contents of $CC
Actual Results:  
iproute2 used gcc throughout to build

Expected Results:  
iproute2 should use the contents of $CC for the C compiler.

lynx root # emerge info
Portage 2.0.50-r8 (default-ppc-2004.1, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1)
===============================================================
==
System uname: 2.6.5-gentoo-r1 ppc 740/750
Gentoo Base System version 1.4.16
distcc 2.13 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=750 -pipe -fsigned-char -mpowerpc-gfxopt"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb/rules /usr/kde/2/share/config /usr/kde/3/share/
config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=750 -pipe -fsigned-char -mpowerpc-gfxopt"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/
gentoo"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/rutledad/"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa berkdb caps cups directfb dvd esd fbcon foomaticdb gatos gdbm gif gnome gnome-
libs gpm gtk gtk2 imap imlib jpeg kde krb4 ldap libwww mitshm motif mozilla nls offensive oggvorbis 
opengl oss pam perl png ppc python qt readline samba sasl sdl slang slp socks5 ssl tcltk tcpd truetype 
xv"
Comment 1 Adrian Rutledge 2004-06-23 17:07:36 UTC
Created attachment 34002 [details]
Proposed patch to fix bug

Add these lines within src_unpack() { } in iproute2-2.4.7-20020116.ebuild
Comment 2 SpanKY gentoo-dev 2004-06-23 17:13:19 UTC
fixed by running make with 'CC="$(gcc-getCC)"'
Comment 3 Bertrand Jacquin 2008-06-12 00:18:11 UTC
This append again with iproute2-2.6.22.20070710 even if make is called with CC="$(tc-getCC)"
Comment 4 Bertrand Jacquin 2008-06-12 00:19:54 UTC
Better with some log :

....
i586-geode-linux-uclibc-gcc -D_GNU_SOURCE -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES   -c -o lnstat_util.o lnstat_util.c
i586-geode-linux-uclibc-gcc   lnstat.o lnstat_util.o  -lresolv -L../lib -lnetlink -lutil -o lnstat
make[1]: Leaving directory `/var/tmp/portage/sys-apps/iproute2-2.6.22.20070710/work/misc'
make[1]: Entering directory `/var/tmp/portage/sys-apps/iproute2-2.6.22.20070710/work/netem'
gcc -D_GNU_SOURCE -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wstrict-prototypes -Wall -I../include -o maketable maketable.c -lm
maketable.c:1: error: CPU you selected does not support x86-64 instruction set
maketable.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [maketable] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/iproute2-2.6.22.20070710/work/netem'
Comment 5 SpanKY gentoo-dev 2008-06-12 00:38:32 UTC
this bug is ancient (and fixed).  open a new bug for new issues.