+2019-08-13 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.c (machopic_indirect_call_target): Rename symbol stub
+ flag.
+ (darwin_override_options): Likewise.
+ * config/darwin.h: Likewise.
+ * config/darwin.opt: Likewise.
+ * config/i386/i386.c (output_pic_addr_const): Likewise.
+ * config/rs6000/darwin.h: Likewise.
+ * config/rs6000/rs6000.c (rs6000_call_darwin_1): Likewise.
+ * config/i386/darwin.h (TARGET_MACHO_PICSYM_STUBS): Rename to ...
+ ... this TARGET_MACHO_SYMBOL_STUBS.
+ (FUNCTION_PROFILER):Likewise.
+ * config/i386/i386.h: Likewise.
+
2019-08-13 Uroš Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (ix86_expand_vector_extract) <case E_V2SImode>:
rtx
machopic_indirect_call_target (rtx target)
{
- if (! darwin_picsymbol_stubs)
+ if (! darwin_symbol_stubs)
return target;
if (GET_CODE (target) != MEM)
Linkers that don't need stubs, don't need the EH symbol markers either.
*/
- if (!global_options_set.x_darwin_picsymbol_stubs)
+ if (!global_options_set.x_darwin_symbol_stubs)
{
if (darwin_target_linker)
{
if (strverscmp (darwin_target_linker, MIN_LD64_OMIT_STUBS) < 0)
{
- darwin_picsymbol_stubs = true;
+ darwin_symbol_stubs = true;
ld_needs_eh_markers = true;
}
}
/* If we don't know the linker version and we're targeting an old
system, we know no better than to assume the use of an earlier
linker. */
- darwin_picsymbol_stubs = true;
+ darwin_symbol_stubs = true;
ld_needs_eh_markers = true;
}
}
- else if (DARWIN_X86 && darwin_picsymbol_stubs && TARGET_64BIT)
+ else if (DARWIN_X86 && darwin_symbol_stubs && TARGET_64BIT)
{
inform (input_location,
"%<-mpic-symbol-stubs%> is not required for 64b code (ignored)");
- darwin_picsymbol_stubs = false;
+ darwin_symbol_stubs = false;
}
if (generating_for_darwin_version >= 9)
_tested_ version known to support this so far. */
#define MIN_LD64_NO_COAL_SECTS "236.4"
-/* From at least version 62.1, ld64 can build PIC indirection stubs as
+/* From at least version 62.1, ld64 can build symbol indirection stubs as
needed, and there is no need for the compiler to emit them. */
#define MIN_LD64_OMIT_STUBS "62.1"
Target RejectNegative Report Var(darwin_one_byte_bool)
Set sizeof(bool) to 1.
-mpic-symbol-stubs
-Target Report Var(darwin_picsymbol_stubs) Init(0)
-Force generation of PIC symbol stubs.
+msymbol-stubs
+Target Report Var(darwin_symbol_stubs) Init(0)
+Force generation of external symbol indirection stubs.
; Some code-gen may be improved / adjusted if the linker is sufficiently modern.
mtarget-linker=
#define WCHAR_TYPE_SIZE 32
/* Generate pic symbol indirection stubs if this is true. */
-#undef TARGET_MACHO_PICSYM_STUBS
-#define TARGET_MACHO_PICSYM_STUBS (darwin_picsymbol_stubs)
+#undef TARGET_MACHO_SYMBOL_STUBS
+#define TARGET_MACHO_SYMBOL_STUBS (darwin_symbol_stubs)
/* For compatibility with OSX system tools, use the new style of pic stub
if this is set (default). */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
do { \
- if (TARGET_MACHO_PICSYM_STUBS \
+ if (TARGET_MACHO_SYMBOL_STUBS \
&& MACHOPIC_INDIRECT && !TARGET_64BIT) \
{ \
const char *name = machopic_mcount_stub_name (); \
break;
case SYMBOL_REF:
- if (TARGET_64BIT || ! TARGET_MACHO_PICSYM_STUBS)
+ if (TARGET_64BIT || ! TARGET_MACHO_SYMBOL_STUBS)
output_addr_const (file, x);
else
{
/* Replace MACH-O, ifdefs by in-line tests, where possible.
(a) Macros defined in config/i386/darwin.h */
#define TARGET_MACHO 0
-#define TARGET_MACHO_PICSYM_STUBS 0
+#define TARGET_MACHO_SYMBOL_STUBS 0
#define MACHOPIC_ATT_STUB 0
/* (b) Macros defined in config/darwin.h */
#define MACHO_DYNAMIC_NO_PIC_P 0
} \
while (0)
-/* Generate pic symbol stubs if this is true. */
-extern int darwin_emit_picsym_stub;
-
#define SUBTARGET_OVERRIDE_OPTIONS darwin_rs6000_override_options ()
#define C_COMMON_OVERRIDE_OPTIONS do { \
{
const char *name = XSTR (x, 0);
#if TARGET_MACHO
- if (darwin_picsymbol_stubs
+ if (darwin_symbol_stubs
&& MACHOPIC_INDIRECT
&& machopic_classify_symbol (x) == MACHOPIC_UNDEFINED_FUNCTION)
name = machopic_indirection_name (x, /*stub_p=*/true);
return NULL_TREE;
}
-/* Generate PIC and indirect symbol stubs. */
+/* Generate external symbol indirection stubs (PIC and non-PIC). */
void
machopic_output_stub (FILE *file, const char *symb, const char *stub)
if ((cookie_val & CALL_LONG) != 0
&& GET_CODE (func_desc) == SYMBOL_REF)
{
- /* FIXME: the longcall opt should not hang off picsymbol stubs. */
- if (darwin_picsymbol_stubs && TARGET_32BIT)
+ /* FIXME: the longcall opt should not hang off this flag, it is most
+ likely incorrect for kernel-mode code-generation. */
+ if (darwin_symbol_stubs && TARGET_32BIT)
make_island = true; /* Do nothing yet, retain the CALL_LONG flag. */
else
{
+2019-08-13 Iain Sandoe <iain@sandoe.co.uk>
+
+ * obj-c++.dg/stubify-1.mm: Rename symbol stub option.
+ * obj-c++.dg/stubify-2.mm: Likewise.
+ * objc.dg/stubify-1.m: Likewise.
+ * objc.dg/stubify-2.m: Likewise.
+
2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90563
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-Os -mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4 -mpic-symbol-stubs" } */
+/* { dg-options "-Os -mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4 -msymbol-stubs" } */
typedef struct objc_object { } *id ;
int x = 41 ;
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -mpic-symbol-stubs" } */
+/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -msymbol-stubs" } */
typedef struct objc_object { } *id ;
int x = 41 ;
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4 -mpic-symbol-stubs" } */
+/* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */
typedef struct objc_object { } *id ;
int x = 41 ;
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -mpic-symbol-stubs" } */
+/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4 -msymbol-stubs" } */
typedef struct objc_object { } *id ;
int x = 41 ;