# __cxa_atexit was introduced in Solaris 11.4.
default_use_cxa_atexit=yes
use_gcc_stdint=wrap
- if test x$gnu_ld = xyes; then
- tm_file="usegld.h ${tm_file}"
- fi
- if test x$gas = xyes; then
- tm_file="usegas.h ${tm_file}"
- fi
tm_p_file="${tm_p_file} sol2-protos.h"
tmake_file="${tmake_file} t-sol2 t-slibgcc"
c_target_objs="${c_target_objs} sol2-c.o"
use_gcc_stdint=wrap
;;
powerpc-*-eabisim*)
- tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
+ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
use_gcc_stdint=wrap
;;
powerpc-*-elf*)
- tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
+ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
;;
use_gcc_stdint=wrap
;;
powerpc-*-eabi*)
- tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
+ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
use_gcc_stdint=wrap
gas=yes
;;
powerpcle-*-elf*)
- tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
+ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
;;
powerpcle-*-eabisim*)
- tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
+ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
use_gcc_stdint=wrap
;;
powerpcle-*-eabi*)
- tm_file="${tm_file} elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
+ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
use_gcc_stdint=wrap
return;
}
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
if (HAVE_COMDAT_GROUP && flags & SECTION_LINKONCE)
{
solaris_elf_asm_comdat_section (name, flags, decl);
/* GNU as understands --32 and --64, but the native Solaris
assembler requires -xarch=generic or -xarch=generic64 instead. */
-#ifdef USE_GAS
+#if HAVE_GNU_AS
#define ASM_CPU32_DEFAULT_SPEC "--32"
#define ASM_CPU64_DEFAULT_SPEC "--64"
#else
#define ARCH64_SUBDIR "amd64"
-#ifdef USE_GLD
+#if HAVE_GNU_LD
#define ARCH32_EMULATION "elf_i386_sol2"
#define ARCH64_EMULATION "elf_x86_64_sol2"
#endif
} \
} while (0)
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
/* The Sun assembler uses .tcomm for TLS common sections. */
#define TLS_COMMON_ASM_OP ".tcomm"
ASM_OUTPUT_LABEL (FILE, NAME); \
} \
while (0)
-#endif /* !USE_GAS */
+#endif /* !HAVE_GNU_AS */
/* As in sparc/sol2.h, override the default from i386/x86-64.h to work
around Sun as TLS bug. */
/* Sun as requires "h" flag for large sections, GNU as can do without, but
accepts "l". */
-#ifdef USE_GAS
+#if HAVE_GNU_AS
#define MACH_DEP_SECTION_ASM_FLAG 'l'
#else
#define MACH_DEP_SECTION_ASM_FLAG 'h'
#endif
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
/* Emit COMDAT group signature symbols for Sun as. */
#undef TARGET_ASM_FILE_END
#define TARGET_ASM_FILE_END solaris_file_end
/* Unlike GNU ld, Sun ld doesn't coalesce .ctors.N/.dtors.N sections, so
inhibit their creation. Also cf. sparc/sysv4.h. */
-#ifndef USE_GLD
+#if !HAVE_GNU_LD
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors, \"aw\""
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors, \"aw\""
#endif
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
#define LARGECOMM_SECTION_ASM_OP "\t.lbcomm\t"
#endif
#undef ASM_EXTRA_SPEC
#define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
-#ifndef USE_GAS
+#ifndef HAVE_GNU_AS
#define AS_NEEDS_DASH_FOR_PIPED_INPUT
#endif
in that case, and for executable link with --{,no-}whole-archive around
it to force everything into the executable. */
-#ifndef USE_GLD
+#if !HAVE_GNU_LD
#define LD_WHOLE_ARCHIVE_OPTION "-z allextract"
#define LD_NO_WHOLE_ARCHIVE_OPTION "-z defaultextract"
#else
%{YP,*} \
%{R*}"
-#ifndef USE_GLD
+#if !HAVE_GNU_LD
#define LINK_ARCH_SPEC_1 \
"%{mcmodel=medlow:-M /usr/lib/ld/map.below4G} " LINK_ARCH_SPEC_BASE
#else
#define LINK_ARCH_SPEC_1 LINK_ARCH_SPEC_BASE
#endif
-#ifdef USE_GLD
+#if HAVE_GNU_LD
#if DEFAULT_ARCH32_P
#define ARCH_DEFAULT_EMULATION ARCH32_EMULATION
#else
{ "endfile_vtv", ENDFILE_VTV_SPEC }, \
SUBTARGET_CPU_EXTRA_SPECS
-#ifndef USE_GLD
+#if !HAVE_GNU_LD
/* With Sun ld, -rdynamic is a no-op. */
#define RDYNAMIC_SPEC ""
#else
#define RDYNAMIC_SPEC "--export-dynamic"
#endif
-#ifndef USE_GLD
+#if !HAVE_GNU_LD
/* Prefer native form with Solaris ld. */
#define SYSROOT_SPEC "-z sysroot=%R"
#endif
-#if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC)
+#if !HAVE_GNU_LD && defined(ENABLE_SHARED_LIBGCC)
/* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder. */
#define LINK_LIBGCC_MAPFILE_SPEC \
"%{shared|shared-libgcc:-M %slibgcc-unwind.map}"
#define USE_LD_AS_NEEDED 1
#endif
-#ifdef USE_GLD
+#if HAVE_GNU_LD
/* GNU ld needs --eh-frame-hdr to create the required .eh_frame_hdr sections. */
#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
#endif
-#ifdef USE_GLD
+#if HAVE_GNU_LD
/* Assert -z text by default to match Solaris ld. */
#define LD_PIE_SPEC "-pie %{!mimpure-text:-z text}"
#else
} \
while (0)
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
#undef TARGET_ASM_ASSEMBLE_VISIBILITY
#define TARGET_ASM_ASSEMBLE_VISIBILITY solaris_assemble_visibility
#define AS_SPARC32_FLAG ""
#define AS_SPARC64_FLAG ""
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
#undef ASM_ARCH32_SPEC
#define ASM_ARCH32_SPEC "-m32"
#undef ASM_ARCH64_SPEC
%{!mcpu*:%(asm_cpu_default)} \
"
-#ifdef USE_GLD
+#if HAVE_GNU_LD
#define ARCH32_EMULATION "elf32_sparc_sol2"
#define ARCH64_EMULATION "elf64_sparc_sol2"
#endif
/* Register the Solaris-specific #pragma directives. */
#define REGISTER_TARGET_PRAGMAS() solaris_register_pragmas ()
-#if defined(USE_GAS) && defined(HAVE_AS_TLS)
+#if HAVE_GNU_AS && defined(HAVE_AS_TLS)
/* Use GNU extensions to TLS support. */
#undef TARGET_SUN_TLS
#undef TARGET_GNU_TLS
} \
while (0)
-#ifndef USE_GAS
+#if !HAVE_GNU_AS
/* This is how to output an assembler line that says to advance
the location counter to a multiple of 2**LOG bytes using the
NOP instruction as padding. The filler pattern doesn't work
/* Sun as requires doublequoted section names on SPARC. While GNU as
supports that, too, we prefer the standard variant. */
#define SECTION_NAME_FORMAT "\"%s\""
-#endif /* !USE_GAS */
+#endif /* !HAVE_GNU_AS */
/* Undefine this so that attribute((init_priority)) works with GNU ld. */
-#ifdef USE_GLD
+#if HAVE_GNU_LD
#undef CTORS_SECTION_ASM_OP
#undef DTORS_SECTION_ASM_OP
#endif
+++ /dev/null
-/* Copyright (C) 2001-2025 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/>. */
-
-/* Just set a single flag we can test for it inside other files. */
-#define USE_GAS 1
+++ /dev/null
-#define USE_GLD 1
j++;
}
-#if defined(TARGET_SOLARIS) && !defined(USE_GLD)
+#if defined(TARGET_SOLARIS) && !HAVE_GNU_LD
/* We use a common symbol for go$zerovalue. On Solaris, when not
using the GNU linker, the Solaris linker needs an option to not
warn about this. Everything works without this option, but you