gcc/gcc/config/darwin.h

1051 lines
39 KiB
C
Raw Normal View History

Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Target definitions for Darwin (Mac OS X) systems.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004,
2005
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
Free Software Foundation, Inc.
Contributed by Apple Computer Inc.
2003-09-27 06:48:30 +02:00
This file is part of GCC.
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
2003-09-27 06:48:30 +02:00
GCC is free software; you can redistribute it and/or modify
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
2003-09-27 06:48:30 +02:00
GCC is distributed in the hope that it will be useful,
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
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
2003-09-27 06:48:30 +02:00
along with GCC; see the file COPYING. If not, write to
2005-06-25 03:22:41 +02:00
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#ifndef CONFIG_DARWIN_H
#define CONFIG_DARWIN_H
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* The definitions in this file are common to all processor types
running Darwin, which is the kernel for Mac OS X. Darwin is
basically a BSD user layer laid over a Mach kernel, then evolved
for many years (at NeXT) in parallel with other Unix systems. So
while the runtime is a somewhat idiosyncratic Mach-based thing,
other definitions look like they would for a BSD variant. */
/* Although NeXT ran on many different architectures, as of Jan 2001
the only supported Darwin targets are PowerPC and x86. */
/* One of Darwin's NeXT legacies is the Mach-O format, which is partly
like a.out and partly like COFF, with additional features like
multi-architecture binary support. */
#define OBJECT_FORMAT_MACHO
/* Suppress g++ attempt to link in the math library automatically. */
#define MATH_LIBRARY ""
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* We have atexit. */
#define HAVE_ATEXIT
/* Define an empty body for the function do_global_dtors() in libgcc2.c. */
#define DO_GLOBAL_DTORS_BODY
/* The string value for __SIZE_TYPE__. */
#ifndef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"
#endif
/* Type used for ptrdiff_t, as a string used in a declaration. */
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
/* wchar_t is int. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* Default to using the NeXT-style runtime, since that's what is
pre-installed on Darwin systems. */
#define NEXT_OBJC_RUNTIME
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions. */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0
/* This table intercepts weirdo options whose names would interfere
with normal driver conventions, and either translates them into
standardly-named options, or adds a 'Z' so that they can get to
specs processing without interference.
Do not expand a linker option to "-Xlinker -<option>", since that
forfeits the ability to control via spec strings later. However,
as a special exception, do this translation with -filelist, because
otherwise the driver will think there are no input files and quit.
(The alternative would be to hack the driver to recognize -filelist
specially, but it's simpler to use the translation table.)
Note that an option name with a prefix that matches another option
name, that also takes an argument, needs to be modified so the
prefix is different, otherwise a '*' after the shorter option will
darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. [gcc/ChangeLog] 2004-02-21 Ziemowit Laski <zlaski@apple.com> * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. * config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it. * config/rs6000/altivec.h: #error out if '-maltivec' not specified. (vector, pixel, bool): #define to __vector, __pixel and __bool. (__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific portion of header. (__altivec_link_error_invalid_argument): Remove prototype; will use __builtin_altivec_compiletime_error("vec_*") instead. (vec_*): Fix/complete set of available operation overloads given the existence of distinct 'vector bool ...' and 'vector pixel' types; tighten cv-correctness of pointer arguments; in C, always check for correct argument types before macro expansion. * config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro defining Darwin/PowerPC-specific '-f[no-]altivec' and '-W[no-]altivec-long-deprecated' switches. * config/rs6000/rs6000-c (rs6000_cpu_cpp_builtins): Pre-define '__vector', '__pixel' and '__bool' macros using '__attribute__((altivec(...)))' types. * config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node, bool_int_type_node, pixel_type_node, bool_V16QI_type_node, bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node): New type nodes. (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for handling '-W[no-]altivec-long-deprecated'. (rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'. (rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin, altivec_expand_dst_builtin): Remove casts from integer literals. (altivec_expand_builtin): Likewise; handle expansion of new '__builtin_altivec_compiletime_error' function. (rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel' types, and make them distinct from other vector types; register '__builtin_altivec_compiletime_error' function. (print_operand): For 'P', print a full target register name instead of merely its number. (rs6000_attribute_table): Add "altivec" attribute. (rs6000_handle_altivec_attribute): New function. * config/rs6000/rs6000.h (TARGET_OPTIONS): Describe '-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated' maps to). (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward declare. (ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration. [gcc/testsuite/ChangeLog] 2004-02-21 Ziemowit Laski <zlaski@apple.com> * g++.dg/ext/altivec-1.C: Generalize target triple. * g++.dg/ext/altivec-2.C: New test case. * g++.dg/ext/altivec_check.h: New file. * gcc.dg/altivec-1.c: Generalize target triple; include altivec_check.h and call altivec_check(). * gcc.dg/altivec-[2-5].c: Generalize target triple. * gcc.dg/altivec-6.c: New test case. * gcc.dg/altivec-[7-9].c: Generalize target triple; add type casts as needed. * gcc.dg/altivec-10.c: Include altivec_check.h and call altivec_check(). * gcc.dg/altivec-12.c: New test case. * gcc.dg/altivec-varargs-1.c: Generalize target triple; include altivec_check.h and call altivec_check(). * gcc.dg/altivec_check.h: New file. From-SVN: r78215
2004-02-21 10:08:37 +01:00
match with the longer one.
darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. [gcc/ChangeLog] 2004-02-21 Ziemowit Laski <zlaski@apple.com> * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. * config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it. * config/rs6000/altivec.h: #error out if '-maltivec' not specified. (vector, pixel, bool): #define to __vector, __pixel and __bool. (__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific portion of header. (__altivec_link_error_invalid_argument): Remove prototype; will use __builtin_altivec_compiletime_error("vec_*") instead. (vec_*): Fix/complete set of available operation overloads given the existence of distinct 'vector bool ...' and 'vector pixel' types; tighten cv-correctness of pointer arguments; in C, always check for correct argument types before macro expansion. * config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro defining Darwin/PowerPC-specific '-f[no-]altivec' and '-W[no-]altivec-long-deprecated' switches. * config/rs6000/rs6000-c (rs6000_cpu_cpp_builtins): Pre-define '__vector', '__pixel' and '__bool' macros using '__attribute__((altivec(...)))' types. * config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node, bool_int_type_node, pixel_type_node, bool_V16QI_type_node, bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node): New type nodes. (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for handling '-W[no-]altivec-long-deprecated'. (rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'. (rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin, altivec_expand_dst_builtin): Remove casts from integer literals. (altivec_expand_builtin): Likewise; handle expansion of new '__builtin_altivec_compiletime_error' function. (rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel' types, and make them distinct from other vector types; register '__builtin_altivec_compiletime_error' function. (print_operand): For 'P', print a full target register name instead of merely its number. (rs6000_attribute_table): Add "altivec" attribute. (rs6000_handle_altivec_attribute): New function. * config/rs6000/rs6000.h (TARGET_OPTIONS): Describe '-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated' maps to). (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward declare. (ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration. [gcc/testsuite/ChangeLog] 2004-02-21 Ziemowit Laski <zlaski@apple.com> * g++.dg/ext/altivec-1.C: Generalize target triple. * g++.dg/ext/altivec-2.C: New test case. * g++.dg/ext/altivec_check.h: New file. * gcc.dg/altivec-1.c: Generalize target triple; include altivec_check.h and call altivec_check(). * gcc.dg/altivec-[2-5].c: Generalize target triple. * gcc.dg/altivec-6.c: New test case. * gcc.dg/altivec-[7-9].c: Generalize target triple; add type casts as needed. * gcc.dg/altivec-10.c: Include altivec_check.h and call altivec_check(). * gcc.dg/altivec-12.c: New test case. * gcc.dg/altivec-varargs-1.c: Generalize target triple; include altivec_check.h and call altivec_check(). * gcc.dg/altivec_check.h: New file. From-SVN: r78215
2004-02-21 10:08:37 +01:00
The SUBTARGET_OPTION_TRANSLATE_TABLE macro, which _must_ be defined
in gcc/config/{i386,rs6000}/darwin.h, should contain any additional
command-line option translations specific to the particular target
architecture. */
#define TARGET_OPTION_TRANSLATE_TABLE \
{ "-all_load", "-Zall_load" }, \
{ "-allowable_client", "-Zallowable_client" }, \
{ "-arch_errors_fatal", "-Zarch_errors_fatal" }, \
{ "-bind_at_load", "-Zbind_at_load" }, \
{ "-bundle", "-Zbundle" }, \
{ "-bundle_loader", "-Zbundle_loader" }, \
{ "-weak_reference_mismatches", "-Zweak_reference_mismatches" }, \
{ "-dead_strip", "-Zdead_strip" }, \
{ "-no_dead_strip_inits_and_terms", "-Zno_dead_strip_inits_and_terms" }, \
{ "-dependency-file", "-MF" }, \
{ "-dylib_file", "-Zdylib_file" }, \
{ "-dynamic", "-Zdynamic" }, \
{ "-dynamiclib", "-Zdynamiclib" }, \
{ "-exported_symbols_list", "-Zexported_symbols_list" }, \
{ "-gfull", "-g -fno-eliminate-unused-debug-symbols" }, \
{ "-gused", "-g -feliminate-unused-debug-symbols" }, \
{ "-segaddr", "-Zsegaddr" }, \
{ "-segs_read_only_addr", "-Zsegs_read_only_addr" }, \
{ "-segs_read_write_addr", "-Zsegs_read_write_addr" }, \
{ "-seg_addr_table", "-Zseg_addr_table" }, \
{ "-seg_addr_table_filename", "-Zseg_addr_table_filename" }, \
{ "-filelist", "-Xlinker -filelist -Xlinker" }, \
Add framework support for darwin. * c-incpath.c: Include target.h and machmode.h. (add_path): Use a consistent style for cpp_dir. Initialize p->construct to 0. (add_cpp_dir_path): New. (register_include_chains): Add use of extra_includes callback. (hook_void_int): Add. (target_c_incpath): Add. * c-incpath.h (add_cpp_dir_path): New. (target_c_incpath_s): Add. (target_c_incpath): Add. (C_INCPATH_INIT): Add. * c-opts.c (c_common_missing_argument, c_common_handle_option): Add -F argument processing. * c.opt: Add -F argument processing. * gcc.c (trad_capable_cpp): Add -F argument processing. * cppfiles.c (find_file_in_dir): Update to use construct callback. (search_path_exhausted, cpp_get_path, cpp_get_buffer, cpp_get_prev): New. (_cpp_find_file): Use search_path_exhausted. (make_cpp_dir): Initialize construct to 0. * cpplib.h (missing_header_cb cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New. (cpp_callbacks): Add missing_header (cpp_dir): Add construct. * target-def.h: (TARGET_OPTF): New. * hooks.c (hook_void_int, hook_void_charptr): Add. * hooks.h (hook_void_int, hook_void_charptr): Add. * Makefile.in (c-incpath.o) : Add $(TARGET_H) and $(MACHMODE_H) dependencies. * doc/invoke.texi (Darwin Options): Document -F. * doc/tm.texi (TARGET_EXTRA_INCLUDES): Add. (TARGET_OPTF): Add. * fix-header.c (target_c_incpath): Add. * config/darwin-c.c: Add c-incpath.h include. (using_frameworks, find_subframework_file, find_subframework_header, add_system_framework_path, frameworks_in_use, num_frameworks, max_frameworks, add_framework, find_framework, struct framework_header, framework_header_dirs, framework_construct_pathname, find_subframework_file, add_system_framework_path, add_framework_path, framework_defaults, darwin_register_frameworks, find_subframework_header): Add. * config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New. (TARGET_OPTION_TRANSLATE_TABLE): Add -framework support. (CPP_SPEC): Add __APPLE_CC__ support. * t-darwin (darwin-c.o): Add c-incpath.h dependency. From-SVN: r78875
2004-03-04 01:18:54 +01:00
{ "-framework", "-Xlinker -framework -Xlinker" }, \
{ "-flat_namespace", "-Zflat_namespace" }, \
{ "-force_cpusubtype_ALL", "-Zforce_cpusubtype_ALL" }, \
{ "-force_flat_namespace", "-Zforce_flat_namespace" }, \
{ "-image_base", "-Zimage_base" }, \
{ "-init", "-Zinit" }, \
{ "-install_name", "-Zinstall_name" }, \
{ "-multiply_defined_unused", "-Zmultiplydefinedunused" }, \
{ "-multiply_defined", "-Zmultiply_defined" }, \
{ "-multi_module", "-Zmulti_module" }, \
{ "-static", "-static -Wa,-static" }, \
{ "-single_module", "-Zsingle_module" }, \
darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. [gcc/ChangeLog] 2004-02-21 Ziemowit Laski <zlaski@apple.com> * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Refer to SUBTARGET_OPTION_TRANSLATE_TABLE for architecture-specific options. * config/i386/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): Define it. * config/rs6000/altivec.h: #error out if '-maltivec' not specified. (vector, pixel, bool): #define to __vector, __pixel and __bool. (__un_args_eq, __bin_args_eq, __tern_args_eq): Move to C-specific portion of header. (__altivec_link_error_invalid_argument): Remove prototype; will use __builtin_altivec_compiletime_error("vec_*") instead. (vec_*): Fix/complete set of available operation overloads given the existence of distinct 'vector bool ...' and 'vector pixel' types; tighten cv-correctness of pointer arguments; in C, always check for correct argument types before macro expansion. * config/rs6000/darwin.h (SUBTARGET_OPTION_TRANSLATE_TABLE): New macro defining Darwin/PowerPC-specific '-f[no-]altivec' and '-W[no-]altivec-long-deprecated' switches. * config/rs6000/rs6000-c (rs6000_cpu_cpp_builtins): Pre-define '__vector', '__pixel' and '__bool' macros using '__attribute__((altivec(...)))' types. * config/rs6000/rs6000.c (bool_char_type_node, bool_short_type_node, bool_int_type_node, pixel_type_node, bool_V16QI_type_node, bool_V8HI_type_node, bool_V4SI_type_node, pixel_V8HI_type_node): New type nodes. (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): New, for handling '-W[no-]altivec-long-deprecated'. (rs6000_override_options): Handle '-W[no-]altivec-long-deprecated'. (rs6000_expand_binop_builtin, rs6000_expand_ternop_builtin, altivec_expand_dst_builtin): Remove casts from integer literals. (altivec_expand_builtin): Likewise; handle expansion of new '__builtin_altivec_compiletime_error' function. (rs6000_init_builtins): Initialize 'vector bool ...' and 'vector pixel' types, and make them distinct from other vector types; register '__builtin_altivec_compiletime_error' function. (print_operand): For 'P', print a full target register name instead of merely its number. (rs6000_attribute_table): Add "altivec" attribute. (rs6000_handle_altivec_attribute): New function. * config/rs6000/rs6000.h (TARGET_OPTIONS): Describe '-m[no-]-warn-altivec-long' (which '-W[no-]altivec-long-deprecated' maps to). (rs6000_warn_altivec_long, rs6000_warn_altivec_long_switch): Forward declare. (ALTIVEC_BUILTIN_COMPILETIME_ERROR): New built-in enumeration. [gcc/testsuite/ChangeLog] 2004-02-21 Ziemowit Laski <zlaski@apple.com> * g++.dg/ext/altivec-1.C: Generalize target triple. * g++.dg/ext/altivec-2.C: New test case. * g++.dg/ext/altivec_check.h: New file. * gcc.dg/altivec-1.c: Generalize target triple; include altivec_check.h and call altivec_check(). * gcc.dg/altivec-[2-5].c: Generalize target triple. * gcc.dg/altivec-6.c: New test case. * gcc.dg/altivec-[7-9].c: Generalize target triple; add type casts as needed. * gcc.dg/altivec-10.c: Include altivec_check.h and call altivec_check(). * gcc.dg/altivec-12.c: New test case. * gcc.dg/altivec-varargs-1.c: Generalize target triple; include altivec_check.h and call altivec_check(). * gcc.dg/altivec_check.h: New file. From-SVN: r78215
2004-02-21 10:08:37 +01:00
{ "-unexported_symbols_list", "-Zunexported_symbols_list" }, \
SUBTARGET_OPTION_TRANSLATE_TABLE
#define SUBTARGET_OS_CPP_BUILTINS() \
do \
{ \
if (flag_pic) \
builtin_define ("__PIC__"); \
} \
while (0)
/* These compiler options take n arguments. */
#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) ? 1 : \
!strcmp (STR, "Zallowable_client") ? 1 : \
!strcmp (STR, "arch") ? 1 : \
!strcmp (STR, "arch_only") ? 1 : \
!strcmp (STR, "Zbundle_loader") ? 1 : \
!strcmp (STR, "client_name") ? 1 : \
!strcmp (STR, "compatibility_version") ? 1 : \
!strcmp (STR, "current_version") ? 1 : \
!strcmp (STR, "Zdylib_file") ? 1 : \
!strcmp (STR, "Zexported_symbols_list") ? 1 : \
!strcmp (STR, "Zimage_base") ? 1 : \
!strcmp (STR, "Zinit") ? 1 : \
!strcmp (STR, "Zinstall_name") ? 1 : \
!strcmp (STR, "Zmultiplydefinedunused") ? 1 : \
!strcmp (STR, "Zmultiply_defined") ? 1 : \
!strcmp (STR, "precomp-trustfile") ? 1 : \
!strcmp (STR, "read_only_relocs") ? 1 : \
!strcmp (STR, "sectcreate") ? 3 : \
!strcmp (STR, "sectorder") ? 3 : \
!strcmp (STR, "Zsegaddr") ? 2 : \
!strcmp (STR, "Zsegs_read_only_addr") ? 1 : \
!strcmp (STR, "Zsegs_read_write_addr") ? 1 : \
!strcmp (STR, "Zseg_addr_table") ? 1 : \
!strcmp (STR, "Zseg_addr_table_filename") ?1 :\
!strcmp (STR, "seg1addr") ? 1 : \
!strcmp (STR, "segprot") ? 3 : \
!strcmp (STR, "sub_library") ? 1 : \
!strcmp (STR, "sub_umbrella") ? 1 : \
!strcmp (STR, "umbrella") ? 1 : \
!strcmp (STR, "undefined") ? 1 : \
!strcmp (STR, "Zunexported_symbols_list") ? 1 : \
!strcmp (STR, "Zweak_reference_mismatches") ? 1 : \
!strcmp (STR, "pagezero_size") ? 1 : \
!strcmp (STR, "segs_read_only_addr") ? 1 : \
!strcmp (STR, "segs_read_write_addr") ? 1 : \
!strcmp (STR, "sectalign") ? 3 : \
!strcmp (STR, "sectobjectsymbols") ? 2 : \
!strcmp (STR, "segcreate") ? 3 : \
!strcmp (STR, "dylinker_install_name") ? 1 : \
0)
Index: ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * config.gcc (*-*-darwin*): Only one target-specific header file for generic darwin. (powerpc-*-darwin*): Add version-specific header files. * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. * config.in: Regenerate. * configure: Regenerate. * gcc.c: Include xregex.h. (version_compare_spec_function): New. (spec_function): Add version-compare. (replace_outfile_spec_function): Reformat comment. (compare_version_strings): New. * config/darwin-c.c (version_as_macro): New. (builtin_define): New. (darwin_cpp_builtins): New. * config/darwin-protos.h (darwin_cpp_builtins): New. * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. (LIB_SPEC): Make unconditional, update comment. (TARGET_C99_FUNCTIONS): Define. * config/darwin.opt: Sort. (mmacosx-version-min=): New. * config/darwin7.h: Delete. * config/darwin8.h: Delete. * config/i386/darwin.h (): Call darwin_cpp_builtins. * config/rs6000/darwin.h (): Call darwin_cpp_builtins. (TARGET_C99_FUNCTIONS): Define. * config/rs6000/darwin7.h: New. * config/rs6000/darwin8.h: New. * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= (-mmacosx-version-min): Document. Index: testsuite/ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * gcc.dg/darwin-version-1.c: New. * gcc.dg/builtins-18.c: On Darwin, needs -mmacosx-version-min=10.3. * gcc.dg/builtins-20.c: Likewise. * gcc.dg/builtins-53.c: Likewise. * gcc.dg/torture/builtins-convert-1.c: Likewise. * gcc.dg/torture/builtins-convert-2.c: Likewise. * gcc.dg/torture/builtins-convert-3.c: Likewise. * gcc.dg/torture/builtins-power-1.c: Likewise. * gcc.dg/builtins-config.h: Complain if macosx-version-min not set on Darwin. From-SVN: r101753
2005-07-08 07:51:06 +02:00
/* Machine dependent cpp options. Don't add more options here, add
them to darwin_cpp_builtins in darwin-c.c. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef CPP_SPEC
Index: ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * config.gcc (*-*-darwin*): Only one target-specific header file for generic darwin. (powerpc-*-darwin*): Add version-specific header files. * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. * config.in: Regenerate. * configure: Regenerate. * gcc.c: Include xregex.h. (version_compare_spec_function): New. (spec_function): Add version-compare. (replace_outfile_spec_function): Reformat comment. (compare_version_strings): New. * config/darwin-c.c (version_as_macro): New. (builtin_define): New. (darwin_cpp_builtins): New. * config/darwin-protos.h (darwin_cpp_builtins): New. * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. (LIB_SPEC): Make unconditional, update comment. (TARGET_C99_FUNCTIONS): Define. * config/darwin.opt: Sort. (mmacosx-version-min=): New. * config/darwin7.h: Delete. * config/darwin8.h: Delete. * config/i386/darwin.h (): Call darwin_cpp_builtins. * config/rs6000/darwin.h (): Call darwin_cpp_builtins. (TARGET_C99_FUNCTIONS): Define. * config/rs6000/darwin7.h: New. * config/rs6000/darwin8.h: New. * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= (-mmacosx-version-min): Document. Index: testsuite/ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * gcc.dg/darwin-version-1.c: New. * gcc.dg/builtins-18.c: On Darwin, needs -mmacosx-version-min=10.3. * gcc.dg/builtins-20.c: Likewise. * gcc.dg/builtins-53.c: Likewise. * gcc.dg/torture/builtins-convert-1.c: Likewise. * gcc.dg/torture/builtins-convert-2.c: Likewise. * gcc.dg/torture/builtins-convert-3.c: Likewise. * gcc.dg/torture/builtins-power-1.c: Likewise. * gcc.dg/builtins-config.h: Complain if macosx-version-min not set on Darwin. From-SVN: r101753
2005-07-08 07:51:06 +02:00
#define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}"
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus
precomp, libtool, and fat build additions. Also we
don't specify a second %G after %L because libSystem is
self-contained and doesn't need to link against libgcc.a. */
/* In general, random Darwin linker flags should go into LINK_SPEC
instead of LINK_COMMAND_SPEC. The command spec is better for
specifying the handling of options understood by generic Unix
linkers, and for positional arguments like libraries. */
#define LINK_COMMAND_SPEC "\
%{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \
%l %X %{d} %{s} %{t} %{Z} \
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
%{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
%{!Zdynamiclib:%{!A:%{!nostdlib:%{!nostartfiles:%S}}}} \
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}"
/* Please keep the random linker options in alphabetical order (modulo
'Z' and 'no' prefixes). Options that can only go to one of libtool
or ld must be listed twice, under both !Zdynamiclib and
Zdynamiclib, with one of the cases reporting an error. */
/* Note that options taking arguments may appear multiple times on a
command line with different arguments each time, so put a * after
their names so all of them get passed. */
#define LINK_SPEC \
"%{static}%{!static:-dynamic} \
re PR libobjc/11572 (GNU libobjc no longer compiled on Darwin) 2004-09-15 Andrew Pinski <pinskia@physics.uc.edu> PR target/11572 * c-incpath.h (target_c_incpath_s): Add extra_pre_includes. Add two parameters to extra_includes. (C_INCPATH_INIT): Remove. * c-incpath.c (register_include_chains): Call extra_pre_includes before adding the standard include directory. Update call to extra_includes. (!defined TARGET_EXTRA_INCLUDES): Update hook_void_charptr_charptr_int and add !define TARGET_EXTRA_PRE_INCLUDES. (!define TARGET_EXTRA_INCLUDES): Define as hook_void_charptr_charptr_int. (!define TARGET_EXTRA_PRE_INCLUDES): Likewise. (target_c_incpath): Always declare. * fixinclude.c (defined TARGET_EXTRA_INCLUDES): Declare a empty function. (define TARGET_EXTRA_PRE_INCLUDES): Likewise. * config/darwin.h: (darwin_register_frameworks): Update for the two new parameters. (darwin_register_objc_includes): Add prototype. (TARGET_EXTRA_PRE_INCLUDES): Define. * config/darwin-c.c (darwin_register_objc_includes): New function. (darwin_register_frameworks): Update for the two new parameters. (target_c_incpath): Remove. * config/t-darwin (darwin-c.o): Add $(PREPROCESSOR_DEFINES) to the compile line. * doc/tm.texi (TARGET_EXTRA_INCLUDES): Document the two new parameters. (TARGET_EXTRA_PRE_INCLUDES): Document. * gcc.c (spec_function): Add replace-outfile. (replace_outfile_spec_function): New function. * config/darwin.h (LINK_SPEC): Add replace -lobjc with -lobjc-gnu if -fgnu-runtime is supplied. * invoke.texi (replace-outfile): Document. From-SVN: r87588
2004-09-16 08:49:59 +02:00
%{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)}\
%{!Zdynamiclib: \
%{Zforce_cpusubtype_ALL:-arch %(darwin_arch) -force_cpusubtype_ALL} \
%{!Zforce_cpusubtype_ALL:-arch %(darwin_subarch)} \
%{Zbundle:-bundle} \
%{Zbundle_loader*:-bundle_loader %*} \
%{client_name*} \
%{compatibility_version*:%e-compatibility_version only allowed with -dynamiclib\
} \
%{current_version*:%e-current_version only allowed with -dynamiclib} \
%{Zforce_flat_namespace:-force_flat_namespace} \
%{Zinstall_name*:%e-install_name only allowed with -dynamiclib} \
%{keep_private_externs} \
%{private_bundle} \
} \
%{Zdynamiclib: \
%{Zbundle:%e-bundle not allowed with -dynamiclib} \
%{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \
%{client_name*:%e-client_name not allowed with -dynamiclib} \
%{compatibility_version*} \
%{current_version*} \
%{Zforce_cpusubtype_ALL:-arch_only %(darwin_arch)} \
%{!Zforce_cpusubtype_ALL: -arch_only %(darwin_subarch)} \
%{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \
%{Zinstall_name*:-install_name %*} \
%{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \
%{private_bundle:%e-private_bundle not allowed with -dynamiclib} \
} \
%{Zall_load:-all_load}%{Zdynamiclib:%{!Zall_load:-noall_load}} \
%{Zallowable_client*:-allowable_client %*} \
%{Zbind_at_load:-bind_at_load} \
%{Zarch_errors_fatal:-arch_errors_fatal} \
%{Zdead_strip:-dead_strip} \
%{Zno_dead_strip_inits_and_terms:-no_dead_strip_inits_and_terms} \
%{Zdylib_file*:-dylib_file %*} \
%{Zdynamic:-dynamic}\
%{Zexported_symbols_list*:-exported_symbols_list %*} \
%{Zflat_namespace:-flat_namespace} \
%{headerpad_max_install_names*} \
%{Zimage_base*:-image_base %*} \
%{Zinit*:-init %*} \
%{mmacosx-version-min=*:-macosx_version_min %*} \
%{nomultidefs} \
%{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
%{Zmultiply_defined*:-multiply_defined %*} \
%{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
%{prebind} %{noprebind} %{nofixprebinding} %{prebind_all_twolevel_modules} \
%{read_only_relocs} \
%{sectcreate*} %{sectorder*} %{seg1addr*} %{segprot*} \
%{Zsegaddr*:-segaddr %*} \
%{Zsegs_read_only_addr*:-segs_read_only_addr %*} \
%{Zsegs_read_write_addr*:-segs_read_write_addr %*} \
%{Zseg_addr_table*: -seg_addr_table %*} \
%{Zseg_addr_table_filename*:-seg_addr_table_filename %*} \
%{sub_library*} %{sub_umbrella*} \
%{isysroot*:-syslibroot %*} \
%{twolevel_namespace} %{twolevel_namespace_hints} \
%{umbrella*} \
%{undefined*} \
%{Zunexported_symbols_list*:-unexported_symbols_list %*} \
%{Zweak_reference_mismatches*:-weak_reference_mismatches %*} \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
%{!Zweak_reference_mismatches*:-weak_reference_mismatches non-weak} \
%{X} \
%{y*} \
%{w} \
%{pagezero_size*} %{segs_read_*} %{seglinkedit} %{noseglinkedit} \
%{sectalign*} %{sectobjectsymbols*} %{segcreate*} %{whyload} \
%{whatsloaded} %{dylinker_install_name*} \
%{dylinker} %{Mach} "
Index: ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * config.gcc (*-*-darwin*): Only one target-specific header file for generic darwin. (powerpc-*-darwin*): Add version-specific header files. * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. * config.in: Regenerate. * configure: Regenerate. * gcc.c: Include xregex.h. (version_compare_spec_function): New. (spec_function): Add version-compare. (replace_outfile_spec_function): Reformat comment. (compare_version_strings): New. * config/darwin-c.c (version_as_macro): New. (builtin_define): New. (darwin_cpp_builtins): New. * config/darwin-protos.h (darwin_cpp_builtins): New. * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. (LIB_SPEC): Make unconditional, update comment. (TARGET_C99_FUNCTIONS): Define. * config/darwin.opt: Sort. (mmacosx-version-min=): New. * config/darwin7.h: Delete. * config/darwin8.h: Delete. * config/i386/darwin.h (): Call darwin_cpp_builtins. * config/rs6000/darwin.h (): Call darwin_cpp_builtins. (TARGET_C99_FUNCTIONS): Define. * config/rs6000/darwin7.h: New. * config/rs6000/darwin8.h: New. * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= (-mmacosx-version-min): Document. Index: testsuite/ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * gcc.dg/darwin-version-1.c: New. * gcc.dg/builtins-18.c: On Darwin, needs -mmacosx-version-min=10.3. * gcc.dg/builtins-20.c: Likewise. * gcc.dg/builtins-53.c: Likewise. * gcc.dg/torture/builtins-convert-1.c: Likewise. * gcc.dg/torture/builtins-convert-2.c: Likewise. * gcc.dg/torture/builtins-convert-3.c: Likewise. * gcc.dg/torture/builtins-power-1.c: Likewise. * gcc.dg/builtins-config.h: Complain if macosx-version-min not set on Darwin. From-SVN: r101753
2005-07-08 07:51:06 +02:00
/* Machine dependent libraries. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#define LIB_SPEC "%{!static:-lSystem}"
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
Index: ChangeLog 2005-09-28 Geoffrey Keating <geoffk@apple.com> * Makefile.tpl (BASE_TARGET_EXPORTS): Add LIPO, STRIP. (LIPO_FOR_TARGET): New. (CONFIGURED_LIPO_FOR_TARGET): New. (USUAL_LIPO_FOR_TARGET): New. (STRIP_FOR_TARGET): New. (CONFIGURED_STRIP_FOR_TARGET): New. (USUAL_STRIP_FOR_TARGET): New. * Makefile.def (flags_to_pass): Add LIPO_FOR_TARGET and STRIP_FOR_TARGET. * configure.in: Set LIPO_FOR_TARGET, STRIP_FOR_TARGET, CONFIGURED_LIPO_FOR_TARGET, CONFIGURED_STRIP_FOR_TARGET. * Makefile.in: Regenerate. * configure.in: Regenerate. Index: gcc/ChangeLog 2005-09-28 Geoffrey Keating <geoffk@apple.com> * Makefile.in: Export LIPO_FOR_TARGET, STRIP_FOR_TARGET. (stage1-start): Delete old libgcc and libunwind before moving anything into the stage directory. (stage2-start): Likewise. (stage3-start): Likewise. (stage4-start): Likewise. (stageprofile-start): Likewise. (stagefeedback-start): Likewise. * config.gcc (*-*-darwin*): Automatically use CPU-specific darwin.h header in tm_file and CPU-specific t-darwin in tmake_file. (i[34567]86-*-darwin*): Don't change tm_file. (powerpc-*-darwin*): Don't change tm_file or tmake_file. * config/darwin.h (REAL_LIBGCC_SPEC): Rewrite to use proper libgcc shared library stub for target OS version. * config/t-slibgcc-darwin (SHLIB_SOLINK): Delete. (SHLIB_LINK): Don't make SHLIB_SOLINK. (SHLIB_INSTALL): Don't install SHLIB_SOLINK. (libgcc_s.%.dylib): New. (LIBGCC): Define. (install-darwin-libgcc-stubs): New. (INSTALL_LIBGCC): New append. * config/i386/darwin-libgcc.10.4.ver: New. * config/i386/darwin-libgcc.10.5.ver: New. * config/i386/t-darwin: New. * config/rs6000/darwin-libgcc.10.4.ver: New. * config/rs6000/darwin-libgcc.10.5.ver: New. * config/rs6000/darwin.h (REAL_LIBGCC_SPEC): Delete. * config/rs6000/t-darwin (SHLIB_VERPFX): Define. From-SVN: r104747
2005-09-29 01:50:06 +02:00
/* -dynamiclib implies -shared-libgcc just like -shared would on linux.
Support -mmacosx-version-min by supplying different (stub) libgcc_s.dylib
libraries to link against. */
#undef REAL_LIBGCC_SPEC
#define REAL_LIBGCC_SPEC \
"%{static|static-libgcc:-lgcc -lgcc_eh; \
:%{shared-libgcc|Zdynamiclib \
:%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \
-lgcc; \
:-lgcc -lgcc_eh}}"
/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */
/* We don't want anything to do with crt2.o in the 64-bit case;
testing the PowerPC-specific -m64 flag here is a little irregular,
but it's overkill to make copies of this spec for each target
arch. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef STARTFILE_SPEC
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#define STARTFILE_SPEC \
"%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \
%{!static:%{object:-lgcrt0.o} \
%{!object:%{preload:-lgcrt0.o} \
%{!preload:-lgcrt1.o %{!m64: crt2.o%s}}}}} \
%{!pg:%{static:-lcrt0.o} \
%{!static:%{object:-lcrt0.o} \
%{!object:%{preload:-lcrt0.o} \
%{!preload:-lcrt1.o %{!m64: crt2.o%s}}}}}}}"
/* The native Darwin linker doesn't necessarily place files in the order
that they're specified on the link line. Thus, it is pointless
to put anything in ENDFILE_SPEC. */
/* #define ENDFILE_SPEC "" */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Default Darwin ASM_SPEC, very simple. */
#define ASM_SPEC "-arch %(darwin_arch) \
%{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL}"
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* We use Dbx symbol format. */
chorus.h: Consistently define *_DEBUGGING_INFO with the value 1. * config/chorus.h: Consistently define *_DEBUGGING_INFO with the value 1. Do not undef before defining. * config/darwin.h: Likewise. * config/dbx.h: Likewise. * config/dbxcoff.h: Likewise. * config/dbxelf.h: Likewise. * config/elfos.h: Likewise. * config/interix.h: Likewise. * config/lynx-ng.h: Likewise. * config/lynx.h: Likewise. * config/netware.h: Likewise. * config/psos.h: Likewise. * config/svr3.h: Likewise. * config/alpha/alpha.h: Likewise. * config/alpha/elf.h: Likewise. * config/alpha/vms.h: Likewise. * config/arc/arc.h: Likewise. * config/arm/aout.h: Likewise. * config/arm/coff.h: Likewise. * config/c4x/c4x.h: Likewise. * config/h8300/h8300.h: Likewise. * config/i386/cygwin.h: Likewise. * config/i386/djgpp.h: Likewise. * config/i386/gas.h: Likewise. * config/i386/gstabs.h: Likewise. * config/i386/i386-coff.h: Likewise. * config/i386/i386-interix.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3dbx.h: Likewise. * config/i386/sysv3.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/x86-64.h: Likewise. * config/i960/i960.h: Likewise. * config/ia64/ia64.h: Likewise. * config/ip2k/ip2k.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/3b1.h: Likewise. * config/m68k/3b1g.h: Likewise. * config/m68k/ccur-GAS.h: Likewise. * config/m68k/coff.h: Likewise. * config/m68k/hp2bsd.h: Likewise. * config/m68k/hp310g.h: Likewise. * config/m68k/hp320g.h: Likewise. * config/m68k/hp3bsd.h: Likewise. * config/m68k/hp3bsd44.h: Likewise. * config/m68k/linux-aout.h: Likewise. * config/m68k/m68k-aout.h: Likewise. * config/m68k/mot3300.h: Likewise. * config/m68k/netbsd.h: Likewise. * config/m68k/openbsd.h: Likewise. * config/m68k/pbb.h: Likewise. * config/m68k/plexus.h: Likewise. * config/m68k/sun2.h: Likewise. * config/m68k/sun3.h: Likewise. * config/m68k/tower-as.h: Likewise. * config/m68k/vxm68k.h: Likewise. * config/m88k/aout-dbx.h: Likewise. * config/m88k/m88k-aout.h: Likewise. * config/mcore/mcore-elf.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h: Likewise. * config/mips/elf64.h: Likewise. * config/mips/iris5gas.h: Likewise. * config/mips/iris6.h: Likewise. * config/mips/mips.h: Likewise. * config/mips/sni-gas.h: Likewise. * config/mmix/mmix.h: Likewise. * config/ns32k/netbsd.h: Likewise. * config/pa/pa64-hpux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/sh/coff.h: Likewise. * config/sh/elf.h: Likewise. * config/sparc/linux64.h: Likewise. * config/sparc/liteelf.h: Likewise. * config/sparc/netbsd.h: Likewise. * config/sparc/openbsd.h: Likewise. * config/sparc/pbd.h: Likewise. * config/sparc/sp64-elf.h: Likewise. * config/sparc/sp86x-elf.h: Likewise. * config/sparc/sparc.h: Likewise. * config/vax/vax.h: Likewise. * config/vax/vaxv.h: Likewise. From-SVN: r56667
2002-08-29 23:40:18 +02:00
#define DBX_DEBUGGING_INFO 1
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Also enable Dwarf 2 as an option. */
#define DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#define DEBUG_FRAME_SECTION "__DWARFA,__debug_frame,coalesced,no_toc+strip_static_syms"
#define DEBUG_INFO_SECTION "__DWARFA,__debug_info"
#define DEBUG_ABBREV_SECTION "__DWARFA,__debug_abbrev"
#define DEBUG_ARANGES_SECTION "__DWARFA,__debug_aranges"
#define DEBUG_MACINFO_SECTION "__DWARFA,__debug_macinfo"
#define DEBUG_LINE_SECTION "__DWARFA,__debug_line"
#define DEBUG_LOC_SECTION "__DWARFA,__debug_loc"
#define DEBUG_PUBNAMES_SECTION "__DWARFA,__debug_pubnames"
#define DEBUG_STR_SECTION "__DWARFA,__debug_str"
#define DEBUG_RANGES_SECTION "__DWARFA,__debug_ranges"
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* When generating stabs debugging, use N_BINCL entries. */
#define DBX_USE_BINCL
/* There is no limit to the length of stabs strings. */
#define DBX_CONTIN_LENGTH 0
/* gdb needs a null N_SO at the end of each file for scattered loading. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
dbxout.c (asmfile): Delete. * dbxout.c (asmfile): Delete. All uses changed to asm_out_file. (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE): Default to 0. (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined. When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit an internal label and an N_SLINE .stabn whose value is the difference between that label and the function entry label. (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined, but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a label and an N_SO stab with an empty string referring to it. (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE. (dbxout_type_methods, dbxout_symbol): Remove #if 0 block. (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this macro is never defined. * sdbout.c (sdbout_source_line_counter): Delete. (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition. (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes only two arguments. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE. * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs. * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro definitions (identical to default). * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h: Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not DBX_OUTPUT_MAIN_SOURCE_FILE_END. * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h: Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno. * config/alpha/alpha.c: Move declaration of num_source_filenames up. (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE. (sym_lineno): Delete. (alpha_output_filename): Do not emit N_SOL stabs here. Remove now-unused variable. (alpha_output_lineno): Delete. * config/mips/mips-protos.h: Don't prototype mips_output_lineno. * config/mips/mips.c (mips_output_filename): Don't use ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here. (mips_output_lineno): Delete. (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME. * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE. * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE. * config/mmix/mmix.h: Likewise. * config/mmix/mmix.c (mmix_asm_output_source_line): Delete. * config/mmix/mmix-protos.h: Don't prototype it. * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE; no need to #undef ASM_OUTPUT_SOURCE_LINE. * config/arm/aout.h: Remove RISCiX-specific definition of DBX_OUTPUT_MAIN_SOURCE_FILENAME. * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label. * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END. * doc/tm.texi: Update. From-SVN: r89357
2004-10-21 02:53:47 +02:00
#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
/* GCC's definition of 'one_only' is the same as its definition of 'weak'. */
#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
/* Mach-O supports 'weak imports', and 'weak definitions' in coalesced
sections. machopic_select_section ensures that weak variables go in
coalesced sections. Weak aliases (or any other kind of aliases) are
not supported. Weak symbols that aren't visible outside the .s file
are not supported. */
#define ASM_WEAKEN_DECL(FILE, DECL, NAME, ALIAS) \
do { \
if (ALIAS) \
{ \
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "alias definitions not supported in Mach-O; ignored"); \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
break; \
} \
\
if (! DECL_EXTERNAL (DECL) && TREE_PUBLIC (DECL)) \
targetm.asm_out.globalize_label (FILE, NAME); \
if (DECL_EXTERNAL (DECL)) \
fputs ("\t.weak_reference ", FILE); \
else if (! lookup_attribute ("weak", DECL_ATTRIBUTES (DECL)) \
&& lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL))) \
break; \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
else if (TREE_PUBLIC (DECL)) \
fputs ("\t.weak_definition ", FILE); \
else \
break; \
assemble_name (FILE, NAME); \
fputc ('\n', FILE); \
} while (0)
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
/* Darwin has the pthread routines in libSystem, which every program
links to, so there's no need for weak-ness for that. */
#define GTHREAD_USE_WEAK 0
/* The Darwin linker imposes two limitations on common symbols: they
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
can't have hidden visibility, and they can't appear in dylibs. As
a consequence, we should never use common symbols to represent
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
vague linkage. */
#undef USE_COMMON_FOR_ONE_ONLY
#define USE_COMMON_FOR_ONE_ONLY 0
/* The Darwin linker doesn't want coalesced symbols to appear in
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
a static archive's table of contents. */
#undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC
#define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
/* We make exception information linkonce. */
#undef TARGET_USES_WEAK_UNWIND_INFO
#define TARGET_USES_WEAK_UNWIND_INFO 1
/* We need to use a nonlocal label for the start of an EH frame: the
Darwin linker requires that a coalesced section start with a label. */
#undef FRAME_BEGIN_LABEL
#define FRAME_BEGIN_LABEL "EH_frame"
/* Emit a label for the FDE corresponding to DECL. EMPTY means
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
emit a label for an empty FDE. */
#define TARGET_ASM_EMIT_UNWIND_LABEL darwin_emit_unwind_label
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Our profiling scheme doesn't LP labels and counter words. */
linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. * config/rs6000/rs6000.c (output_profile_hook): Likewise. * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. Pass it to $gcc_cv_as. * configure: Rebuilt. * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. (print_operand): Allow TARGET_AIX to be non-constant. (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): Define unconditionally. (rs6000_elf_declare_function_name): New function. * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be non-constant. * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define to 1. (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ is defined. (TARGET_AIX): Define to 1 if TARGET_64BIT. (PROCESSOR_DEFAULT): Remove. (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both -m32 and -m64. (MULTILIB_DEFAULTS): Define. (SUBSUBTARGET_EXTRA_SPECS): Define. (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. (TARGET_TOC): Define only if !RS6000_BI_ARCH. (TARGET_NO_TOC): Remove. [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Define to 0. (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly if !TARGET_64BIT. (USER_LABEL_PREFIX): Remove. (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init if TARGET_64BIT. (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on TARGET_64BIT. (RS6000_CALL_GLUE): Likewise. (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, RESTORE_FP_SUFFIX): Likewise. (ASM_DECLARE_FUNCTION_NAME): Remove. (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function name if TARGET_64BIT. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and !TARGET_64BIT. (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. (DRAFT_V4_STRUCT_RET): Define. (SIGNAL_FRAMESIZE): New enum value. (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/default64.h: New file. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 options. (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc if !TARGET_64BIT. [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name function. (TARGET_OS_SYSV_CPP_BUILTINS): Define. (TARGET_OS_CPP_BUILTINS): Use it. (CPP_SYSV_SPEC): Remove. (CPP_SPEC): Remove cpp_sysv. (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. Add SUBSUBTARGET_EXTRA_SPECS. (SUBSUBTARGET_EXTRA_SPECS): Define. * config/rs6000/biarch64.h: New file. * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): New prototype. * config/rs6000/x-linux64: New file. * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float multilibs. * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. * config/rs6000/eabi-cn.asm: Likewise. * config/rs6000/tramp.asm: Likewise. * config/rs6000/sol-ci.asm: Likewise. * config/rs6000/sol-cn.asm: Likewise. * config/rs6000/linux.h (TARGET_64BIT): Define to 0. (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. * config/rs6000/ppc-asm.h: Move __powerpc64__ section before _CALL_AIXDESC section. * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs or default32. Co-Authored-By: Alan Modra <amodra@bigpond.net.au> From-SVN: r67442
2003-06-04 17:23:42 +02:00
#define NO_PROFILE_COUNTERS 1
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef INIT_SECTION_ASM_OP
#define INIT_SECTION_ASM_OP
#undef INVOKE__main
#define TARGET_ASM_CONSTRUCTOR machopic_asm_out_constructor
#define TARGET_ASM_DESTRUCTOR machopic_asm_out_destructor
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Always prefix with an underscore. */
#define USER_LABEL_PREFIX "_"
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Don't output a .file directive. That is only used by the assembler for
error reporting. */
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9. * config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9. * config/alpha/alpha.c (TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition. (alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK. * target.h: New hook asm_out.file_end. * target.h: Update to match. New hook macro TARGET_ASM_FILE_END. * toplev.c (compile_file: Use targetm.asm_out.file_end. * system.h: Poison ASM_FILE_END. * varasm.c (file_end_indicate_exec_stack): New. * output.h: Prototype it. * doc/tm.texi: Document TARGET_ASM_FILE_END and file_end_indicate_exec_stack. Delete references to attasm.h. * config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end. (ASM_FILE_END): Delete; move code... * config/darwin.c (darwin_file_end): Here; new function. * config/darwin-protos.h: Prototype it. * config/alpha/alpha.c (unicosmk_asm_file_end): Make static, rename unicosmk_file_end. * config/arm/aof.h (ASM_FILE_END): Delete; move code... * config/arm/arm.c (aof_file_end): ... here; new static function. Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER. Make aof_dump_imports and aof_dump_pic_table static. * config/avr/avr.c (asm_file_end): Rename avr_file_end, make static. Set TARGET_ASM_FILE_END to avr_file_end. * config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments. Set TARGET_ASM_FILE_END to c4x_file_end. * config/h8300/h8300.c (asm_file_end): Rename h8300_file_end, make static. Take no arguments. Set TARGET_ASM_FILE_END to h8300_file_end. * config/i370/i370.h (ASM_FILE_END): Delete; move code... * config/i370/i370.c (i370_file_end): ... here; new static function. Set TARGET_ASM_FILE_END to i370_file_end. * config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end. Take no arguments. Call file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END. * config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END. Define NEED_INDICATE_EXEC_STACK to 0. * config/i386/linux.h, config/i386/linux64.h: Redefine NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END. * config/i386/winnt.c (i386_pe_asm_file_end): Rename to i386_pe_file_end. Take no arguments. Use ix86_file_end. * config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to ia64_hpux_file_end, make static. Take no arguments. * config/ip2k/ip2k.c (asm_file_start, asm_file_end, commands_in_prologues, commands_in_epilogues): Delete. (function_epilogue): Update to match. * config/mips/mips.c (mips_asm_file_end): Rename mips_file_end, make static. Take no arguments. (iris6_asm_file_end): Rename iris6_file_end, make static, use mips_file_end, take no arguments. Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as appropriate. * config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end, make static, take no arguments. Set TARGET_ASM_FILE_END to mmix_file_end. * config/pa/pa.c (output_deferred_plabels): Make static, take no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels. * config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it. (ASM_FILE_END): Delete; move code... * config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here; new static function. * config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h * config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h: Don't set ASM_FILE_END. * config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h * config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h * config/sparc/linux64.h: Set TARGET_ASM_FILE_END to file_end_indicate_exec_stack; don't set ASM_FILE_END. * config/alpha/unicosmk.h, config/i386/cygming.h * config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END. * config/arm/arm-protos.h, config/alpha/alpha-protos.h * config/avr/avr-protos.h, config/c4x/c4x-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/ip2k/ip2k-protos.h, config/mips/mips-protos.h * config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update. From-SVN: r67591
2003-06-07 19:11:48 +02:00
#undef TARGET_ASM_FILE_END
#define TARGET_ASM_FILE_END darwin_file_end
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz> * expr.h (assemble_static_space): Update prototype. * output.h (assemble_zeros, output_constant): Likewise. * elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean * alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make it 64bit clean. * elf.h (ASM_OTUPUT_SKIP): Likewise. * unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise. * arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand. * aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand. * unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand. * avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand. * c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP, ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand. * aout.h (ASM_OTUPUT_SKIP): Likewise. * cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. * darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise. * dsp16xx.h (ASM_OTUPUT_SKIP): Likewise. * frv.h (ASM_OTUPUT_SKIP): Likewise. * h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise. * 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Make it 64bit clean. * att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand. * bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Make it 64bit clean. * darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean.. * sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect HOST_WIDE_INT operand * svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect HOST_WIDE_INT operand * sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand * i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand * ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * m32r.h (ASM_OUTPUT_COMMON): Likewise. * 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. * crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise. * hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Likewise. * sgs.h (ASM_OUTPUT_SKIP): Likewise. * tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Likewise. * m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Likewise. * mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise. * iris.h (ASM_OUTPUT_LOCAL): Likewise. * mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. * ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Make it 64bit clean. * pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it 64bit clean. * pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL, ASM_OUTPUT_SKIP): Make it 64bit clean. * hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it 64bit clean. * romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect HOST_WIDE_INT argument * s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument. * sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect HOST_WIDE_INT argument * sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument * sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument * svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument * vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument * vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument * xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument * varasm.c (asm_output_bss, asm_output_aligned_bss, asm_emit_uninitialized, assemble_zeros, assemble_static_space): HOST_WIDE_INT argument From-SVN: r66713
2003-05-12 11:51:36 +02:00
fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", SIZE)
/* Give ObjC methods pretty symbol names. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef OBJC_GEN_METHOD_LABEL
#define OBJC_GEN_METHOD_LABEL(BUF,IS_INST,CLASS_NAME,CAT_NAME,SEL_NAME,NUM) \
do { if (CAT_NAME) \
sprintf (BUF, "%c[%s(%s) %s]", (IS_INST) ? '-' : '+', \
(CLASS_NAME), (CAT_NAME), (SEL_NAME)); \
else \
sprintf (BUF, "%c[%s %s]", (IS_INST) ? '-' : '+', \
(CLASS_NAME), (SEL_NAME)); \
} while (0)
/* The RTTI data (e.g., __ti4name) is common and public (and static),
but it does need to be referenced via indirect PIC data pointers.
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
The machopic_define_symbol calls are telling the machopic subsystem
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
that the name *is* defined in this module, so it doesn't need to
make them indirect. */
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
const char *xname = NAME; \
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
if (! DECL_WEAK (DECL) \
&& ((TREE_STATIC (DECL) \
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|| DECL_INITIAL (DECL))) \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
machopic_define_symbol (DECL_RTL (DECL)); \
if ((TREE_STATIC (DECL) \
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|| DECL_INITIAL (DECL)) \
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
ASM_OUTPUT_LABEL (FILE, xname); \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
/* Darwin doesn't support zero-size objects, so give them a \
byte. */ \
if (tree_low_cst (DECL_SIZE_UNIT (DECL), 1) == 0) \
assemble_zeros (1); \
} while (0)
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
do { \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
const char *xname = NAME; \
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
if (! DECL_WEAK (DECL) \
&& ((TREE_STATIC (DECL) \
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|| DECL_INITIAL (DECL))) \
machopic_define_symbol (DECL_RTL (DECL)); \
if ((TREE_STATIC (DECL) \
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|| DECL_INITIAL (DECL)) \
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
ASM_OUTPUT_LABEL (FILE, xname); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
} while (0)
#define ASM_DECLARE_CONSTANT_NAME(FILE, NAME, EXP, SIZE) \
do { \
ASM_OUTPUT_LABEL (FILE, NAME); \
/* Darwin doesn't support zero-size objects, so give them a \
byte. */ \
if ((SIZE) == 0) \
assemble_zeros (1); \
} while (0)
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Wrap new method names in quotes so the assembler doesn't gag.
Make Objective-C internal symbols local. */
#undef ASM_OUTPUT_LABELREF
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
do { \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
const char *xname = (NAME); \
if (! strcmp (xname, "<pic base>")) \
machopic_output_function_base_name(FILE); \
else if (xname[0] == '&' || xname[0] == '*') \
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
{ \
int len = strlen (xname); \
if (len > 6 && !strcmp ("$stub", xname + len - 5)) \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
machopic_validate_stub_or_non_lazy_ptr (xname); \
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
else if (len > 7 && !strcmp ("$stub\"", xname + len - 6)) \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
machopic_validate_stub_or_non_lazy_ptr (xname); \
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
else if (len > 14 && !strcmp ("$non_lazy_ptr", xname + len - 13)) \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
machopic_validate_stub_or_non_lazy_ptr (xname); \
else if (len > 15 && !strcmp ("$non_lazy_ptr\"", xname + len - 14)) \
machopic_validate_stub_or_non_lazy_ptr (xname); \
Yet more Objective-C++... * c-common.h (objc_finish_try_stmt): Add. (objc_build_synchronized): Add. (objc_generate_write_barrier): Add. * stub-objc.c (objc_build_synchronized): Add return value. (objc_finish_try_stmt): Likewise. (objc_generate_write_barrier): Add. * c-common.h (objc_rewrite_function_call): Add. * c-typeck.c (build_function_call): Allow objc to rewrite FUNCTION_DECLs. (build_modify_expr): Allow objc to generate write barriers. * c.opt (Wassign-intercept): Add. (Wstrict-selector-match): Add. (fobjc-call-cxx-cdtors): Add. (fobjc-direct-dispatch): Add. (fobjc-gc): Add. * dbxout.c (get_lang_number): Add Objective-C++ support. * doc/invoke.texi (-fobjc-call-cxx-cdtors): Likewise. (-Wstrict-selector-match): Likewise. (-fobjc-direct-dispatch): Likewise. (-Wassign-intercept): Likewise. (Overall Options): Likewise. * gengtype.c (get_output_file_with_visibility): Likewise. * stub-objc.c (objc_rewrite_function_call): Add. * config/darwin.h (ASM_OUTPUT_LABELREF): Improved quoting support. * c-common.c (flag_objc_exceptions): Remove. (flag_objc_sjlj_exceptions): Remove. * c-decl.c (objc_mark_locals_volatile): Don't change decls that are already ok. * c-opts.c (c_common_handle_option, case OPT_fobjc_exceptions): Remove. (case OPT_fobjc_sjlj_exceptions): Remove * c.opt (fobjc-call-cxx-cdtors): Have opt create the flag. (fobjc-exceptions): Likewise. (fobjc-sjlj-exceptions): Likewise. * config/rs6000/darwin.h (OFFS_MSGSEND_FAST): Add. (OFFS_ASSIGNIVAR_FAST): Add. From-SVN: r99858
2005-05-17 22:11:44 +02:00
if (xname[1] != '"' && name_needs_quotes (&xname[1])) \
fprintf (FILE, "\"%s\"", &xname[1]); \
else \
fputs (&xname[1], FILE); \
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
} \
else if (xname[0] == '+' || xname[0] == '-') \
fprintf (FILE, "\"%s\"", xname); \
else if (!strncmp (xname, "_OBJC_", 6)) \
fprintf (FILE, "L%s", xname); \
else if (!strncmp (xname, ".objc_class_name_", 17)) \
fprintf (FILE, "%s", xname); \
Yet more Objective-C++... * c-common.h (objc_finish_try_stmt): Add. (objc_build_synchronized): Add. (objc_generate_write_barrier): Add. * stub-objc.c (objc_build_synchronized): Add return value. (objc_finish_try_stmt): Likewise. (objc_generate_write_barrier): Add. * c-common.h (objc_rewrite_function_call): Add. * c-typeck.c (build_function_call): Allow objc to rewrite FUNCTION_DECLs. (build_modify_expr): Allow objc to generate write barriers. * c.opt (Wassign-intercept): Add. (Wstrict-selector-match): Add. (fobjc-call-cxx-cdtors): Add. (fobjc-direct-dispatch): Add. (fobjc-gc): Add. * dbxout.c (get_lang_number): Add Objective-C++ support. * doc/invoke.texi (-fobjc-call-cxx-cdtors): Likewise. (-Wstrict-selector-match): Likewise. (-fobjc-direct-dispatch): Likewise. (-Wassign-intercept): Likewise. (Overall Options): Likewise. * gengtype.c (get_output_file_with_visibility): Likewise. * stub-objc.c (objc_rewrite_function_call): Add. * config/darwin.h (ASM_OUTPUT_LABELREF): Improved quoting support. * c-common.c (flag_objc_exceptions): Remove. (flag_objc_sjlj_exceptions): Remove. * c-decl.c (objc_mark_locals_volatile): Don't change decls that are already ok. * c-opts.c (c_common_handle_option, case OPT_fobjc_exceptions): Remove. (case OPT_fobjc_sjlj_exceptions): Remove * c.opt (fobjc-call-cxx-cdtors): Have opt create the flag. (fobjc-exceptions): Likewise. (fobjc-sjlj-exceptions): Likewise. * config/rs6000/darwin.h (OFFS_MSGSEND_FAST): Add. (OFFS_ASSIGNIVAR_FAST): Add. From-SVN: r99858
2005-05-17 22:11:44 +02:00
else if (xname[0] != '"' && name_needs_quotes (xname)) \
fprintf (FILE, "\"%s\"", xname); \
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
else \
asm_fprintf (FILE, "%U%s", xname); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
} while (0)
/* Output before executable code. */
#undef TEXT_SECTION_ASM_OP
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
#define TEXT_SECTION_ASM_OP "\t.text"
/* Output before writable data. */
#undef DATA_SECTION_ASM_OP
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
#define DATA_SECTION_ASM_OP "\t.data"
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef ALIGN_ASM_OP
#define ALIGN_ASM_OP ".align"
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG) != 0) \
fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG))
/* Ensure correct alignment of bss data. */
#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h, config/arm/arm.h, config/arm/pe.c, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h, config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h, config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes FIRST argument. As needed, examine it and do nothing. * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h, config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, config/mcore/mcore.h: Remove REDO_SECTION_INFO_P. * config/arm/t-pe (pe.o): Add dependencies. From-SVN: r50236
2002-03-03 05:23:21 +01:00
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
do { \
unsigned HOST_WIDE_INT _new_size = SIZE; \
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h, config/arm/arm.h, config/arm/pe.c, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h, config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h, config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes FIRST argument. As needed, examine it and do nothing. * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h, config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, config/mcore/mcore.h: Remove REDO_SECTION_INFO_P. * config/arm/t-pe (pe.o): Add dependencies. From-SVN: r50236
2002-03-03 05:23:21 +01:00
fputs (".lcomm ", (FILE)); \
assemble_name ((FILE), (NAME)); \
if (_new_size == 0) _new_size = 1; \
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", _new_size, \
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h, config/arm/arm.h, config/arm/pe.c, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h, config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h, config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h, config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes FIRST argument. As needed, examine it and do nothing. * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h, config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h, config/mcore/mcore.h: Remove REDO_SECTION_INFO_P. * config/arm/t-pe (pe.o): Add dependencies. From-SVN: r50236
2002-03-03 05:23:21 +01:00
floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
if ((DECL) && ((TREE_STATIC (DECL) \
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|| DECL_INITIAL (DECL))) \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
{ \
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
machopic_define_symbol (DECL_RTL (DECL)); \
} \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
} while (0)
/* The maximum alignment which the object file format can support.
For Mach-O, this is 2^15. */
#undef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT 0x8000
/* Create new Mach-O sections. */
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef SECTION_FUNCTION
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
extern void FUNCTION (void); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
void \
FUNCTION (void) \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
{ \
if (in_section != SECTION) \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
{ \
if (OBJC) \
objc_section_init (); \
if (asm_out_file) \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
fputs ("\t" DIRECTIVE "\n", asm_out_file); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
in_section = SECTION; \
if ((SECTION == in_text_coal) \
|| (SECTION == in_text_unlikely) \
|| (SECTION == in_text_unlikely_coal)) \
last_text_section = SECTION; \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
} \
} \
/* Darwin uses many types of special sections. */
#undef EXTRA_SECTIONS
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
#define EXTRA_SECTIONS \
in_text_coal, in_text_unlikely, in_text_unlikely_coal, \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
in_const, in_const_data, in_cstring, in_literal4, in_literal8, \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
in_const_coal, in_const_data_coal, in_data_coal, \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
in_constructor, in_destructor, in_mod_init, in_mod_term, \
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
in_objc_class, in_objc_meta_class, in_objc_category, \
in_objc_class_vars, in_objc_instance_vars, \
in_objc_cls_meth, in_objc_inst_meth, \
in_objc_cat_cls_meth, in_objc_cat_inst_meth, \
in_objc_selector_refs, \
in_objc_selector_fixup, \
in_objc_symbols, in_objc_module_info, \
in_objc_protocol, in_objc_string_object, \
in_objc_constant_string_object, \
in_objc_image_info, \
in_objc_class_names, in_objc_meth_var_names, \
in_objc_meth_var_types, in_objc_cls_refs, \
in_machopic_nl_symbol_ptr, \
in_machopic_lazy_symbol_ptr, \
in_machopic_symbol_stub, \
in_machopic_symbol_stub1, \
in_machopic_picsymbol_stub, \
in_machopic_picsymbol_stub1, \
in_darwin_exception, in_darwin_eh_frame, \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
num_sections
#undef EXTRA_SECTION_FUNCTIONS
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
#define EXTRA_SECTION_FUNCTIONS \
static void objc_section_init (void); \
SECTION_FUNCTION (text_coal_section, \
in_text_coal, \
".section __TEXT,__textcoal_nt,coalesced," \
"pure_instructions", 0) \
SECTION_FUNCTION (text_unlikely_coal_section, \
in_text_unlikely_coal, \
".section __TEXT,__text_unlikely_coal," \
"coalesced,pure_instructions", 0) \
SECTION_FUNCTION (const_section, \
in_const, \
".const", 0) \
SECTION_FUNCTION (const_coal_section, \
in_const_coal, \
".section __TEXT,__const_coal,coalesced", 0) \
SECTION_FUNCTION (const_data_section, \
in_const_data, \
".const_data", 0) \
SECTION_FUNCTION (const_data_coal_section, \
in_const_data_coal, \
".section __DATA,__const_coal,coalesced", 0) \
SECTION_FUNCTION (data_coal_section, \
in_data_coal, \
".section __DATA,__datacoal_nt,coalesced", 0) \
SECTION_FUNCTION (cstring_section, \
in_cstring, \
".cstring", 0) \
SECTION_FUNCTION (literal4_section, \
in_literal4, \
".literal4", 0) \
SECTION_FUNCTION (literal8_section, \
in_literal8, \
".literal8", 0) \
SECTION_FUNCTION (constructor_section, \
in_constructor, \
".constructor", 0) \
SECTION_FUNCTION (mod_init_section, \
in_mod_init, \
".mod_init_func", 0) \
SECTION_FUNCTION (mod_term_section, \
in_mod_term, \
".mod_term_func", 0) \
SECTION_FUNCTION (destructor_section, \
in_destructor, \
".destructor", 0) \
SECTION_FUNCTION (objc_class_section, \
in_objc_class, \
".objc_class", 1) \
SECTION_FUNCTION (objc_meta_class_section, \
in_objc_meta_class, \
".objc_meta_class", 1) \
SECTION_FUNCTION (objc_category_section, \
in_objc_category, \
".objc_category", 1) \
SECTION_FUNCTION (objc_class_vars_section, \
in_objc_class_vars, \
".objc_class_vars", 1) \
SECTION_FUNCTION (objc_instance_vars_section, \
in_objc_instance_vars, \
".objc_instance_vars", 1) \
SECTION_FUNCTION (objc_cls_meth_section, \
in_objc_cls_meth, \
".objc_cls_meth", 1) \
SECTION_FUNCTION (objc_inst_meth_section, \
in_objc_inst_meth, \
".objc_inst_meth", 1) \
SECTION_FUNCTION (objc_cat_cls_meth_section, \
in_objc_cat_cls_meth, \
".objc_cat_cls_meth", 1) \
SECTION_FUNCTION (objc_cat_inst_meth_section, \
in_objc_cat_inst_meth, \
".objc_cat_inst_meth", 1) \
SECTION_FUNCTION (objc_selector_refs_section, \
in_objc_selector_refs, \
".objc_message_refs", 1) \
SECTION_FUNCTION (objc_selector_fixup_section, \
in_objc_selector_fixup, \
".section __OBJC, __sel_fixup, regular, no_dead_strip", 1) \
SECTION_FUNCTION (objc_symbols_section, \
in_objc_symbols, \
".objc_symbols", 1) \
SECTION_FUNCTION (objc_module_info_section, \
in_objc_module_info, \
".objc_module_info", 1) \
SECTION_FUNCTION (objc_protocol_section, \
in_objc_protocol, \
".objc_protocol", 1) \
SECTION_FUNCTION (objc_string_object_section, \
in_objc_string_object, \
".objc_string_object", 1) \
SECTION_FUNCTION (objc_constant_string_object_section, \
in_objc_constant_string_object, \
".section __OBJC, __cstring_object, regular, " \
"no_dead_strip", 1) \
/* Fix-and-Continue image marker. */ \
SECTION_FUNCTION (objc_image_info_section, \
in_objc_image_info, \
".section __OBJC, __image_info, regular, " \
"no_dead_strip", 1) \
SECTION_FUNCTION (objc_class_names_section, \
in_objc_class_names, \
".objc_class_names", 1) \
SECTION_FUNCTION (objc_meth_var_names_section, \
in_objc_meth_var_names, \
".objc_meth_var_names", 1) \
SECTION_FUNCTION (objc_meth_var_types_section, \
in_objc_meth_var_types, \
".objc_meth_var_types", 1) \
SECTION_FUNCTION (objc_cls_refs_section, \
in_objc_cls_refs, \
".objc_cls_refs", 1) \
\
SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \
in_machopic_lazy_symbol_ptr, \
".lazy_symbol_pointer", 0) \
SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \
in_machopic_nl_symbol_ptr, \
".non_lazy_symbol_pointer", 0) \
SECTION_FUNCTION (machopic_symbol_stub_section, \
in_machopic_symbol_stub, \
".symbol_stub", 0) \
SECTION_FUNCTION (machopic_symbol_stub1_section, \
in_machopic_symbol_stub1, \
".section __TEXT,__symbol_stub1,symbol_stubs," \
"pure_instructions,16", 0) \
SECTION_FUNCTION (machopic_picsymbol_stub_section, \
in_machopic_picsymbol_stub, \
".picsymbol_stub", 0) \
SECTION_FUNCTION (machopic_picsymbol_stub1_section, \
in_machopic_picsymbol_stub1, \
".section __TEXT,__picsymbolstub1,symbol_stubs," \
"pure_instructions,32", 0) \
SECTION_FUNCTION (darwin_exception_section, \
in_darwin_exception, \
".section __DATA,__gcc_except_tab", 0) \
SECTION_FUNCTION (darwin_eh_frame_section, \
in_darwin_eh_frame, \
".section " EH_FRAME_SECTION_NAME ",__eh_frame" \
EH_FRAME_SECTION_ATTR, 0) \
\
static void \
objc_section_init (void) \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
{ \
static int been_here = 0; \
\
if (been_here == 0) \
{ \
been_here = 1; \
/* written, cold -> hot */ \
objc_cat_cls_meth_section (); \
objc_cat_inst_meth_section (); \
objc_string_object_section (); \
objc_constant_string_object_section (); \
objc_selector_refs_section (); \
objc_selector_fixup_section (); \
objc_cls_refs_section (); \
objc_class_section (); \
objc_meta_class_section (); \
/* shared, hot -> cold */ \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
objc_cls_meth_section (); \
objc_inst_meth_section (); \
objc_protocol_section (); \
objc_class_names_section (); \
objc_meth_var_types_section (); \
objc_meth_var_names_section (); \
objc_category_section (); \
objc_class_vars_section (); \
objc_instance_vars_section (); \
objc_module_info_section (); \
objc_symbols_section (); \
} \
}
#define READONLY_DATA_SECTION const_section
hooks.c (hook_tree_bool_false): New. * hooks.c (hook_tree_bool_false): New. * hooks.h: Declare it. * target-def.h (TARGET_ASM_SELECT_SECTION): New. (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. * target.h (select_section, unique_section): New. (in_small_data_p): New. * varasm.c (resolve_unique_section): Use hooks instead of macros. (variable_section, output_constant_def_contents): Likewise. (default_select_section, default_unique_section): New. (categorize_decl_for_section, default_elf_select_section): New. * output.h: Declare them. * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/darwin.c (machopic_select_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/nextstep.c (nextstep_select_section): ... here. * config/nextstep-protos.h: Update. * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/svr3.h (SELECT_SECTION): Remove. * config/alpha/alpha.c (unicosmk_unique_section): Make static. (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. (alpha_encode_section_info): Use it. * config/alpha/alpha-protos.h: Update. * config/alpha/elf.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. * config/arm/pe.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. (avr_unique_section): Rename from unique_section; make static. * config/avr/avr-protos.h: Update. * config/avr/avr.h (UNIQUE_SECTION): Remove. * config/c4x/c4x.h (SELECT_SECTION): Remove. * config/i386/cygwin.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/i386/i386-interix.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/djgpp.h (UNIQUE_SECTION): Remove. * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. * config/i386/sco5.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/i386/svr3gas.h (SELECT_SECTION): Remove. * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION instead of SELECT_SECTION. * config/m68k/dpx2.h: Likewise. * config/rs6000/lynx.h: Likewise. * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. (ia64_in_small_data_p): New. (ia64_encode_section_info): Use it. Reorganize overlarge conditional. (ia64_aix_select_section, ia64_aix_unique_section): New. * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/m32r/m32r.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/m32r/m32r.c (m32r_select_section): Take align argument. * config/m32r/m32r-protos.h: Update. * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/m88k/m88k.c (m88k_select_section): ... here. * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. * config/mcore/mcore.h (UNIQUE_SECTION): Remove. * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. (mcore_unique_section): Make static. * config/mcore/mcore-protos.h: Update. * config/mips/elf.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/mips/elf64.h: Likewise. * config/mips/iris6gld.h: Likewise. * config/mips/linux.h: Likewise. * config/mips/mips-protos.h: Update. * config/mips/mips.c (mips_select_section): Add align argument. * config/mips/mips.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/mmix/mmix.c (mmix_select_section): Remove. (mmix_unique_section): Remove. * config/mmix/mmix-protos.h: Update. * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/pa/pa.c (pa_select_section): ... here. * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename from rs6000_select_section and make static. (rs6000_elf_unique_section): Similarly. (rs6000_xcoff_select_section): From xcoff.h. (rs6000_xcoff_unique_section): Likewise. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/rs6000/xcoff.h: Likewise. * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_section): ... here. * config/v850/v850.h (SELECT_SECTION): Move ... * config/v850/v850.c (v850_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * config/vax/vms.h (SELECT_SECTION): Move ... * config/vax/vax.c (vms_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs for the target hooks. From-SVN: r53550
2002-05-17 09:43:41 +02:00
#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION machopic_select_section
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
#define USE_SELECT_SECTION_FOR_FUNCTIONS
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
#undef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION darwin_unique_section
#undef TARGET_ASM_FUNCTION_RODATA_SECTION
#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \
do { \
if (FILE) { \
darwin.c (machopic_function_base_name): If dynamic-no-pic is on should not get here. 2003-03-10 Andrew Pinski <apinski@apple.com> * config/darwin.c (machopic_function_base_name): If dynamic-no-pic is on should not get here. (machopic_indirect_data_reference): If dynamic-no-pic is on just generate high/low parts of the address. (machopic_legitimize_pic_address): Change MACHOPIC_PURE to MACHOPIC_INDIRECT. Dynamic-no-pic uses 0 as the pic base. Generate symbol and labels with a new reg. Dynamic-no-pic does not have a pic_offset_table_rtx. (machopic_select_section): Change references of flag_pic to MACHOPIC_INDIRECT. (machopic_asm_out_destructor): Likewise. * config/darwin.h (ASM_DECLARE_UNRESOLVED_REFERENCE): Change reference of flag_pic to MACHOPIC_INDIRECT. (MACHO_DYNAMIC_NO_PIC_P): Define as TARGET_DYNAMIC_NO_PIC. (MACHOPIC_INDIRECT): Is also true when dynamic-no-pic is on. (MACHOPIC_JUST_INDIRECT): Is also true when dynamic-no-pic is on. (MACHOPIC_PURE): Is not pure when dynamic-no-pic is on. * config/i386/darwin.h (MASK_MACHO_DYNAMIC_NO_PIC): Define as 0 for right now as dynamic-no-pic is not implemented on Darwin/ia32. * config/rs6000/darwin.h (MASK_MACHO_DYNAMIC_NO_PIC): Define. (TARGET_DYNAMIC_NO_PIC): Define. (SUBTARGET_SWITCHES): Define, have sub-target switches for dynamic-no-pic. (SUBTARGET_OVERRIDE_OPTIONS): Move check for -fpic from rs6000_override_options to here. Dynamic-no-pic overrides pic. (CC1_SPEC): Change from not static then pic to not static and not dynamic-no-pic then pic. * config/rs6000/rs6000.c (rs6000_override_options): Move the check for -fpic and DARWIN_ABI to config/rs6000/darwin.h (rs6000_legitimize_reload_address): Add case for loading floating in dynamic-no-pic. (rs6000_emit_move): Add case for dynamic-no-pic. Change reference of flag_pic to MACHOPIC_INDIRECT. (secondary_reload_class): Conditional change the reference of flag_pic to MACHOPIC_INDIRECT. (rs6000_output_mi_thunk): Change reference of flag_pic to MACHOPIC_INDIRECT. (output_profile_hook): Likewise. (machopic_output_stub): Non-pure (dynamic-no-pic) is now supported. * config/rs6000/rs6000.md (movdf_low): Add the case for MACHO_DYNAMIC_NO_PIC_P. (call): Change references for flag_pic in TARGET_MACHO to MACHOPIC_INDIRECT. (SUBTARGET_OVERRIDE_OPTIONS): Add case where -fpic is on and -mdynamic-no-pic is on. Also move case for -fpic from rs6000.c. * doc/invoke.texi (-mdynamic-no-pic): Document. From-SVN: r64157
2003-03-11 02:41:11 +01:00
if (MACHOPIC_INDIRECT) \
fprintf (FILE, "\t.lazy_reference "); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
else \
fprintf (FILE, "\t.reference "); \
assemble_name (FILE, NAME); \
fprintf (FILE, "\n"); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
} \
} while (0)
#define ASM_DECLARE_CLASS_REFERENCE(FILE,NAME) \
do { \
if (FILE) { \
fprintf (FILE, "\t"); \
assemble_name (FILE, NAME); \
fprintf (FILE, "=0\n"); \
alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. * alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. * alpha/elf.h (ASM_OUTPUT_EXTERNAL_LIBCALL, ASM_OUTPUT_ALIGNED_BSS): Use target hook. * alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS): Likewise. * alpha/unicosmk.h (ASM_GLOBALIZE_LABEL): Delete. * arm/aof.h (ASM_GLOBALIZE_LABEL): Likewise. (GLOBAL_ASM_OP): Define. * arm.c (aof_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for AOF. * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * c4x.c (c4x_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for c4x. * c4x.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * cris/aout.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. * darwin-protos.h (darwin_globalize_label): Declare. * darwin.c (darwin_globalize_label): New function. * darwin.h (ASM_DECLARE_CLASS_REFERENCE): Use target hook. (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP, TARGET_ASM_GLOBALIZE_LABEL): Define. * dsp16xx.c (asm_output_common): Use target hook. * elfos.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. * frv.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * i370.c (i370_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for i370. * i370.h (ASM_GLOBALIZE_LABEL): Delete. * i386.c (ix86_asm_file_end): Use target hook. * i386/sco5.h (ASM_GLOBALIZE_LABEL): Don't undef. (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. * ia64.c (ia64_asm_output_external): Likewise. * ia64/sysv4.h: Update comment. * m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. * mips/iris5.h (ASM_OUTPUT_WEAK_ALIAS): Use target hook. * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. * mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use target hook. * mmix-protos.h (mmix_asm_globalize_label): Delete. * mmix.c (mmix_asm_globalize_label): Likewise. * mmix.h (ASM_GLOBALIZE_LABEL): Likewise. (GLOBAL_ASM_OP): Define. * ns32k.c (ns32k_globalize_label): New function. * ns32k.h (TARGET_ASM_GLOBALIZE_LABEL): Define for ns32k. (ASM_GLOBALIZE_LABEL): Delete. * pa/pa-linux.h (ASM_GLOBALIZE_LABEL): Don't undef. (TARGET_ASM_GLOBALIZE_LABEL): Undefine. * pa.c (pa_globalize_label): New function. * pa.h (ASM_GLOBALIZE_LABEL): Delete. (TARGET_ASM_GLOBALIZE_LABEL): Define for pa. * rs6000/darwin.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. (TARGET_ASM_GLOBALIZE_LABEL): Undef. * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * rs6000/xcoff.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * v850.c (v850_output_aligned_bss): Use target hook. * vax.c (vms_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for vms. * vax/vms.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * defaults.h (ASM_GLOBALIZE_LABEL): Delete. * doc/tm.texi: Update docs. * dwarf2out.c (default_eh_frame_section, output_die_symbol): Use target hook. * final.c (output_alternate_entry_point): Likewise. * hooks.c (hook_FILEptr_constcharptr_void): New function. * hooks.h (hook_FILEptr_constcharptr_void): Declare. * output.h (assemble_global): Delete. (default_globalize_label): Declare. * system.h (ASM_GLOBALIZE_LABEL): Poison. * target-def.h (TARGET_ASM_GLOBALIZE_LABEL): Define. (TARGET_ASM_OUT): Add TARGET_ASM_GLOBALIZE_LABEL. * target.h (gcc_target): Add globalize_label member. * varasm.c (asm_output_bss, asm_output_aligned_bss, globalize_decl): Use target hook. (assemble_global): Delete. (default_globalize_label): New function. From-SVN: r56478
2002-08-21 04:41:51 +02:00
(*targetm.asm_out.globalize_label) (FILE, NAME); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
} \
} while (0)
alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. * alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. * alpha/elf.h (ASM_OUTPUT_EXTERNAL_LIBCALL, ASM_OUTPUT_ALIGNED_BSS): Use target hook. * alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS): Likewise. * alpha/unicosmk.h (ASM_GLOBALIZE_LABEL): Delete. * arm/aof.h (ASM_GLOBALIZE_LABEL): Likewise. (GLOBAL_ASM_OP): Define. * arm.c (aof_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for AOF. * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * c4x.c (c4x_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for c4x. * c4x.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * cris/aout.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. * darwin-protos.h (darwin_globalize_label): Declare. * darwin.c (darwin_globalize_label): New function. * darwin.h (ASM_DECLARE_CLASS_REFERENCE): Use target hook. (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP, TARGET_ASM_GLOBALIZE_LABEL): Define. * dsp16xx.c (asm_output_common): Use target hook. * elfos.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. * frv.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * i370.c (i370_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for i370. * i370.h (ASM_GLOBALIZE_LABEL): Delete. * i386.c (ix86_asm_file_end): Use target hook. * i386/sco5.h (ASM_GLOBALIZE_LABEL): Don't undef. (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. * ia64.c (ia64_asm_output_external): Likewise. * ia64/sysv4.h: Update comment. * m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. * mips/iris5.h (ASM_OUTPUT_WEAK_ALIAS): Use target hook. * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. * mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use target hook. * mmix-protos.h (mmix_asm_globalize_label): Delete. * mmix.c (mmix_asm_globalize_label): Likewise. * mmix.h (ASM_GLOBALIZE_LABEL): Likewise. (GLOBAL_ASM_OP): Define. * ns32k.c (ns32k_globalize_label): New function. * ns32k.h (TARGET_ASM_GLOBALIZE_LABEL): Define for ns32k. (ASM_GLOBALIZE_LABEL): Delete. * pa/pa-linux.h (ASM_GLOBALIZE_LABEL): Don't undef. (TARGET_ASM_GLOBALIZE_LABEL): Undefine. * pa.c (pa_globalize_label): New function. * pa.h (ASM_GLOBALIZE_LABEL): Delete. (TARGET_ASM_GLOBALIZE_LABEL): Define for pa. * rs6000/darwin.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. (TARGET_ASM_GLOBALIZE_LABEL): Undef. * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * rs6000/xcoff.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * v850.c (v850_output_aligned_bss): Use target hook. * vax.c (vms_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for vms. * vax/vms.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * defaults.h (ASM_GLOBALIZE_LABEL): Delete. * doc/tm.texi: Update docs. * dwarf2out.c (default_eh_frame_section, output_die_symbol): Use target hook. * final.c (output_alternate_entry_point): Likewise. * hooks.c (hook_FILEptr_constcharptr_void): New function. * hooks.h (hook_FILEptr_constcharptr_void): Declare. * output.h (assemble_global): Delete. (default_globalize_label): Declare. * system.h (ASM_GLOBALIZE_LABEL): Poison. * target-def.h (TARGET_ASM_GLOBALIZE_LABEL): Define. (TARGET_ASM_OUT): Add TARGET_ASM_GLOBALIZE_LABEL. * target.h (gcc_target): Add globalize_label member. * varasm.c (asm_output_bss, asm_output_aligned_bss, globalize_decl): Use target hook. (assemble_global): Delete. (default_globalize_label): New function. From-SVN: r56478
2002-08-21 04:41:51 +02:00
/* Globalizing directive for a label. */
#define GLOBAL_ASM_OP ".globl "
#define TARGET_ASM_GLOBALIZE_LABEL darwin_globalize_label
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Emit an assembler directive to set visibility for a symbol. Used
to support visibility attribute and Darwin's private extern
feature. */
#undef TARGET_ASM_ASSEMBLE_VISIBILITY
#define TARGET_ASM_ASSEMBLE_VISIBILITY darwin_assemble_visibility
/* Extra attributes for Darwin. */
#define SUBTARGET_ATTRIBUTE_TABLE \
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ \
{ "weak_import", 0, 0, true, false, false, \
darwin_handle_weak_import_attribute }
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM))
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef TARGET_ASM_MARK_DECL_PRESERVED
#define TARGET_ASM_MARK_DECL_PRESERVED darwin_mark_decl_preserved
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
/* Set on a symbol with SYMBOL_FLAG_FUNCTION or
MACHO_SYMBOL_FLAG_VARIABLE to indicate that the function or
variable has been defined in this translation unit. */
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
#define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_MACH_DEP)
#define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_MACH_DEP) << 1)
/* Set on a symbol to indicate when fix-and-continue style code
generation is being used and the symbol refers to a static symbol
that should be rebound from new instances of a translation unit to
the original instance of the data. */
#define MACHO_SYMBOL_STATIC ((SYMBOL_FLAG_MACH_DEP) << 2)
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
/* Symbolic names for various things we might know about a symbol. */
enum machopic_addr_class {
MACHOPIC_UNDEFINED,
MACHOPIC_DEFINED_DATA,
MACHOPIC_UNDEFINED_DATA,
MACHOPIC_DEFINED_FUNCTION,
MACHOPIC_UNDEFINED_FUNCTION
};
/* Macros defining the various PIC cases. */
darwin.c (machopic_function_base_name): If dynamic-no-pic is on should not get here. 2003-03-10 Andrew Pinski <apinski@apple.com> * config/darwin.c (machopic_function_base_name): If dynamic-no-pic is on should not get here. (machopic_indirect_data_reference): If dynamic-no-pic is on just generate high/low parts of the address. (machopic_legitimize_pic_address): Change MACHOPIC_PURE to MACHOPIC_INDIRECT. Dynamic-no-pic uses 0 as the pic base. Generate symbol and labels with a new reg. Dynamic-no-pic does not have a pic_offset_table_rtx. (machopic_select_section): Change references of flag_pic to MACHOPIC_INDIRECT. (machopic_asm_out_destructor): Likewise. * config/darwin.h (ASM_DECLARE_UNRESOLVED_REFERENCE): Change reference of flag_pic to MACHOPIC_INDIRECT. (MACHO_DYNAMIC_NO_PIC_P): Define as TARGET_DYNAMIC_NO_PIC. (MACHOPIC_INDIRECT): Is also true when dynamic-no-pic is on. (MACHOPIC_JUST_INDIRECT): Is also true when dynamic-no-pic is on. (MACHOPIC_PURE): Is not pure when dynamic-no-pic is on. * config/i386/darwin.h (MASK_MACHO_DYNAMIC_NO_PIC): Define as 0 for right now as dynamic-no-pic is not implemented on Darwin/ia32. * config/rs6000/darwin.h (MASK_MACHO_DYNAMIC_NO_PIC): Define. (TARGET_DYNAMIC_NO_PIC): Define. (SUBTARGET_SWITCHES): Define, have sub-target switches for dynamic-no-pic. (SUBTARGET_OVERRIDE_OPTIONS): Move check for -fpic from rs6000_override_options to here. Dynamic-no-pic overrides pic. (CC1_SPEC): Change from not static then pic to not static and not dynamic-no-pic then pic. * config/rs6000/rs6000.c (rs6000_override_options): Move the check for -fpic and DARWIN_ABI to config/rs6000/darwin.h (rs6000_legitimize_reload_address): Add case for loading floating in dynamic-no-pic. (rs6000_emit_move): Add case for dynamic-no-pic. Change reference of flag_pic to MACHOPIC_INDIRECT. (secondary_reload_class): Conditional change the reference of flag_pic to MACHOPIC_INDIRECT. (rs6000_output_mi_thunk): Change reference of flag_pic to MACHOPIC_INDIRECT. (output_profile_hook): Likewise. (machopic_output_stub): Non-pure (dynamic-no-pic) is now supported. * config/rs6000/rs6000.md (movdf_low): Add the case for MACHO_DYNAMIC_NO_PIC_P. (call): Change references for flag_pic in TARGET_MACHO to MACHOPIC_INDIRECT. (SUBTARGET_OVERRIDE_OPTIONS): Add case where -fpic is on and -mdynamic-no-pic is on. Also move case for -fpic from rs6000.c. * doc/invoke.texi (-mdynamic-no-pic): Document. From-SVN: r64157
2003-03-11 02:41:11 +01:00
#define MACHO_DYNAMIC_NO_PIC_P (TARGET_DYNAMIC_NO_PIC)
#define MACHOPIC_INDIRECT (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
#define MACHOPIC_JUST_INDIRECT (flag_pic == 1 || MACHO_DYNAMIC_NO_PIC_P)
#define MACHOPIC_PURE (flag_pic == 2 && ! MACHO_DYNAMIC_NO_PIC_P)
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#undef TARGET_ENCODE_SECTION_INFO
system.h (ENCODE_SECTION_INFO): Poison it. * system.h (ENCODE_SECTION_INFO): Poison it. * target-def.h (TARGET_ENCODE_SECTION_INFO): New. * target.h (encode_section_info): New. * varasm.c (make_decl_rtl, output_constant_def): Use it. * hooks.c (hook_tree_int_void): New. * hooks.h: Declare it. * config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h, config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000-protos.h, config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h: Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO referencing existing function. Make function static. * config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c, config/arc/arc.h, config/arm/arm.c, config/arm/arm.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c, config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h, config/vax/vax.c, config/vax/vms.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h: Move ENCODE_SECTION_INFO to out-of-line function and add TARGET_ENCODE_SECTION_INFO. * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro. (ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. * config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename from SUBTARGET_* (switch_to_section): Replace in_rdata case with in_readonly_data. * config/h8300/h8300.c (h8300_encode_label): Make static. * config/h8300/h8300-protos.h: Update. * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename from rs6000_encode_section_info; make static. (rs6000_xcoff_encode_section_info): New. * config/v850/v850.c (v850_encode_data_area): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.c: Include flags.h. (vms_select_section): Fix typo. * doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous ENCODE_SECTION_INFO docs. From-SVN: r53606
2002-05-19 07:23:27 +02:00
#define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
#define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
#define GEN_BINDER_NAME_FOR_STUB(BUF,STUB,STUB_LENGTH) \
do { \
c-parse.in (yyerror): Const-ification and/or static-ization. * c-parse.in (yyerror): Const-ification and/or static-ization. * c-typeck.c (push_member_name): Likewise. * collect2.c (main): Likewise. * dbxout.c (dbxout_parms): Likewise. * diagnostic.c (format_with_decl): Likewise. * dwarf2out.c (output_ranges): Likewise. * dwarfout.c (fundamental_type_code): Likewise. * except.c (dw2_output_call_site_table): Likewise. * gcc.c (do_spec_1): Likewise. * genopinit.c (optabs): Likewise. * objc/objc-act.c (synth_id_with_class_suffix, start_class, gen_declaration_1, handle_impent): Likewise. * protoize.c (default_include, in_system_include_dir, abspath): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * sdbout.c (plain_type_1, sdbout_end_function, sdbout_end_epilogue): Likewise. * varasm.c (decode_reg_name): Likewise. * 1750a.c (mod_regno_adjust): Likewise. * alpha.c (alpha_write_one_linkage, unicosmk_output_default_externs): Likewise. * arm.c (arm_condition_codes): Likewise. * arm.h (arm_condition_codes): Likewise. * avr.c (output_movsisf, encode_section_info): Likewise. * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): Likewise. * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * m88k.c (output_function_profiler): Likewise. * mips.c (mips_output_conditional_branch): Likewise. * ns32k.c (ns32k_out_reg_names): Likewise. * ns32k.h (ns32k_out_reg_names): Likewise. * pj.c (pj_output_rval): Likewise. * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue): Likewise. cp: * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): Const-ification. * pt.c (tsubst_decl): Likewise. f: * bad.c (ffebad_finish): Const-ification and/or static-ization. * intrin.c (ffeintrin_cmp_name_): Likewise. * stc.c (ffestc_R904): Likewise. java: * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. From-SVN: r45581
2001-09-13 16:37:29 +02:00
const char *const stub_ = (STUB); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
char *buffer_ = (BUF); \
strcpy (buffer_, stub_); \
if (stub_[0] == '"') \
{ \
strcpy (buffer_ + (STUB_LENGTH) - 1, "_binder\""); \
} \
else \
{ \
strcpy (buffer_ + (STUB_LENGTH), "_binder"); \
} \
} while (0)
#define GEN_SYMBOL_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
do { \
c-parse.in (yyerror): Const-ification and/or static-ization. * c-parse.in (yyerror): Const-ification and/or static-ization. * c-typeck.c (push_member_name): Likewise. * collect2.c (main): Likewise. * dbxout.c (dbxout_parms): Likewise. * diagnostic.c (format_with_decl): Likewise. * dwarf2out.c (output_ranges): Likewise. * dwarfout.c (fundamental_type_code): Likewise. * except.c (dw2_output_call_site_table): Likewise. * gcc.c (do_spec_1): Likewise. * genopinit.c (optabs): Likewise. * objc/objc-act.c (synth_id_with_class_suffix, start_class, gen_declaration_1, handle_impent): Likewise. * protoize.c (default_include, in_system_include_dir, abspath): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * sdbout.c (plain_type_1, sdbout_end_function, sdbout_end_epilogue): Likewise. * varasm.c (decode_reg_name): Likewise. * 1750a.c (mod_regno_adjust): Likewise. * alpha.c (alpha_write_one_linkage, unicosmk_output_default_externs): Likewise. * arm.c (arm_condition_codes): Likewise. * arm.h (arm_condition_codes): Likewise. * avr.c (output_movsisf, encode_section_info): Likewise. * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): Likewise. * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * m88k.c (output_function_profiler): Likewise. * mips.c (mips_output_conditional_branch): Likewise. * ns32k.c (ns32k_out_reg_names): Likewise. * ns32k.h (ns32k_out_reg_names): Likewise. * pj.c (pj_output_rval): Likewise. * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue): Likewise. cp: * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): Const-ification. * pt.c (tsubst_decl): Likewise. f: * bad.c (ffebad_finish): Const-ification and/or static-ization. * intrin.c (ffeintrin_cmp_name_): Likewise. * stc.c (ffestc_R904): Likewise. java: * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. From-SVN: r45581
2001-09-13 16:37:29 +02:00
const char *const symbol_ = (SYMBOL); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
char *buffer_ = (BUF); \
if (name_needs_quotes (symbol_) && symbol_[0] != '"') \
{ \
sprintf (buffer_, "\"%s\"", symbol_); \
} \
else \
{ \
strcpy (buffer_, symbol_); \
} \
} while (0)
/* Given a symbol name string, create the lazy pointer version
of the symbol name. */
#define GEN_LAZY_PTR_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
do { \
dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * dwarf2out.c (output_call_frame_info): Set SYMBOL_FLAG_LOCAL on generated SYMBOL_REFs for labels. * config/darwin-protos.h (machopic_validate_stub_or_non_lazy_ptr): Change prototype. (machopic_stub_name): Remove. (machopic_indirection_name): New function. (machopic_mcount_stub_name): Likewise. (machopic_classify_name): Remove. (machopic_function_base_sym): New function. (machpoic_classify_symbol): Likewise. (machopic_classify_ident): Remove. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (darwin_strip_name_encoding): Likewise. (machopic_define_symbol): New function. * config/darwin.c (hashtab.h): Include. (machopic_defined_list): Remove. (machopic_classify_ident): Likewise. (machopic_classify_name): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_ident): Likewise. (machopic_define_name): Likewise. (machopic_symbol_defined_p): New function. (machopic_classify_symbol): Likewise. (machopic_data_defined_p): Use machopic_classify_symbol. (machopic_define_symbol): New function. (machopic_function_base_sym): New function. (machopic_non_lazy_pointers): Remove. (machopic_non_lazy_ptr_name): Likewise. (machopic_stubs): Likewise. (machopic_stub_name): Likewise. (NON_LAZY_POINTER_SUFFIX): New macro. (STUB_SUFFIX): Likewise. (machopic_indirection): New structure. (machopic_indirections): New variable. (machopic_indirection_hash): New function. (machopic_indirection_eq): Likewise. (machopic_indirection_name): Likewise. (machopic_mcount_stub_name): New function. (machopic_validate_stub_or_non_lazy_pointer): Reimplement to use hash table. (machopic_indirect_data_reference): Rework to use new functions. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. (machopic_output_indirection): New function. (machopic_finish): Use it. (machopic_operand_p): Rework to use new functions. (darwin_encode_seciton_info): Use SYMBOL_REF_FLAGS. (darwin_strip_name_encoding): Remove. (update_non_lazy_ptrs): Remove. (update_stubs): Likewise. (darwin_non_lazy_pcrel): Use new functions. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_OUTPUT_LABELREF): Likewise. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. (MACHO_SYMBOL_FLAG_VARIABLE): New macro. (MACHO_SYMBOL_FLAG_DEFINED): Likewise. (TARGET_STRIP_NAME_ENCODING): Do not use darwin_strip_name_encoding. (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Do not use darwin_strip_name_encoding. * config/i386/darwin.h (FUNCTION_PROFILER): Use machopic_mcount_stub_name. * config/i386/i386.c (x86_output_mi_thunk): Use machopic_indirection_name, not machopic_stub_name. * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Use machopic_function_base_sym. (print_operand): Use machopic_classify_symbol. (rs6000_emit_prologue): Use machopic_function_base_sym. (output_profile_hook): Do not use machopic_stub_name. (macho_branch_isalnds): Do not use darwin_strip_name_encoding. From-SVN: r85071
2004-07-23 06:35:17 +02:00
const char *symbol_ = (SYMBOL); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
char *buffer_ = (BUF); \
if (symbol_[0] == '"') \
{ \
system.h (STRIP_NAME_ENCODING): Poison it. * system.h (STRIP_NAME_ENCODING): Poison it. * output.h (STRIP_NAME_ENCODING): Remove. (default_strip_name_encoding): Declare. * target-def.h (TARGET_STRIP_NAME_ENCODING): New. * target.h (strip_name_encoding): New. * varasm.c (default_strip_name_encoding): New. * dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c, config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c, config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, config/pa/som.h, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/v850/v850.h: Use the hook, not the macro. * config/darwin-protos.h, config/darwin.c, config/darwin.h, config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h, config/v850/v850.c, config/v850/v850.h: Move STRIP_NAME_ENCODING to out-of-line function and add TARGET_STRIP_NAME_ENCODING. * config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING with TARGET_STRIP_NAME_ENCODING referencing existing function; make function static. * xcoffout.c: Include target.h * Makefile.in (xcoffout.o): Update. * config/avr/avr.c (avr_encode_section_info): Correct prototype. * config/avr/avr.h (STRIP_NAME_ENCODING): Remove. * config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark reloc argument unused. * config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New. * doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous STRIP_NAME_ENCODING docs. From-SVN: r53615
2002-05-19 09:55:48 +02:00
strcpy (buffer_, "\"L"); \
Add Darwin (Mac OS X kernel) native support. * config.gcc (powerpc-*-darwin*): Add native bits. * config/darwin.c: New file, generic Darwin support functions. * config/darwin.h: New file, generic Darwin definitions. * config/darwin-protos.h: New file, generic Darwin prototypes. * rs6000/darwin.h: New file, Darwin for PowerPC. * rs6000/t-darwin: New file, Darwin makefile fragment. * rs6000/rs6000.h (OBJECT_MACHO): New macro. (TARGET_MACHO): Ditto. (rs6000_abi): Add ABI_DARWIN. (RS6000_REG_SAVE): Add ABI_DARWIN case. (RS6000_SAVE_AREA): Ditto. (FP_ARG_MAX_REG): Ditto. (RETURN_ADDRESS_OFFSET): Ditto. * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO cases. (rs6000_emit_move): Add ABI_DARWIN cases. (print_operand): Ditto. (first_reg_to_save): Ditto. (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. (debug_stack_info): Ditto. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. (output_profiler_hook): Ditto. (output_function_profiler): Ditto. (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. (output_mi_thunk): Add TARGET_MACHO case. (add_compiler_stub): Ditto. (output_compiler_stub): Ditto. (no_previous_def): Ditto. (output_call): Ditto. (machopic_output_stub): Ditto. (rs6000_machopic_legitimize_pic_address): Ditto. (toc_section): Ditto. * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. (macho_high): Ditto. (macho_low): Ditto. (movsi_low): Ditto. (load_macho_picbase): Ditto. (call): Add TARGET_MACHO case to modify function. (call_value): Ditto. (call_nonlocal_sysv): Add ABI_DARWIN case. (call_value_nonlocal_sysv): Ditto. * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): Add prototype. (machopic_output_stub): Ditto. * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. From-SVN: r41277
2001-04-12 04:13:00 +02:00
strcpy (buffer_ + 2, symbol_ + 1); \
strcpy (buffer_ + (SYMBOL_LENGTH), "$lazy_ptr\""); \
} \
else if (name_needs_quotes (symbol_)) \
{ \
strcpy (buffer_, "\"L"); \
strcpy (buffer_ + 2, symbol_); \
strcpy (buffer_ + (SYMBOL_LENGTH) + 2, "$lazy_ptr\""); \
} \
else \
{ \
strcpy (buffer_, "L"); \
strcpy (buffer_ + 1, symbol_); \
strcpy (buffer_ + (SYMBOL_LENGTH) + 1, "$lazy_ptr"); \
} \
} while (0)
2001-10-22 16:43:31 +02:00
#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section
2001-10-22 16:43:31 +02:00
#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#define EH_FRAME_SECTION_NAME "__TEXT"
#define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms+live_support"
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
Index: gcc/gcc/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * config/darwin.h (LINK_SPEC): Default weak_reference_mismatches to 'non-weak'. (MAKE_DECL_ONE_ONLY): Set DECL_WEAK. (ASM_MAKE_LABEL_LINKONCE): Delete. (ASM_WEAKEN_DECL): New. (ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY. (ASM_DECLARE_FUNCTION_NAME): Likewise. (TEXT_SECTION_ASM_OP): Add a tab. (DATA_SECTION_ASM_OP): Likewise. (SECTION_FUNCTION): Add a tab. Use fputs. Don't call data_section on every section change. (EXTRA_SECTIONS): Add a bunch of new extra sections. (EXTRA_SECTION_FUNCTIONS): Likewise. (USE_SELECT_SECTION_FOR_FUNCTIONS): Define. (JCR_SECTION_NAME): Define. (TARGET_SECTION_TYPE_FLAGS): Don't define. * config/darwin.c (darwin_encode_section_info): A symbol is defined in this file if it is not weak. (textcoal_section): Delete. (datacoal_section): Delete. (darwin_make_decl_one_only): Delete. (machopic_select_section): Handle functions. (darwin_asm_named_section): Add a tab. (darwin_section_type_flags): Delete. (darwin_unique_section): Delete contents. (darwin_emit_unwind_label): Add a tab. Make decls weak if DECL_WEAK is set. * config/darwin-protos.h (darwin_section_type_flags): Delete. (darwin_make_decl_one_only): Delete. (text_coal_section): New. (text_unlikely_section): New. (text_unlikely_coal_section): New. (const_coal_section): New. (data_coal_section): New. (const_data_coal_section): New. * varasm.c (function_section): Honour USE_SELECT_SECTION_FOR_FUNCTIONS. * dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when TARGET_USES_WEAK_UNWIND_INFO is in effect. * dbxout.c (dbxout_source_file): Don't change sections while a function is being output. Index: gcc/testsuite/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * objc.dg/image-info.m: Update for changes to section selection. Index: libjava/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * Makefile.am (DARWIN_CRT_SRC): New. (libgcj_la_SOURCES): Use it. * configure.ac: Define USING_DARWIN_CRT when on Darwin. * darwin.cc: New file. * include/jvm.h (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. * java/lang/Class.h: Include stddef.h. (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New prototype. (Object): Make '_Jv_RegisterClasses_Counted' a friend. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify. (_Jv_RegisterClasses_Counted): New function. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. Index: libstdc++-v3/ChangeLog 2004-10-25 Geoffrey Keating <geoffk@apple.com> * libsupc++/new_op.cc (new): Make weak. * libsupc++/new_opnt.cc (new): Make weak. * libsupc++/new_opv.cc (new): Make weak. * libsupc++/new_opvnt.cc (new): Make weak. * libsupc++/delete_op.cc (delete): Make weak. * libsupc++/delete_opnt.cc (delete): Make weak. * libsupc++/delete_opv.cc (delete): Make weak. * libsupc++/delete_opvnt.cc (delete): Make weak. From-SVN: r89572
2004-10-26 08:09:05 +02:00
/* Java runtime class list. */
#define JCR_SECTION_NAME "__DATA,jcr,regular,no_dead_strip"
#undef ASM_PREFERRED_EH_DATA_FORMAT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
(((CODE) == 2 && (GLOBAL) == 1) \
? (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4) : \
((CODE) == 1 || (GLOBAL) == 0) ? DW_EH_PE_pcrel : DW_EH_PE_absptr)
#define ASM_OUTPUT_DWARF_DELTA(FILE,SIZE,LABEL1,LABEL2) \
darwin_asm_output_dwarf_delta (FILE, SIZE, LABEL1, LABEL2)
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(ASM_OUT_FILE, ENCODING, SIZE, ADDR, DONE) \
if (ENCODING == ASM_PREFERRED_EH_DATA_FORMAT (2, 1)) { \
darwin_non_lazy_pcrel (ASM_OUT_FILE, ADDR); \
goto DONE; \
}
/* Experimentally, putting jump tables in text is faster on SPEC.
Also this is needed for correctness for coalesced functions. */
#ifndef JUMP_TABLES_IN_TEXT_SECTION
#define JUMP_TABLES_IN_TEXT_SECTION 1
#endif
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
Enabled linkonce support for Darwin. * target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. From-SVN: r79394
2004-03-12 18:09:03 +01:00
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION darwin_asm_named_section
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
do { \
c_register_pragma (0, "mark", darwin_pragma_ignore); \
c_register_pragma (0, "options", darwin_pragma_options); \
c_register_pragma (0, "segment", darwin_pragma_ignore); \
c_register_pragma (0, "unused", darwin_pragma_unused); \
} while (0)
#undef ASM_APP_ON
#define ASM_APP_ON ""
#undef ASM_APP_OFF
#define ASM_APP_OFF ""
re PR libobjc/11572 (GNU libobjc no longer compiled on Darwin) 2004-09-15 Andrew Pinski <pinskia@physics.uc.edu> PR target/11572 * c-incpath.h (target_c_incpath_s): Add extra_pre_includes. Add two parameters to extra_includes. (C_INCPATH_INIT): Remove. * c-incpath.c (register_include_chains): Call extra_pre_includes before adding the standard include directory. Update call to extra_includes. (!defined TARGET_EXTRA_INCLUDES): Update hook_void_charptr_charptr_int and add !define TARGET_EXTRA_PRE_INCLUDES. (!define TARGET_EXTRA_INCLUDES): Define as hook_void_charptr_charptr_int. (!define TARGET_EXTRA_PRE_INCLUDES): Likewise. (target_c_incpath): Always declare. * fixinclude.c (defined TARGET_EXTRA_INCLUDES): Declare a empty function. (define TARGET_EXTRA_PRE_INCLUDES): Likewise. * config/darwin.h: (darwin_register_frameworks): Update for the two new parameters. (darwin_register_objc_includes): Add prototype. (TARGET_EXTRA_PRE_INCLUDES): Define. * config/darwin-c.c (darwin_register_objc_includes): New function. (darwin_register_frameworks): Update for the two new parameters. (target_c_incpath): Remove. * config/t-darwin (darwin-c.o): Add $(PREPROCESSOR_DEFINES) to the compile line. * doc/tm.texi (TARGET_EXTRA_INCLUDES): Document the two new parameters. (TARGET_EXTRA_PRE_INCLUDES): Document. * gcc.c (spec_function): Add replace-outfile. (replace_outfile_spec_function): New function. * config/darwin.h (LINK_SPEC): Add replace -lobjc with -lobjc-gnu if -fgnu-runtime is supplied. * invoke.texi (replace-outfile): Document. From-SVN: r87588
2004-09-16 08:49:59 +02:00
void darwin_register_frameworks (const char *, const char *, int);
void darwin_register_objc_includes (const char *, const char *, int);
#define TARGET_EXTRA_PRE_INCLUDES darwin_register_objc_includes
Add framework support for darwin. * c-incpath.c: Include target.h and machmode.h. (add_path): Use a consistent style for cpp_dir. Initialize p->construct to 0. (add_cpp_dir_path): New. (register_include_chains): Add use of extra_includes callback. (hook_void_int): Add. (target_c_incpath): Add. * c-incpath.h (add_cpp_dir_path): New. (target_c_incpath_s): Add. (target_c_incpath): Add. (C_INCPATH_INIT): Add. * c-opts.c (c_common_missing_argument, c_common_handle_option): Add -F argument processing. * c.opt: Add -F argument processing. * gcc.c (trad_capable_cpp): Add -F argument processing. * cppfiles.c (find_file_in_dir): Update to use construct callback. (search_path_exhausted, cpp_get_path, cpp_get_buffer, cpp_get_prev): New. (_cpp_find_file): Use search_path_exhausted. (make_cpp_dir): Initialize construct to 0. * cpplib.h (missing_header_cb cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New. (cpp_callbacks): Add missing_header (cpp_dir): Add construct. * target-def.h: (TARGET_OPTF): New. * hooks.c (hook_void_int, hook_void_charptr): Add. * hooks.h (hook_void_int, hook_void_charptr): Add. * Makefile.in (c-incpath.o) : Add $(TARGET_H) and $(MACHMODE_H) dependencies. * doc/invoke.texi (Darwin Options): Document -F. * doc/tm.texi (TARGET_EXTRA_INCLUDES): Add. (TARGET_OPTF): Add. * fix-header.c (target_c_incpath): Add. * config/darwin-c.c: Add c-incpath.h include. (using_frameworks, find_subframework_file, find_subframework_header, add_system_framework_path, frameworks_in_use, num_frameworks, max_frameworks, add_framework, find_framework, struct framework_header, framework_header_dirs, framework_construct_pathname, find_subframework_file, add_system_framework_path, add_framework_path, framework_defaults, darwin_register_frameworks, find_subframework_header): Add. * config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New. (TARGET_OPTION_TRANSLATE_TABLE): Add -framework support. (CPP_SPEC): Add __APPLE_CC__ support. * t-darwin (darwin-c.o): Add c-incpath.h dependency. From-SVN: r78875
2004-03-04 01:18:54 +01:00
#define TARGET_EXTRA_INCLUDES darwin_register_frameworks
void add_framework_path (char *);
#define TARGET_OPTF add_framework_path
#define TARGET_POSIX_IO
Index: ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * config.gcc (*-*-darwin*): Only one target-specific header file for generic darwin. (powerpc-*-darwin*): Add version-specific header files. * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. * config.in: Regenerate. * configure: Regenerate. * gcc.c: Include xregex.h. (version_compare_spec_function): New. (spec_function): Add version-compare. (replace_outfile_spec_function): Reformat comment. (compare_version_strings): New. * config/darwin-c.c (version_as_macro): New. (builtin_define): New. (darwin_cpp_builtins): New. * config/darwin-protos.h (darwin_cpp_builtins): New. * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. (LIB_SPEC): Make unconditional, update comment. (TARGET_C99_FUNCTIONS): Define. * config/darwin.opt: Sort. (mmacosx-version-min=): New. * config/darwin7.h: Delete. * config/darwin8.h: Delete. * config/i386/darwin.h (): Call darwin_cpp_builtins. * config/rs6000/darwin.h (): Call darwin_cpp_builtins. (TARGET_C99_FUNCTIONS): Define. * config/rs6000/darwin7.h: New. * config/rs6000/darwin8.h: New. * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= (-mmacosx-version-min): Document. Index: testsuite/ChangeLog 2005-07-07 Geoffrey Keating <geoffk@apple.com> * gcc.dg/darwin-version-1.c: New. * gcc.dg/builtins-18.c: On Darwin, needs -mmacosx-version-min=10.3. * gcc.dg/builtins-20.c: Likewise. * gcc.dg/builtins-53.c: Likewise. * gcc.dg/torture/builtins-convert-1.c: Likewise. * gcc.dg/torture/builtins-convert-2.c: Likewise. * gcc.dg/torture/builtins-convert-3.c: Likewise. * gcc.dg/torture/builtins-power-1.c: Likewise. * gcc.dg/builtins-config.h: Complain if macosx-version-min not set on Darwin. From-SVN: r101753
2005-07-08 07:51:06 +02:00
/* All new versions of Darwin have C99 functions. */
#define TARGET_C99_FUNCTIONS 1
#define WINT_TYPE "int"
#endif /* CONFIG_DARWIN_H */