Skip to content

Commit 4b77cf6

Browse files
committed
templates/1{0-autotools,2-autosetup}: pass also *_FOR_BUILD variables
Found in SQLite, this was the only way to make sure that the i686 toolchain was used whilst building sqlite+32.
1 parent 55a68be commit 4b77cf6

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

templates/10-autotools.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ build_autotools_configure() {
6868
true
6969
elif [[ "$ABHOST" = optenv* ]]
7070
then
71-
AUTOTOOLS_TARGET=("--host=${ARCH_TARGET[$ABHOST]}" "--target=${ARCH_TARGET[$ABHOST]}" "--build=${ARCH_TARGET[$ABHOST]}"
72-
"CC=$CC" "CXX=$CXX" "OBJC=$OBJC" "OBJCXX=$OBJCXX" LD="$LD")
71+
AUTOTOOLS_TARGET=("--host=${ARCH_TARGET[$ABHOST]}"
72+
"--target=${ARCH_TARGET[$ABHOST]}"
73+
"--build=${ARCH_TARGET[$ABHOST]}"
74+
"CC=$CC" "CC_FOR_BUILD=$CC"
75+
"CXX=$CXX" "CXX_FOR_BUILD=$CXX"
76+
"OBJC=$OBJC" "OBJC_FOR_BUILD=$OBJC"
77+
"OBJCXX=$OBJCXX" "OBJCXX_FOR_BUILD=$OBJCXX"
78+
"LD=$LD" "LD_FOR_BUILD=$LD")
7379
elif [[ "$ABHOST" != "$ABBUILD" ]]
7480
then
7581
AUTOTOOLS_TARGET=("--host=$HOST")

templates/12-autosetup.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ build_autosetup_configure() {
2626
AUTOSETUP_TARGET=("${AUTOTOOLS_TARGET[@]}")
2727
elif [[ "$ABHOST" = optenv* ]]
2828
then
29-
AUTOSETUP_TARGET=("--host=${ARCH_TARGET[$ABHOST]}" "--build=${ARCH_TARGET[$ABHOST]}"
30-
"CC=$CC" "CXX=$CXX" "OBJC=$OBJC" "OBJCXX=$OBJCXX" LD="$LD")
29+
AUTOSETUP_TARGET=("--host=${ARCH_TARGET[$ABHOST]}"
30+
"--build=${ARCH_TARGET[$ABHOST]}"
31+
"CC=$CC" "CC_FOR_BUILD=$CC"
32+
"CXX=$CXX" "CXX_FOR_BUILD=$CXX"
33+
"OBJC=$OBJC" "OBJC_FOR_BUILD=$OBJC"
34+
"OBJCXX=$OBJCXX" "OBJCXX_FOR_BUILD=$OBJCXX"
35+
"LD=$LD" "LD_FOR_BUILD=$LD")
3136
elif [[ "$ABHOST" != "$ABBUILD" ]]
3237
then
3338
AUTOSETUP_TARGET=("--host=$HOST")

0 commit comments

Comments
 (0)