diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2020-12-16 22:26:18 +0000 |
---|---|---|
committer | Segher Boessenkool <segher@kernel.crashing.org> | 2020-12-16 22:54:51 +0000 |
commit | 2a4183234a45ba28db5ce16cf3ccdd70cdef3b7c (patch) | |
tree | 8d401a4130cb1f83378eab28e461727862a7831f /gcc | |
parent | e38c912700f001ea1c8a32533bedb4c802e38d3f (diff) | |
download | gcc-2a4183234a45ba28db5ce16cf3ccdd70cdef3b7c.zip gcc-2a4183234a45ba28db5ce16cf3ccdd70cdef3b7c.tar.gz gcc-2a4183234a45ba28db5ce16cf3ccdd70cdef3b7c.tar.bz2 |
rs6000: Add support for powerpc64le-unknown-freebsd
This implements support for powerpc64le architecture on FreeBSD. Since
we don't have powerpcle (32-bit), I did not add support for powerpcle
here. This remains to be changed if there is powerpcle support in the
future.
2020-12-15 Piotr Kubaj <pkubaj@FreeBSD.org>
gcc/
* config.gcc (powerpc*le-*-freebsd*): Add.
* configure.ac (powerpc*le-*-freebsd*): Ditto.
* configure: Regenerate.
* config/rs6000/freebsd64.h (ASM_SPEC_COMMON): Use ENDIAN_SELECT.
(DEFAULT_ASM_ENDIAN): Add little endian support.
(LINK_OS_FREEBSD_SPEC64): Ditto.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config.gcc | 4 | ||||
-rw-r--r-- | gcc/config/rs6000/freebsd64.h | 12 | ||||
-rwxr-xr-x | gcc/configure | 3 | ||||
-rw-r--r-- | gcc/configure.ac | 3 |
4 files changed, 19 insertions, 3 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 81b5523..70ecc51 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2866,6 +2866,10 @@ powerpc*-*-freebsd*) extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" case ${target} in + powerpc*le-*-*) + tm_file="${tm_file} rs6000/sysv4le.h" ;; + esac + case ${target} in powerpc64*) tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h" tmake_file="${tmake_file} rs6000/t-freebsd64" diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h index 4b2da57..390bc4b 100644 --- a/gcc/config/rs6000/freebsd64.h +++ b/gcc/config/rs6000/freebsd64.h @@ -99,8 +99,8 @@ extern int dot_symbols; #define ASM_SPEC64 "-a64" #define ASM_SPEC_COMMON "%(asm_cpu) \ -%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \ -%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}" +%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ + ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) #undef SUBSUBTARGET_EXTRA_SPECS #define SUBSUBTARGET_EXTRA_SPECS \ @@ -122,9 +122,15 @@ extern int dot_symbols; %{static:-Bstatic}} \ %{symbolic:-Bsymbolic}" +#undef DEFAULT_ASM_ENDIAN #define LINK_OS_FREEBSD_SPEC32 "-melf32ppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF - +#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +#define DEFAULT_ASM_ENDIAN " -mlittle" +#define LINK_OS_FREEBSD_SPEC64 "-melf64lppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF +#else +#define DEFAULT_ASM_ENDIAN " -mbig" #define LINK_OS_FREEBSD_SPEC64 "-melf64ppc_fbsd " LINK_OS_FREEBSD_SPEC_DEF +#endif #undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS { "m64" } diff --git a/gcc/configure b/gcc/configure index 9a27e45..eedd862 100755 --- a/gcc/configure +++ b/gcc/configure @@ -30185,6 +30185,9 @@ case "$target:$tm_file" in *-*-linux*) emul_name="-melf64ppc" ;; + *le-*-freebsd*) + emul_name="-melf64lppc_fbsd" + ;; *-*-freebsd*) emul_name="-melf64ppc_fbsd" ;; diff --git a/gcc/configure.ac b/gcc/configure.ac index 062f57f..ee982be 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -6274,6 +6274,9 @@ case "$target:$tm_file" in *-*-linux*) emul_name="-melf64ppc" ;; + *le-*-freebsd*) + emul_name="-melf64lppc_fbsd" + ;; *-*-freebsd*) emul_name="-melf64ppc_fbsd" ;; |