From a858e91226a37f6c7bfb77c3cadb5a844d8cebe2 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 28 Aug 2009 15:28:11 +0000 Subject: [PATCH] netware.c: Include langhooks.h. 2009-08-28 Jan Beulich * config/i386/netware.c: Include langhooks.h. (i386_nlm_encode_section_info): Simplify. (netware_override_options): Delete. * config/i386/netware.h (netware_override_options): Delete declaration. (OVERRIDE_OPTIONS): Delete definition. (SUBTARGET_OVERRIDE_OPTIONS): Define. (ASM_COMMENT_START): Define. * config/i386/nwld.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. From-SVN: r151164 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/i386/netware.c | 42 +++++++----------------------------------- gcc/config/i386/netware.h | 24 +++++++++++++----------- gcc/config/i386/nwld.h | 7 +++++++ 4 files changed, 39 insertions(+), 46 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eba4de6..2a14047 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,17 @@ 2009-08-28 Jan Beulich + * config/i386/netware.c: Include langhooks.h. + (i386_nlm_encode_section_info): Simplify. + (netware_override_options): Delete. + * config/i386/netware.h (netware_override_options): Delete + declaration. + (OVERRIDE_OPTIONS): Delete definition. + (SUBTARGET_OVERRIDE_OPTIONS): Define. + (ASM_COMMENT_START): Define. + * config/i386/nwld.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. + +2009-08-28 Jan Beulich + * configure.ac: For in-tree ld, do a plain version check to determine whether comdat groups are supported. * configure: Regenerate. diff --git a/gcc/config/i386/netware.c b/gcc/config/i386/netware.c index 7f040d4..fa9ffbb 100644 --- a/gcc/config/i386/netware.c +++ b/gcc/config/i386/netware.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "flags.h" #include "tm_p.h" #include "toplev.h" +#include "langhooks.h" #include "ggc.h" /* Return string which is the function name, identified by ID, modified @@ -179,16 +180,15 @@ i386_nlm_encode_section_info (tree decl, rtx rtl, int first) { default_encode_section_info (decl, rtl, first); - if (first - && TREE_CODE (decl) == FUNCTION_DECL + if (TREE_CODE (decl) == FUNCTION_DECL /* Do not change the identifier if a verbatim asmspec or if stdcall suffix already added. */ && *IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) != '*' - && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@')) + && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@') + /* FIXME: Imported stdcall names are not modified by the Ada frontend. + Check and decorate the RTL name now. */ + && strcmp (lang_hooks.name, "GNU Ada") == 0) { - /* FIXME: In Ada, and perhaps other language frontends, - imported stdcall names may not yet have been modified. - Check and do it know. */ rtx symbol = XEXP (rtl, 0); tree new_id; tree old_id = DECL_ASSEMBLER_NAME (decl); @@ -196,14 +196,7 @@ i386_nlm_encode_section_info (tree decl, rtx rtl, int first) gcc_assert (GET_CODE (symbol) == SYMBOL_REF); if ((new_id = i386_nlm_maybe_mangle_decl_assembler_name (decl, old_id))) - { - /* These attributes must be present on first declaration, - change_decl_assembler_name will warn if they are added - later and the decl has been referenced, but duplicate_decls - should catch the mismatch first. */ - change_decl_assembler_name (decl, new_id); - XSTR (symbol, 0) = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - } + XSTR (symbol, 0) = IDENTIFIER_POINTER (new_id); } } @@ -233,24 +226,3 @@ i386_nlm_strip_name_encoding (const char *str) } return name; } - -/* Sometimes certain combinations of command options do not make - sense on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. - - Don't use this macro to turn on various extra optimizations for - `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ - -void -netware_override_options (void) -{ - override_options (); - - if (flag_pic) - { - error ("-fPIC and -fpic are not supported for this target"); - flag_pic = 0; - } -} diff --git a/gcc/config/i386/netware.h b/gcc/config/i386/netware.h index 4f1ef55..6b423e3 100644 --- a/gcc/config/i386/netware.h +++ b/gcc/config/i386/netware.h @@ -72,17 +72,16 @@ along with GCC; see the file COPYING3. If not see #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | \ MASK_FLOAT_RETURNS | MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT) -/* Sometimes certain combinations of command options do not make - sense on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. - - Don't use this macro to turn on various extra optimizations for - `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ -#undef OVERRIDE_OPTIONS -extern void netware_override_options (void); -#define OVERRIDE_OPTIONS netware_override_options () +/* Don't allow flag_pic to propagate since invalid relocations will + result otherwise. */ +#define SUBTARGET_OVERRIDE_OPTIONS \ +do { \ + if (flag_pic) \ + { \ + error ("-fPIC and -fpic are not supported for this target"); \ + flag_pic = 0; \ + } \ +} while (0) #undef MATH_LIBRARY #define MATH_LIBRARY "" @@ -99,6 +98,9 @@ extern void netware_override_options (void); #undef KEEP_AGGREGATE_RETURN_POINTER #define KEEP_AGGREGATE_RETURN_POINTER 1 +#undef ASM_COMMENT_START +#define ASM_COMMENT_START "#" + #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) (svr4_dbx_register_map[n]) diff --git a/gcc/config/i386/nwld.h b/gcc/config/i386/nwld.h index be41e96..3a0afc8 100644 --- a/gcc/config/i386/nwld.h +++ b/gcc/config/i386/nwld.h @@ -55,6 +55,13 @@ void nwld_named_section_asm_out_destructor (rtx, int); #define TARGET_ASM_CONSTRUCTOR nwld_named_section_asm_out_constructor #define TARGET_ASM_DESTRUCTOR nwld_named_section_asm_out_destructor +#define SUBSUBTARGET_OVERRIDE_OPTIONS \ +do { \ + /* XXX This can be enabled once gas output meets nwld's needs. */ \ + /* if (!flag_unwind_tables && !flag_exceptions) */ \ + flag_dwarf2_cfi_asm = 0; \ +} while (0) + #undef EH_FRAME_SECTION_NAME #define EH_FRAME_SECTION_NAME ".eh_frame"TARGET_SUB_SECTION_SEPARATOR -- 2.7.4