Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 243630 - app-misc/delay: CC variable not respected
Summary: app-misc/delay: CC variable not respected
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2008-10-24 00:34 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-04-10 03:40 UTC (History)
1 user (show)

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


Attachments
Update ebuild (delay-1.6-r1.ebuild,832 bytes, patch)
2009-04-05 18:32 UTC, bob5972
Details | Diff
Ebuild Patch (delay-1.6.ebuild.patch,754 bytes, patch)
2009-04-07 18:18 UTC, bob5972
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-10-24 00:34:54 UTC
I'm filing this bug (from a template, mind you) because the ebuild I'm reporting it against failed to build once I removed my /usr/bin/{gcc,cc,c++,c99} binaries. This means that the ebuild is relying on gcc or cc as compiler, while it should use "$(tc-getCC)" so that user choices are respected, and cross-compiling works as intended.

This usually comes down to one of these tasks:

- use emake CC="$(tc-getCC)" for building, to ovewrite make's CC variable (defaults to "cc", some upstream rewrites it);
- the above plus replacing explicit "gcc" (or similar) calls with $(CC) so that the variable is actually respected;
- tc-export CC in src_compile before eventual econf.

For C++, you'd have to replace CC with CXX everywhere above, of course.

If your package is a special case on this, please let me know.

Thanks,
Diego
Comment 1 bob5972 2009-04-05 18:32:19 UTC
Created attachment 187388 [details, diff]
Update ebuild

It seems the ebuild is calling ./configure instead of econf, and switching that seems to fix it.


--- delay-1.6.ebuild	2008-03-26 12:05:23.000000000 -0700
+++ delay-1.6-r1.ebuild	2009-04-05 11:14:54.000000000 -0700
@@ -15,7 +15,7 @@
 
 src_compile() {
 	sed -i -e "s/#include <stdio.h>/&\n#include <stdlib.h>/" delay.c
-	./configure \
+	econf \
 		--host=${CHOST} \
 		--prefix=/usr \
 		--infodir=/usr/share/info \
Comment 2 bob5972 2009-04-07 18:18:17 UTC
Created attachment 187624 [details, diff]
Ebuild Patch

Actually, I didn't really understand the problem.

This should fix it for real, so it uses i686-pc-linux-gnu-gcc

--- delay-1.6.ebuild	2008-03-26 12:05:23.000000000 -0700
+++ delay-1.6-r1.ebuild	2009-04-07 11:10:33.000000000 -0700
@@ -2,6 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/app-misc/delay/delay-1.6.ebuild,v 1.16 2008/03/26 18:47:31 armin76 Exp $
 
+inherit toolchain-funcs
+
 DESCRIPTION="sleeplike program that counts down the number of seconds specified"
 HOMEPAGE="http://onegeek.org/~tom/software/delay/"
 SRC_URI="http://onegeek.org/~tom/software/delay/dl/${P}.tar.gz"
@@ -15,7 +17,8 @@
 
 src_compile() {
 	sed -i -e "s/#include <stdio.h>/&\n#include <stdlib.h>/" delay.c
-	./configure \
+	tc-export CC
+	econf \
 		--host=${CHOST} \
 		--prefix=/usr \
 		--infodir=/usr/share/info \
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-10 03:40:28 UTC
thx, applied. no version bump.