Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591218 - sys-apps/iproute2 does not respect CC (breaks cross-compiling)
Summary: sys-apps/iproute2 does not respect CC (breaks cross-compiling)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-08-13 22:25 UTC by Gerhard Bräunlich
Modified: 2016-09-18 15:32 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,5.08 KB, text/x-log)
2016-08-13 22:25 UTC, Gerhard Bräunlich
Details
Add cross-compile support (iproute2-4.7.0.patch,469 bytes, patch)
2016-08-13 22:29 UTC, Gerhard Bräunlich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Bräunlich 2016-08-13 22:25:37 UTC
Created attachment 443256 [details]
build.log

The iproute2 ebuild's don't use the configure script provided by upstream. The use flags are used to write a custom Config. The ebuilds miss to set the variables which would have been set by the check_toolchain() function in configure (this includes PKG_CONFIG, AR, CC).
As a consequence cross emerging fails.

I recommend sourcing the configure script and calling check_toolchain (see patch).
Comment 1 Gerhard Bräunlich 2016-08-13 22:27:34 UTC
# armv6j-hardfloat-linux-gnueabi-emerge --info
Portage 2.2.28 (python 3.4.3-final-0, default/linux/arm/13.0/armv6j, gcc-4.9.3, unavailable, 4.4.6-gentoo x86_64)
=================================================================
System uname: Linux-4.4.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-4500U_CPU_@_1.80GHz-with-gentoo-2.2
KiB Mem:     8087704 total,   6449836 free
KiB Swap:     524284 total,    524284 free
Timestamp of repository gentoo: Sat, 13 Aug 2016 14:00:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.3_p46::gentoo
dev-lang/python:     2.7.12::gentoo, 3.4.5::gentoo
sys-apps/baselayout: 2.2-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

cross-armv6j-hardfloat-linux-gnueabi
    location: /usr/armv6j-hardfloat-linux-gnueabi/usr/portage
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv6j"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv6j"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_CH.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/armv6j-hardfloat-linux-gnueabi/packages/"
PORTAGE_CONFIGROOT="/usr/armv6j-hardfloat-linux-gnueabi/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/usr/armv6j-hardfloat-linux-gnueabi/tmp/"
USE="acl arm avahi berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 minimal modules ncurses nls nptl openmp pam pcre readline seccomp session ssl tcpd udev unicode webserver xattr zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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 ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Gerhard Bräunlich 2016-08-13 22:29:22 UTC
Created attachment 443258 [details, diff]
Add cross-compile support
Comment 3 Patrice Clement gentoo-dev 2016-09-08 07:46:40 UTC
There's also a pending PR at https://github.com/gentoo/gentoo/pull/2214. Review and merge accordingly. Thanks!
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2016-09-18 15:32:41 UTC
I've pushed slightly simpler fix:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb1b9e74ae0ebc902a6d72dc80bc79aa905d69e8