Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 435708

Summary: sys-libs/libcap-2.22: fails to cross compile due to BUILD_CFLAGS not being setup
Product: Gentoo Linux Reporter: Ambroz Bizjak <ambrop7>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build output

Description Ambroz Bizjak 2012-09-21 01:06:28 UTC
libcap/Makefile contains this which builds a build tool:

_makenames: _makenames.c cap_names.list.h
        $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@

This fails when BUILD_CFLAGS is not defined. In that case, something makes BUILD_CFLAGS default to CFLAGS, and the native compiler is called with invalid options.

Reproducible: Always
Comment 1 Ambroz Bizjak 2012-09-21 01:07:12 UTC
Created attachment 324452 [details]
build output
Comment 2 Ambroz Bizjak 2012-09-21 01:10:48 UTC
Working fix:

 src_configure() {
        tc-export BUILD_CC CC AR RANLIB
+       export BUILD_CFLAGS="${BUILD_CFLAGS}"
 }

Note that just "export BUILD_CFLAGS" does not work.
Comment 3 SpanKY gentoo-dev 2012-09-22 18:38:18 UTC
should be all set now in the tree; thanks for the report!

Commit message: Export BUILD_CFLAGS and friends
http://sources.gentoo.org/sys-libs/libcap/libcap-2.22.ebuild?r1=1.11&r2=1.12