From 9a168e4463c337c01f343c9835d8ee0669400b4a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 11 Nov 2014 22:24:40 +0100 Subject: [PATCH] xbps-src: introduce XBPS_TRIPLET and set it in the build-profiles. This is for cases where host does not match build environment (x86_64 building for x86). So we just force build/host triplet in native builds. --- common/build-profiles/armv6l-musl.sh | 1 + common/build-profiles/armv6l.sh | 1 + common/build-profiles/armv7l-musl.sh | 1 + common/build-profiles/armv7l.sh | 1 + common/build-profiles/i686-musl.sh | 1 + common/build-profiles/i686.sh | 1 + common/build-profiles/x86_64-musl.sh | 1 + common/build-profiles/x86_64.sh | 1 + common/environment/configure/gnu-configure-args.sh | 2 ++ srcpkgs/gnutls/template | 3 --- 10 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/build-profiles/armv6l-musl.sh b/common/build-profiles/armv6l-musl.sh index ccb6765d619..554197906b2 100644 --- a/common/build-profiles/armv6l-musl.sh +++ b/common/build-profiles/armv6l-musl.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -fstack-protector -march=armv6 -mfpu=vfp -mfloat-abi=hard" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="armv6l-unknown-linux-musleabi" diff --git a/common/build-profiles/armv6l.sh b/common/build-profiles/armv6l.sh index ccdc79f4fcb..4385354359a 100644 --- a/common/build-profiles/armv6l.sh +++ b/common/build-profiles/armv6l.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -fstack-protector-strong -march=armv6 -mfpu=vfp -mfloat-abi=hard" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="armv6l-unknown-linux-gnueabihf" diff --git a/common/build-profiles/armv7l-musl.sh b/common/build-profiles/armv7l-musl.sh index 6f992895c18..2334672932e 100644 --- a/common/build-profiles/armv7l-musl.sh +++ b/common/build-profiles/armv7l-musl.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -fstack-protector -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="armv7l-unknown-linux-gnueabihf" diff --git a/common/build-profiles/armv7l.sh b/common/build-profiles/armv7l.sh index 75979b23745..7b4fd6d34c7 100644 --- a/common/build-profiles/armv7l.sh +++ b/common/build-profiles/armv7l.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -fstack-protector-strong -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="armv7l-unknown-linux-gnueabihf" diff --git a/common/build-profiles/i686-musl.sh b/common/build-profiles/i686-musl.sh index 3e55b0ed94f..f009f926f3f 100644 --- a/common/build-profiles/i686-musl.sh +++ b/common/build-profiles/i686-musl.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -mtune=i686 -fstack-protector" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_HOST_TRIPLET="i686-unknown-linux-musl" diff --git a/common/build-profiles/i686.sh b/common/build-profiles/i686.sh index d57bcb64dde..042575d8e17 100644 --- a/common/build-profiles/i686.sh +++ b/common/build-profiles/i686.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -mtune=i686 -fstack-protector-strong" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="i686-pc-linux-gnu" diff --git a/common/build-profiles/x86_64-musl.sh b/common/build-profiles/x86_64-musl.sh index 9d75b3f8b6a..cc8f13a4fb5 100644 --- a/common/build-profiles/x86_64-musl.sh +++ b/common/build-profiles/x86_64-musl.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -fstack-protector" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="x86_64-unknown-linux-musl" diff --git a/common/build-profiles/x86_64.sh b/common/build-profiles/x86_64.sh index f19bcfb52ee..89539659bc0 100644 --- a/common/build-profiles/x86_64.sh +++ b/common/build-profiles/x86_64.sh @@ -1,2 +1,3 @@ XBPS_CFLAGS="-O2 -pipe -fstack-protector-strong" XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_TRIPLET="x86_64-unknown-linux-gnu" diff --git a/common/environment/configure/gnu-configure-args.sh b/common/environment/configure/gnu-configure-args.sh index 19136728d96..846c9e99bb5 100644 --- a/common/environment/configure/gnu-configure-args.sh +++ b/common/environment/configure/gnu-configure-args.sh @@ -14,6 +14,8 @@ fi # Cross compilation vars if [ -z "$CROSS_BUILD" ]; then + . ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh + export configure_args+=" --host=$XBPS_TRIPLET --build=$XBPS_TRIPLET" return 0 fi diff --git a/srcpkgs/gnutls/template b/srcpkgs/gnutls/template index e8bdc40a777..491f254e923 100644 --- a/srcpkgs/gnutls/template +++ b/srcpkgs/gnutls/template @@ -5,9 +5,6 @@ revision=1 build_style=gnu-configure configure_args="--with-zlib --disable-guile --disable-static --disable-valgrind-tests --disable-rpath" -if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then - configure_args+=" --host=i686-pc-linux-gnu" -fi short_desc="GNU Transport Layer Security library" maintainer="Juan RP " homepage="http://www.gnu.org/software/gnutls/"