} \
} while (0)
-#undef ASM_SPEC
-#define ASM_SPEC "-u %{maix64:-a64} %(asm_cpu)"
+#define ASM_SPEC32 "-a32"
+#define ASM_SPEC64 "-a64"
+#define ASM_SPEC_COMMON "-u %(asm_cpu)"
/* Common ASM definitions used by ASM_SPEC amongst the various targets for
handling -mcpu=xxx switches. There is a parallel list in driver-rs6000.c to
mcpu=620: -m620; \
mcpu=630: -m620; \
mcpu=970|mcpu=G5: -m970; \
- !mcpu*: %{mvsx: -mpwr6; \
- maltivec: -m970; \
- maix64|mpowerpc64: -mppc64; \
- : %(asm_default)}} \
+ !mcpu*: %(asm_default)} \
-many"
#undef ASM_DEFAULT_SPEC
} \
while (0)
-#undef CPP_SPEC
-#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
+#define CPP_SPEC32 ""
+#define CPP_SPEC64 "-D__64BIT__"
+#define CPP_SPEC_COMMON "%{posix: -D_POSIX_SOURCE} \
%{ansi: -D_ANSI_C_SOURCE} \
- %{maix64: -D__64BIT__} \
%{mpe: -I%R/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
/* The GNU C++ standard library requires that these macros be
defined. Synchronize with libstdc++ os_defines.h. */
-#undef CPLUSPLUS_CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC \
+#define CPLUSPLUS_CPP_SPEC_COMMON \
"-D_ALL_SOURCE -D__COMPATMATH__ \
- %{maix64: -D__64BIT__} \
%{mpe: -I%R/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
#undef RS6000_CPU
#undef TARGET_DEFAULT
+#ifdef RS6000_BI_ARCH
+#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT)
+#else
#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | MASK_MFCRF)
+#endif
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_POWER7
the target makefile fragment or if none of the options listed in
`MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
-#undef MULTILIB_DEFAULTS
+#undef MULTILIB_DEFAULTS
-#undef LIB_SPEC
-#define LIB_SPEC "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\
+#define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT)
+
+#define LIB_SPEC32 "%{!shared:%{g*:-lg}}"
+#define LIB_SPEC64 ""
+#define LIB_SPEC_COMMON "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\
%{p:-L%R/lib/profiled -L%R/usr/lib/profiled}\
- %{!maix64:%{!shared:%{g*:-lg}}}\
%{fprofile-arcs|fprofile-generate*|coverage:-lpthreads}\
%{mpe:-L%R/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
%{mlong-double-128:-lc128}\
%{pthread:-lpthreads} -lc"
-#undef LINK_SPEC
-#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
+#define LINK_SPEC32 "%{!shared:%{g*: %(link_libg) }} -b32"
+#define LINK_SPEC64 "-b64"
+#define LINK_SPEC_COMMON "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
- %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
- %{mpe:-binitfini:poe_remote_main}"
+ %{mpe:-binitfini:poe_remote_main} "
#undef STARTFILE_SPEC
+#if DEFAULT_ARCH64_P
+#define STARTFILE_SPEC "%{!shared:\
+ %{!maix32:%{pg:gcrt0_64%O%s;:%{p:mcrt0_64%O%s;:crt0_64%O%s}};:\
+ %{pthread:%{pg:gcrt0_r%O%s;:%{p:mcrt0_r%O%s;:crt0_r%O%s}};:\
+ %{pg:gcrt0%O%s;:%{p:mcrt0%O%s;:crt0%O%s}}}}}\
+ %{!maix32:%{shared:crtcxa_64_s%O%s;:crtcxa_64%O%s} crtdbase_64%O%s;:\
+ %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s}"
+#else
#define STARTFILE_SPEC "%{!shared:\
%{maix64:%{pg:gcrt0_64%O%s;:%{p:mcrt0_64%O%s;:crt0_64%O%s}};:\
%{pthread:%{pg:gcrt0_r%O%s;:%{p:mcrt0_r%O%s;:crt0_r%O%s}};:\
%{pg:gcrt0%O%s;:%{p:mcrt0%O%s;:crt0%O%s}}}}}\
- %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s"
+ %{maix64:%{shared:crtcxa_64_s%O%s;:crtcxa_64%O%s} crtdbase_64%O%s;:\
+ %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s}"
+#endif
+
+
+#undef ASM_SPEC
+#undef CPP_SPEC
+#undef CPLUSPLUS_CPP_SPEC
+#undef LIB_SPEC
+#undef LINK_SPEC
+
+#if DEFAULT_ARCH64_P
+#define ASM_SPEC "%{maix32:%(asm_spec32);:%(asm_spec64)} %(asm_spec_common)"
+#define CPP_SPEC "%{maix32:%(cpp_spec32);:%(cpp_spec64)} %(cpp_spec_common)"
+#define CPLUSPLUS_CPP_SPEC "%{maix32:%(cpp_spec32);:%(cpp_spec64)} %(cplusplus_cpp_spec_common)"
+#define LIB_SPEC "%{maix32:%(lib_spec32);:%(lib_spec64)} %(lib_spec_common)"
+#define LINK_SPEC "%{maix32:%(link_spec32);:%(link_spec64)} %(link_spec_common)"
+#else
+#define ASM_SPEC "%{maix64:%(asm_spec64);:%(asm_spec32)} %(asm_spec_common)"
+#define CPP_SPEC "%{maix64:%(cpp_spec64);:%(cpp_spec32)} %(cpp_spec_common)"
+#define CPLUSPLUS_CPP_SPEC "%{maix64:%(cpp_spec64);:%(cpp_spec32)} %(cplusplus_cpp_spec_common)"
+#define LIB_SPEC "%{maix64:%(lib_spec64);:%(lib_spec32)} %(lib_spec_common)"
+#define LINK_SPEC "%{maix64:%(link_spec64);:%(link_spec32)} %(link_spec_common)"
+#endif
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+ { "asm_spec_common", ASM_SPEC_COMMON }, \
+ { "asm_spec32", ASM_SPEC32 }, \
+ { "asm_spec64", ASM_SPEC64 }, \
+ { "cpp_spec_common", CPP_SPEC_COMMON }, \
+ { "cplusplus_cpp_spec_common", CPLUSPLUS_CPP_SPEC_COMMON }, \
+ { "cpp_spec32", CPP_SPEC32 }, \
+ { "cpp_spec64", CPP_SPEC64 }, \
+ { "lib_spec_common", LIB_SPEC_COMMON }, \
+ { "lib_spec32", LIB_SPEC32 }, \
+ { "lib_spec64", LIB_SPEC64 }, \
+ { "link_spec_common", LINK_SPEC_COMMON }, \
+ { "link_spec32", LINK_SPEC32 }, \
+ { "link_spec64", LINK_SPEC64 },
/* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */
+++ /dev/null
-/* Definitions of target machine for GNU compiler,
- for 64 bit powerpc linux defaulting to -m64.
- Copyright (C) 2003-2020 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#define RS6000_CPU(NAME, CPU, FLAGS)
-#include "rs6000-cpus.def"
-#undef RS6000_CPU
-
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ISA_2_6_MASKS_EMBEDDED | MASK_POWERPC64 | MASK_64BIT)
-#undef ASM_DEFAULT_SPEC
-#define ASM_DEFAULT_SPEC "-mpwr7"