Commit d070b9b7 authored by Diego Biurrun's avatar Diego Biurrun

configure: Coalesce some arch configuration and PIC handling

parent 9e48de3c
...@@ -2595,6 +2595,7 @@ pkg_config_default=pkg-config ...@@ -2595,6 +2595,7 @@ pkg_config_default=pkg-config
ranlib="ranlib" ranlib="ranlib"
strip="strip" strip="strip"
version_script='--version-script' version_script='--version-script'
objformat="elf32"
# machine # machine
arch_default=$(uname -m) arch_default=$(uname -m)
...@@ -3766,45 +3767,42 @@ check_64bit(){ ...@@ -3766,45 +3767,42 @@ check_64bit(){
expr=$3 expr=$3
check_code cc "" "int test[2*($expr) - 1]" && check_code cc "" "int test[2*($expr) - 1]" &&
subarch=$arch64 || subarch=$arch32 subarch=$arch64 || subarch=$arch32
enable $subarch
} }
case "$arch" in case "$arch" in
aarch64|alpha|ia64) aarch64|alpha|ia64)
spic=$shared enabled shared && enable_weak pic
;; ;;
mips) mips)
check_64bit mips mips64 '_MIPS_SIM > 1' check_64bit mips mips64 '_MIPS_SIM > 1'
spic=$shared enabled shared && enable_weak pic
;; ;;
parisc) parisc)
check_64bit parisc parisc64 'sizeof(void *) > 4' check_64bit parisc parisc64 'sizeof(void *) > 4'
spic=$shared enabled shared && enable_weak pic
;; ;;
ppc) ppc)
check_64bit ppc ppc64 'sizeof(void *) > 4' check_64bit ppc ppc64 'sizeof(void *) > 4'
spic=$shared enabled shared && enable_weak pic
;; ;;
s390) s390)
check_64bit s390 s390x 'sizeof(void *) > 4' check_64bit s390 s390x 'sizeof(void *) > 4'
spic=$shared enabled shared && enable_weak pic
;; ;;
sparc) sparc)
check_64bit sparc sparc64 'sizeof(void *) > 4' check_64bit sparc sparc64 'sizeof(void *) > 4'
spic=$shared enabled shared && enable_weak pic
;; ;;
x86) x86)
check_64bit x86_32 x86_64 'sizeof(void *) > 4' check_64bit x86_32 x86_64 'sizeof(void *) > 4'
if test "$subarch" = "x86_64"; then if enabled x86_64; then
spic=$shared enabled shared && enable_weak pic
objformat=elf64
fi fi
;; ;;
esac esac
enable $subarch
enabled spic && enable_weak pic
enabled x86_64 && objformat=elf64 || objformat="elf32"
# OS specific # OS specific
case $target_os in case $target_os in
aix) aix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment