netware.c: Include langhooks.h.

2009-08-28  Jan Beulich  <jbeulich@novell.com>

	* 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: r151166
This commit is contained in:
Jan Beulich 2009-08-28 15:40:31 +00:00 committed by Jan Beulich
parent e17e06f81a
commit 0d605e5000
4 changed files with 39 additions and 46 deletions

View File

@ -1,3 +1,15 @@
2009-08-28 Jan Beulich <jbeulich@novell.com>
* 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 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline:

View File

@ -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;
}
}

View File

@ -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])

View File

@ -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