summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@free.fr>2013-01-20 12:58:22 (GMT)
committerwilly tarreau <w@1wt.eu>2013-01-20 12:58:22 (GMT)
commit150f500426b4bfe1c4b037c40d989a81aa3b6f9c (patch)
treef9907ed44a9f67e65b8ae8482ff197b13275197e /scripts/build
parentd82f1c6f2a86707ebcfe134cb600b382cb00cc65 (diff)
arch: allow adding a suffix to the arch-part of a tuple
For some architectures, it is legit to have an alternate value in the 'architecture' part of the tuple. For example: armv5te-* armv7a8-* Besides, some packages expect the tuple to reflect the arch variant (eg. openMPI) to detect the variant's capabilities (eg. atomic primitives). This patch adds an option for the user to specify a suffix to be added to the arch-part of the tuple. Signed-off-by: Willy Tarreau <w@1wt.eu> Message-ID: <20130120225822.GS6838@1wt.eu> Patch-Id: 213994 [yann.morin.1998@free.fr: make it a suffix, not an override] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/arch/alpha.sh2
-rw-r--r--scripts/build/arch/arm.sh2
-rw-r--r--scripts/build/arch/avr32.sh3
-rw-r--r--scripts/build/arch/blackfin.sh2
-rw-r--r--scripts/build/arch/microblaze.sh2
-rw-r--r--scripts/build/arch/mips.sh10
-rw-r--r--scripts/build/arch/powerpc.sh2
-rw-r--r--scripts/build/arch/s390.sh2
-rw-r--r--scripts/build/arch/sh.sh2
-rw-r--r--scripts/build/arch/sparc.sh2
-rw-r--r--scripts/build/arch/x86.sh2
11 files changed, 14 insertions, 17 deletions
diff --git a/scripts/build/arch/alpha.sh b/scripts/build/arch/alpha.sh
index 7a50335..cf6d40d 100644
--- a/scripts/build/arch/alpha.sh
+++ b/scripts/build/arch/alpha.sh
@@ -2,5 +2,5 @@
CT_DoArchTupleValues () {
# The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_ALPHA_VARIANT}"
+ CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${CT_ARCH_ALPHA_VARIANT}}"
}
diff --git a/scripts/build/arch/arm.sh b/scripts/build/arch/arm.sh
index 2c9be91..f111b03 100644
--- a/scripts/build/arch/arm.sh
+++ b/scripts/build/arch/arm.sh
@@ -2,7 +2,7 @@
CT_DoArchTupleValues() {
# The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH}${target_endian_eb}"
+ CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_eb}}"
# The system part of the tuple:
case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
diff --git a/scripts/build/arch/avr32.sh b/scripts/build/arch/avr32.sh
index 03843a7..2faf8d8 100644
--- a/scripts/build/arch/avr32.sh
+++ b/scripts/build/arch/avr32.sh
@@ -1,9 +1,6 @@
# Compute AVR32-specific values
CT_DoArchTupleValues() {
- # The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH}"
-
# gcc ./configure flags
CT_ARCH_WITH_ARCH=
CT_ARCH_WITH_ABI=
diff --git a/scripts/build/arch/blackfin.sh b/scripts/build/arch/blackfin.sh
index e707617..768b07a 100644
--- a/scripts/build/arch/blackfin.sh
+++ b/scripts/build/arch/blackfin.sh
@@ -2,7 +2,7 @@
CT_DoArchTupleValues() {
# The architecture part of the tuple:
- CT_TARGET_ARCH="bfin"
+ CT_TARGET_ARCH="bfin${CT_ARCH_SUFFIX}"
# gcc ./configure flags
CT_ARCH_WITH_ARCH=
diff --git a/scripts/build/arch/microblaze.sh b/scripts/build/arch/microblaze.sh
index 2dc810a..456a6e3 100644
--- a/scripts/build/arch/microblaze.sh
+++ b/scripts/build/arch/microblaze.sh
@@ -2,7 +2,7 @@
CT_DoArchTupleValues () {
# The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
+ CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_el}}"
# gcc ./configure flags
CT_ARCH_WITH_ARCH=
diff --git a/scripts/build/arch/mips.sh b/scripts/build/arch/mips.sh
index f7b7e3b..97a077f 100644
--- a/scripts/build/arch/mips.sh
+++ b/scripts/build/arch/mips.sh
@@ -1,13 +1,13 @@
# Compute MIPS-specific values
CT_DoArchTupleValues() {
- # The architecture part of the tuple, override only for 64-bit
+ local _64
+
+ # The architecture part of the tuple
if [ "${CT_ARCH_64}" = "y" ]; then
- CT_TARGET_ARCH="mips64${target_endian_el}"
- else
- # The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
+ _64="64"
fi
+ CT_TARGET_ARCH="${CT_ARCH}${_64}${CT_ARCH_SUFFIX:-${target_endian_el}}"
# Override CFLAGS for endianness:
case "${CT_ARCH_ENDIAN}" in
diff --git a/scripts/build/arch/powerpc.sh b/scripts/build/arch/powerpc.sh
index ead91dc..e5ad335 100644
--- a/scripts/build/arch/powerpc.sh
+++ b/scripts/build/arch/powerpc.sh
@@ -3,7 +3,7 @@
CT_DoArchTupleValues () {
# The architecture part of the tuple, override only for 64-bit
if [ "${CT_ARCH_64}" = "y" ]; then
- CT_TARGET_ARCH="powerpc64"
+ CT_TARGET_ARCH="powerpc64${CT_ARCH_SUFFIX}"
fi
# Only override values when ABI is not the default
diff --git a/scripts/build/arch/s390.sh b/scripts/build/arch/s390.sh
index 3c865e3..b4b8078 100644
--- a/scripts/build/arch/s390.sh
+++ b/scripts/build/arch/s390.sh
@@ -3,6 +3,6 @@
CT_DoArchTupleValues() {
# That's the only thing to override
if [ "${CT_ARCH_64}" = "y" ]; then
- CT_TARGET_ARCH="s390x"
+ CT_TARGET_ARCH="s390x${CT_ARCH_SUFFIX}"
fi
}
diff --git a/scripts/build/arch/sh.sh b/scripts/build/arch/sh.sh
index c7ac492..7780e40 100644
--- a/scripts/build/arch/sh.sh
+++ b/scripts/build/arch/sh.sh
@@ -2,7 +2,7 @@
CT_DoArchTupleValues () {
# The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${target_endian_eb}"
+ CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${CT_ARCH_SUFFIX:-${target_endian_eb}}"
# gcc ./configure flags
CT_ARCH_WITH_ARCH=
diff --git a/scripts/build/arch/sparc.sh b/scripts/build/arch/sparc.sh
index a4d6201..6fa3877 100644
--- a/scripts/build/arch/sparc.sh
+++ b/scripts/build/arch/sparc.sh
@@ -2,7 +2,7 @@
CT_DoArchTupleValues() {
# That's the only thing to override
if [ "${CT_ARCH_64}" = "y" ]; then
- CT_TARGET_ARCH="${CT_ARCH}64"
+ CT_TARGET_ARCH="sparc64${CT_ARCH_SUFFIX}"
fi
}
diff --git a/scripts/build/arch/x86.sh b/scripts/build/arch/x86.sh
index f41a81d..69407db 100644
--- a/scripts/build/arch/x86.sh
+++ b/scripts/build/arch/x86.sh
@@ -3,7 +3,6 @@
# This one really needs a little love! :-(
CT_DoArchTupleValues() {
-
# Override the architecture part of the tuple:
if [ "${CT_ARCH_64}" = "y" ]; then
CT_TARGET_ARCH=x86_64
@@ -20,4 +19,5 @@ CT_DoArchTupleValues() {
*) CT_TARGET_ARCH=i586;;
esac
fi
+ CT_TARGET_ARCH="${CT_TARGET_ARCH}${CT_ARCH_SUFFIX}"
}