diff options
author | Yufeng Zhang <yufeng.zhang@arm.com> | 2013-07-23 12:12:53 +0000 |
---|---|---|
committer | Yufeng Zhang <yufeng@gcc.gnu.org> | 2013-07-23 12:12:53 +0000 |
commit | 17a819cb0d6becdfe32f6b26164fb14b77d96369 (patch) | |
tree | ba5fed4bf9a0db1ffa9273ecb836474c8c54c143 /gcc/config.gcc | |
parent | 9f9cbdcea607f6705cd25c5d34e2554dfa8fa074 (diff) | |
download | gcc-17a819cb0d6becdfe32f6b26164fb14b77d96369.zip gcc-17a819cb0d6becdfe32f6b26164fb14b77d96369.tar.gz gcc-17a819cb0d6becdfe32f6b26164fb14b77d96369.tar.bz2 |
[AArch64, ILP32] 1/6 Initial support - configury changes
gcc/
* config.gcc (aarch64*-*-*): Support --with-abi.
(aarch64*-*-elf): Support --with-multilib-list.
(aarch64*-*-linux*): Likewise.
(supported_defaults): Add abi to aarch64*-*-*.
* configure.ac: Mention AArch64 for --with-multilib-list.
* configure: Re-generated.
* config/aarch64/biarchilp32.h: New file.
* config/aarch64/biarchlp64.h: New file.
* config/aarch64/aarch64-elf.h (ENDIAN_SPEC): New define.
(ABI_SPEC): Ditto.
(MULTILIB_DEFAULTS): Ditto.
(DRIVER_SELF_SPECS): Ditto.
(ASM_SPEC): Update to also substitute -mabi.
* config/aarch64/aarch64-elf-raw.h (LINK_SPEC): Add linker script
file whose name depends on -mabi= and -mbig-endian.
* config/aarch64/aarch64.h (LONG_TYPE_SIZE): Change to depend on
TARGET_ILP32.
(POINTER_SIZE): New define.
(POINTERS_EXTEND_UNSIGNED): Ditto.
(enum aarch64_abi_type): New enumeration tag.
(AARCH64_ABI_LP64, AARCH64_ABI_ILP32): New enumerators.
(AARCH64_ABI_DEFAULT): Define to AARCH64_ABI_LP64 if undefined.
(TARGET_ILP32): New define.
* config/aarch64/aarch64.opt (mabi): New.
(aarch64_abi): New.
(ilp32, lp64): New values for -mabi.
* config/aarch64/t-aarch64 (comma): New define.
(MULTILIB_OPTIONS): Ditto.
(MULTILIB_DIRNAMES): Ditto.
* config/aarch64/t-aarch64-linux (MULTIARCH_DIRNAME): New define.
* doc/invoke.texi: Document -mabi for AArch64.
From-SVN: r201164
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 94c21c0..177677c 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -498,6 +498,26 @@ then fi case ${target} in +aarch64*-*-*) + case ${with_abi} in + "") + if test "x$with_multilib_list" = xilp32; then + tm_file="aarch64/biarchilp32.h ${tm_file}" + else + tm_file="aarch64/biarchlp64.h ${tm_file}" + fi + ;; + ilp32) + tm_file="aarch64/biarchilp32.h ${tm_file}" + ;; + lp64) + tm_file="aarch64/biarchlp64.h ${tm_file}" + ;; + *) + echo "Unknown ABI used in --with-abi=$with_abi" + exit 1 + esac + ;; i[34567]86-*-*) if test "x$with_abi" != x; then echo "This target does not support --with-abi." @@ -828,6 +848,22 @@ aarch64*-*-elf) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;; esac + aarch64_multilibs="${with_multilib_list}" + if test "$aarch64_multilibs" = "default"; then + aarch64_multilibs="lp64,ilp32" + fi + aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'` + for aarch64_multilib in ${aarch64_multilibs}; do + case ${aarch64_multilib} in + ilp32 | lp64 ) + TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}" + ;; + *) + echo "--with-multilib-list=${aarch64_multilib} not supported." + exit 1 + esac + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` ;; aarch64*-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h" @@ -838,6 +874,24 @@ aarch64*-*-linux*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;; esac + aarch64_multilibs="${with_multilib_list}" + if test "$aarch64_multilibs" = "default"; then + # TODO: turn on ILP32 multilib build after its support is mature. + # aarch64_multilibs="lp64,ilp32" + aarch64_multilibs="lp64" + fi + aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'` + for aarch64_multilib in ${aarch64_multilibs}; do + case ${aarch64_multilib} in + ilp32 | lp64 ) + TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}" + ;; + *) + echo "--with-multilib-list=${aarch64_multilib} not supported." + exit 1 + esac + done + TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` ;; alpha*-*-linux*) tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h" @@ -3158,7 +3212,7 @@ fi supported_defaults= case "${target}" in aarch64*-*-*) - supported_defaults="cpu arch" + supported_defaults="abi cpu arch" for which in cpu arch; do eval "val=\$with_$which" |