From 4bb30370dd547ccfbec9086a9912456d90aa93df Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 17 Oct 2015 11:05:21 +0200 Subject: [PATCH] xbps-src: set up C{,XX}FLAGS and LDFLAGS correctly for cross compilation. This way there's no need to set LDFLAGS per-pkg just to fix cross compilation in multiple packages. --- common/environment/build/cross.sh | 1 + common/environment/configure/cross.sh | 5 +++++ 2 files changed, 6 insertions(+) create mode 120000 common/environment/build/cross.sh create mode 100644 common/environment/configure/cross.sh diff --git a/common/environment/build/cross.sh b/common/environment/build/cross.sh new file mode 120000 index 00000000000..43f6c48d9c8 --- /dev/null +++ b/common/environment/build/cross.sh @@ -0,0 +1 @@ +../configure/cross.sh \ No newline at end of file diff --git a/common/environment/configure/cross.sh b/common/environment/configure/cross.sh new file mode 100644 index 00000000000..d788729ae07 --- /dev/null +++ b/common/environment/configure/cross.sh @@ -0,0 +1,5 @@ +if [ -n "$CROSS_BUILD" ]; then + CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include" + CXXFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/usr/lib" +fi