Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435708 - sys-libs/libcap-2.22: fails to cross compile due to BUILD_CFLAGS not being setup
Summary: sys-libs/libcap-2.22: fails to cross compile due to BUILD_CFLAGS not being setup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 01:06 UTC by Ambroz Bizjak
Modified: 2012-09-22 18:38 UTC (History)
0 users

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


Attachments
build output (log,3.32 KB, text/plain)
2012-09-21 01:07 UTC, Ambroz Bizjak
Details

Note You need to log in before you can comment on or make changes to this bug.
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