Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455196 - app-emulation/xen-pvgrub does not respect CC
Summary: app-emulation/xen-pvgrub does not respect CC
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xen Devs
Depends on:
Blocks: tc-directly
  Show dependency tree
Reported: 2013-02-02 21:13 UTC by Agostino Sarubbo
Modified: 2013-02-19 19:57 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2013-02-02 21:13:24 UTC
You receive this bug because this package does not respect my system's CC ( x86_64-pc-linux-gnu-gcc - /usr/bin/x86_64-pc-linux-gnu-gcc ) and calls directly gcc -/usr/bin/gcc
The possible solutions to fix this issue are:
1)Fix the buildsystem, if you can
2)inherit toolchain-funcs and use tc-export CC
3)inherit toolchain-funcs and use emake CC="$(tc-getCC)"
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2013-02-04 04:35:29 UTC
added CC="$(tc-getCC)" to last instance of emake in src_compile previously overlooked. 

test & confirm & close accordingly
Comment 2 Tomoatsu Shimada 2013-02-07 03:03:44 UTC
Looks like xen-4.2.1/stubdom/Makefile needs this patch or it causes an error when determined cc has any options (e.g. x86_64-pc-linux-gnu-gcc -m32).

--- Makefile.orig	2013-02-07 02:53:01.420000000 +0000
+++ Makefile	2013-02-07 02:53:24.620000000 +0000
@@ -130,7 +130,7 @@
 cross-zlib: $(ZLIB_STAMPFILE)
 	( cd $< && \
-	  CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \
+	  CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC="$(CC)" ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \
 	  $(MAKE) DESTDIR= libz.a && \
 	  $(MAKE) DESTDIR= install )
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2013-02-10 08:22:26 UTC
ok Thx Tomoatsu Shimada. I have added (re-made) your suggested patch and given it a test run, and it builds fine.  
Now, what's your take on the added CC="$(tc-getCC)" in

emake CC="$(tc-getCC)" XEN_TARGET_ARCH="x86_32"

now line 98 of the ebuild of xen-pvgrub-4.2.1-r1?  i.e. Is it required?
Comment 4 Tomoatsu Shimada 2013-02-10 10:12:23 UTC
I'm afraid I have no idea since what I realized was just that $(CC) needed to be quoted with "" in my case.
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2013-02-10 11:30:18 UTC
ok thanks anyway
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2013-02-19 19:57:57 UTC
This is now fixed in both stable and testing xen-pvgrub with addition of recommended fix in comment 2 in all emake calls in both arches