summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2017-10-06 23:06:45 +0200
committerDiego Biurrun <diego@biurrun.de>2017-11-15 13:29:41 +0100
commitd070b9b703a542429a13db9623109ae20474c775 (patch)
tree51084862933827264fbc5c7d2b82526b0f26c130 /configure
parent9e48de3cc86c732d9cebd496d6f0a2b7e7732754 (diff)
configure: Coalesce some arch configuration and PIC handling
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 11 insertions, 13 deletions
diff --git a/configure b/configure
index be9a3ee5cb..3bad7fb72c 100755
--- a/configure
+++ b/configure
@@ -2595,6 +2595,7 @@ pkg_config_default=pkg-config
ranlib="ranlib"
strip="strip"
version_script='--version-script'
+objformat="elf32"
# machine
arch_default=$(uname -m)
@@ -3766,45 +3767,42 @@ check_64bit(){
expr=$3
check_code cc "" "int test[2*($expr) - 1]" &&
subarch=$arch64 || subarch=$arch32
+ enable $subarch
}
case "$arch" in
aarch64|alpha|ia64)
- spic=$shared
+ enabled shared && enable_weak pic
;;
mips)
check_64bit mips mips64 '_MIPS_SIM > 1'
- spic=$shared
+ enabled shared && enable_weak pic
;;
parisc)
check_64bit parisc parisc64 'sizeof(void *) > 4'
- spic=$shared
+ enabled shared && enable_weak pic
;;
ppc)
check_64bit ppc ppc64 'sizeof(void *) > 4'
- spic=$shared
+ enabled shared && enable_weak pic
;;
s390)
check_64bit s390 s390x 'sizeof(void *) > 4'
- spic=$shared
+ enabled shared && enable_weak pic
;;
sparc)
check_64bit sparc sparc64 'sizeof(void *) > 4'
- spic=$shared
+ enabled shared && enable_weak pic
;;
x86)
check_64bit x86_32 x86_64 'sizeof(void *) > 4'
- if test "$subarch" = "x86_64"; then
- spic=$shared
+ if enabled x86_64; then
+ enabled shared && enable_weak pic
+ objformat=elf64
fi
;;
esac
-enable $subarch
-enabled spic && enable_weak pic
-
-enabled x86_64 && objformat=elf64 || objformat="elf32"
-
# OS specific
case $target_os in
aix)