net-dialup/xl2tpd doesn't respect neither CFLAGS nor CC. patches added. Reproducible: Always Portage 2.1.9.25 (embedded, gcc-4.3.4, uclibc-0.9.30.1-r1, 2.6.36-gentoo-r4 i686) ================================================================= System uname: Linux-2.6.36-gentoo-r4-i686-Intel-R-_Core-TM-2_Duo_CPU_T5670_@_1.80GHz-with-gentoo-1.12.14 Timestamp of tree: Thu, 30 Dec 2010 22:00:01 +0000 app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11-r1 dev-lang/python: 2.6.6-r1, 3.1.2-r4 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81 virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="mips ~mips" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -pipe -fomit-frame-pointer -I/usr/mipsel-softfloat-linux-uclibc/usr/include/ -I/usr/mipsel-softfloat-linux-uclibc/include/" CHOST="mipsel-softfloat-linux-uclibc" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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="-Os -pipe -fomit-frame-pointer -I/usr/mipsel-softfloat-linux-uclibc/usr/include/ -I/usr/mipsel-softfloat-linux-uclibc/include/" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs buildpkg distlocks fixlafiles fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://123.58.173.106/gentoo/ http://123.58.173.89/gentoo/ rsync://212.219.56.134/www.ibiblio.org/gentoo/ rsync://212.219.56.139/www.ibiblio.org/gentoo/ rsync://212.219.56.132/www.ibiblio.org/gentoo/" LANG="ru_RU.UTF-8" LDFLAGS="-L/usr/mipsel-softfloat-linux-uclibc/lib -L/usr/mipsel-softfloat-linux-uclibc/usr/lib" LINGUAS="en" PKGDIR="/usr/mipsel-softfloat-linux-uclibc/packages/" PORTAGE_CONFIGROOT="/usr/mipsel-softfloat-linux-uclibc/" 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="/usr/mipsel-softfloat-linux-uclibc/tmp/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/crossdev /var/lib/layman/gentoo-router-overlay /var/lib/layman/kde-sunset" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="bindist kdrive make-symlinks minimal mips modules multicall savedconfig zlib" ELIBC="uclibc" INPUT_DEVICES="evdev mouse keyboard tslib" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 258509 [details, diff] CFLAGS fixes
Created attachment 258511 [details, diff] CC fixes
The CC fix I get, but the CFLAGS are already applied fine, except that -O2 is added in which is something we like to control. The default make rule you add is superfluous as make already runs $(CC) $(CFLAGS) -c [..] if no make rule is supplied in the Makefile. So IMHO this should do and the CFLAGS.patch can be dropped: Index: xl2tpd-1.2.7.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-dialup/xl2tpd/xl2tpd-1.2.7.ebuild,v retrieving revision 1.1 diff -u -B -r1.1 xl2tpd-1.2.7.ebuild --- xl2tpd-1.2.7.ebuild 27 Nov 2010 11:01:36 -0000 1.1 +++ xl2tpd-1.2.7.ebuild 31 Dec 2010 17:25:37 -0000 @@ -4,7 +4,7 @@ EAPI="2" -inherit eutils +inherit eutils toolchain-funcs DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon" HOMEPAGE="http://www.xelerance.com/software/" @@ -23,6 +23,11 @@ epatch "${FILESDIR}"/${P}-as-needed.patch epatch "${FILESDIR}"/${P}-qa-fixes.patch use dnsretry && epatch "${FILESDIR}"/${PN}-dnsretry.patch + sed -i Makefile -e 's| -O2 | |g' || die "sed Makefile" +} + +src_compile() { + emake CC=$(tc-getCC) || die } src_install() {
(In reply to comment #3) > The CC fix I get, but the CFLAGS are already applied fine, except that -O2 is > added in which is something we like to control. Applied? The package doesn't use user's CFLAGS from make.conf, so I've made this patch. > The default make rule you add is superfluous as make already runs $(CC) > $(CFLAGS) -c [..] if no make rule is supplied in the Makefile. It was used for decouple CFLAGS from DFLAGS, OSFLAGS etc.
Please attach your build log, then. :)
(In reply to comment #5) > Please attach your build log, then. :) > Oops, sorry, it really respects CFLAGS. May I ask you to keyword it ~mips? Happy New Year!
Fixed in the tree. I've added sed trick to be able to pass CFLAGS but I like Andrey's solution more. Andrey, could you, please, send your CFLAGS patch upstream? Also for to mark this package ~mips, please, open new bug report.