Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 369575 - net-proxy/haproxy: cross compile failed due to missing CC overriding
Summary: net-proxy/haproxy: cross compile failed due to missing CC overriding
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 20:12 UTC by Bertrand Jacquin
Modified: 2011-06-10 20:51 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2011-05-31 20:12:00 UTC
emake doesn't set tc-getCC, so host gcc is used, here is a fix :

-emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ${args} || die
+emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC ${CTARGET})" ${args} || die

Reproducible: Always

Steps to Reproduce:
1. i586-geode-linux-gnu-emerge -vat haproxy
2.
3.
Actual Results:  
>>> Compiling source in /usr/i586-geode-linux-gnu/tmp/portage/net-proxy/haproxy-1.4.8/work/haproxy-1.4.8 ...
make -j1 'CFLAGS=-Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-gnu/usr/include/ -I/usr/i586-geode-linux-gnu/include/' 'LDFLAGS=-L/usr/i586-geode-linux-gnu/lib -L/usr/i586-geode-linux-gnu/usr/lib' TARGET=linux26 USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 
gcc -Iinclude -Iebtree -Wall -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-gnu/usr/include/ -I/usr/i586-geode-linux-gnu/include/       -DCONFIG_HAP_LINUX_SPLICE -DTPROXY -DCONFIG_HAP_LINUX_TPROXY -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_EPOLL -DENABLE_SEPOLL -DNETFILTER -DUSE_GETSOCKNAME  -DCONFIG_HAPROXY_VERSION=\"1.4.8\" -DCONFIG_HAPROXY_DATE=\"2010/06/16\" \
      -DBUILD_TARGET='"linux26"' \
      -DBUILD_ARCH='""' \
      -DBUILD_CPU='"generic"' \
      -DBUILD_CC='"gcc"' \
      -DBUILD_CFLAGS='"-Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-gnu/usr/include/ -I/usr/i586-geode-linux-gnu/include/"' \
      -DBUILD_OPTIONS='"USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"' \
       -c -o src/haproxy.o src/haproxy.c
src/haproxy.c:1:0: error: CPU you selected does not support x86-64 instruction set
src/haproxy.c:1:0: error: CPU you selected does not support x86-64 instruction set
make: *** [src/haproxy.o] Error 1
emake failed
Comment 1 Wormo (RETIRED) gentoo-dev 2011-06-01 19:46:03 UTC
Thanks for posting your cross-compile fix, assigning to haproxy maintainers
Comment 2 Christian Ruppert (idl0r) gentoo-dev 2011-06-02 09:38:50 UTC
hm, wouldn't be $(tc-getCC) be enough? Or is the CTARGET really necessary?
Comment 3 Bertrand Jacquin 2011-06-09 21:18:16 UTC
(In reply to comment #2)
> hm, wouldn't be $(tc-getCC) be enough? Or is the CTARGET really necessary?

Oh yes, you are definitely right, this was a test noise
Comment 4 Christian Ruppert (idl0r) gentoo-dev 2011-06-10 20:51:45 UTC
Fixed in CVS, thanks!
Re-sync in a few hours and try again :)