diff options
author | Bob Wilson <bob.wilson@acm.org> | 2003-04-26 00:06:51 +0000 |
---|---|---|
committer | Bob Wilson <bwilson@gcc.gnu.org> | 2003-04-26 00:06:51 +0000 |
commit | 6a2b287ffdff8f3534437cd81d930c9d5560534a (patch) | |
tree | 421c31013f1b82aeaacb28906f87c86681ce803c /gcc/config/xtensa | |
parent | 01475329b3a61129805fae3d2cdfb11ef8d87894 (diff) | |
download | gcc-6a2b287ffdff8f3534437cd81d930c9d5560534a.zip gcc-6a2b287ffdff8f3534437cd81d930c9d5560534a.tar.gz gcc-6a2b287ffdff8f3534437cd81d930c9d5560534a.tar.bz2 |
linux.h (TARGET_OS_CPP_BUILTINS): Remove definition of _GNU_SOURCE.
* config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Remove definition of
_GNU_SOURCE. Add definitions of __PIC__ and __pic__.
(SUBTARGET_CPP_SPEC): Define.
(LIB_SPEC): Delete.
* config/xtensa/xtensa-protos.h (xtensa_declare_object): Delete.
* config/xtensa/xtensa.c (xtensa_declare_object): Delete.
* config/xtensa/xtensa.h (CPP_SPEC, SUBTARGET_CPP_SPEC, EXTRA_SPECS):
Define.
(ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete.
(ASM_OUTPUT_ALIGNED_BSS, BSS_SECTION_ASM_OP): Define.
From-SVN: r66083
Diffstat (limited to 'gcc/config/xtensa')
-rw-r--r-- | gcc/config/xtensa/linux.h | 16 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa-protos.h | 4 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 18 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.h | 27 |
4 files changed, 24 insertions, 41 deletions
diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index 8f10577..4a1b5f6 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -1,6 +1,6 @@ /* Xtensa Linux configuration. Derived from the configuration for GCC for Intel i386 running Linux. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -26,11 +26,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA builtin_define ("__ELF__"); \ builtin_define ("__gnu_linux__"); \ builtin_assert ("system=posix"); \ - /* The GNU C++ standard library requires this. */ \ - if (c_language == clk_cplusplus) \ - builtin_define ("_GNU_SOURCE"); \ + builtin_define ("__PIC__"); \ + builtin_define ("__pic__"); \ } while (0) +#undef SUBTARGET_CPP_SPEC +#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + #undef TARGET_VERSION #define TARGET_VERSION fputs (" (Xtensa GNU/Linux with ELF)", stderr); @@ -45,12 +47,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #undef ASM_FINAL_SPEC -#undef LIB_SPEC -#define LIB_SPEC \ - "%{shared: -lc} \ - %{!shared: %{pthread:-lpthread} \ - %{profile:-lc_p} %{!profile: -lc}}" - #undef LINK_SPEC #define LINK_SPEC \ "%{shared:-shared} \ diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h index d5de1c8..b248da9 100644 --- a/gcc/config/xtensa/xtensa-protos.h +++ b/gcc/config/xtensa/xtensa-protos.h @@ -1,5 +1,5 @@ /* Prototypes of target machine for GNU compiler for Xtensa. - Copyright 2001,2002 Free Software Foundation, Inc. + Copyright 2001,2002,2003 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. @@ -109,8 +109,6 @@ extern int xtensa_mem_offset PARAMS ((unsigned, enum machine_mode)); extern void xtensa_setup_frame_addresses PARAMS ((void)); extern int xtensa_dbx_register_number PARAMS ((int)); extern void override_options PARAMS ((void)); -extern void xtensa_declare_object - PARAMS ((FILE *, char *, char *, char *, int)); extern long compute_frame_size PARAMS ((int)); extern int xtensa_frame_pointer_required PARAMS ((void)); extern void xtensa_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 5e7835d..f54e88e 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for Tensilica's Xtensa architecture. - Copyright 2001,2002 Free Software Foundation, Inc. + Copyright 2001,2002,2003 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. @@ -2086,22 +2086,6 @@ print_operand_address (file, addr) } -/* Emit either a label, .comm, or .lcomm directive. */ - -void -xtensa_declare_object (file, name, init_string, final_string, size) - FILE *file; - char *name; - char *init_string; - char *final_string; - int size; -{ - fputs (init_string, file); /* "", "\t.comm\t", or "\t.lcomm\t" */ - assemble_name (file, name); - fprintf (file, final_string, size); /* ":\n", ",%u\n", ",%u\n" */ -} - - void xtensa_output_literal (file, x, mode, labelno) FILE *file; diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index 141aa50..ace3f4b 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -1,5 +1,5 @@ /* Definitions of Tensilica's Xtensa target machine for GNU compiler. - Copyright 2001,2002 Free Software Foundation, Inc. + Copyright 2001,2002,2003 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. @@ -208,6 +208,15 @@ extern unsigned xtensa_current_frame_size; } \ } while (0) +#define CPP_SPEC " %(subtarget_cpp_spec) " + +#ifndef SUBTARGET_CPP_SPEC +#define SUBTARGET_CPP_SPEC "" +#endif + +#define EXTRA_SPECS \ + { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, + #ifdef __XTENSA_EB__ #define LIBGCC2_WORDS_BIG_ENDIAN 1 #else @@ -1377,14 +1386,9 @@ typedef struct xtensa_args { /* Globalizing directive for a label. */ #define GLOBAL_ASM_OP "\t.global\t" -/* This says how to define a global common symbol. */ -#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ - xtensa_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", (SIZE)) - -/* This says how to define a local common symbol (ie, not visible to - linker). */ -#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ - xtensa_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)) +/* Declare an uninitialized external linkage data object. */ +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ @@ -1430,8 +1434,9 @@ typedef struct xtensa_args { /* Define the strings to put out for each section in the object file. */ -#define TEXT_SECTION_ASM_OP "\t.text" /* instructions */ -#define DATA_SECTION_ASM_OP "\t.data" /* large data */ +#define TEXT_SECTION_ASM_OP "\t.text" +#define DATA_SECTION_ASM_OP "\t.data" +#define BSS_SECTION_ASM_OP "\t.section\t.bss" /* Define output to appear before the constant pool. If the function |