aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2010-10-11 16:52:12 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2010-10-11 16:52:12 +0000
commit74b90fe2a00d558380d9ae40a309a7b97dc3bdb5 (patch)
tree591e6322718efbd38a18ee5189259cb088b8b372 /gcc/config/pa
parent2861cfa1eb2f58ba3b9d987e552b0d34ed9fa9c6 (diff)
downloadgcc-74b90fe2a00d558380d9ae40a309a7b97dc3bdb5.zip
gcc-74b90fe2a00d558380d9ae40a309a7b97dc3bdb5.tar.gz
gcc-74b90fe2a00d558380d9ae40a309a7b97dc3bdb5.tar.bz2
re PR middle-end/45862 (SUPPORTS_WEAK is documented as a C expression, used as a compile time constant)
PR middle-end/45862 * doc/tm.texi.in (SUPPORTS_WEAK): Update. (TARGET_SUPPORTS_WEAK): New. * doc/tm.texi: Regenerate. * defaults.h (SUPPORTS_WEAK): Update comment. (TARGET_SUPPORTS_WEAK): New. * dwarf2asm.c (USE_LINKONCE_INDIRECT): Update define. * varasm.c (assemble_external): Use TARGET_SUPPORTS_WEAK instead of SUPPORTS_WEAK. (merge_weak, declare_weak, do_assemble_alias, supports_one_only, make_decl_one_only): Likewise. * config/pa/som.h (SUPPORTS_WEAK): Rename defines to TARGET_SUPPORTS_WEAK. (SUPPORTS_ONE_ONLY, MAKE_DECL_ONE_ONLY): Use TARGET_SUPPORTS_WEAK instead of SUPPORTS_WEAK. From-SVN: r165319
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/som.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
index 53dddb7..c8f77d4 100644
--- a/gcc/config/pa/som.h
+++ b/gcc/config/pa/som.h
@@ -272,11 +272,13 @@ do { \
#define ALWAYS_STRIP_DOTDOT 1
/* If GAS supports weak, we can support weak when we have working linker
- support for secondary definitions and are generating code for GAS. */
+ support for secondary definitions and are generating code for GAS.
+ This is primarily for one-only support as SOM doesn't allow undefined
+ weak symbols. */
#ifdef HAVE_GAS_WEAK
-#define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS)
+#define TARGET_SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS)
#else
-#define SUPPORTS_WEAK 0
+#define TARGET_SUPPORTS_WEAK 0
#endif
/* CVS GAS as of 4/28/04 supports a comdat parameter for the .nsubspa
@@ -289,7 +291,7 @@ do { \
#endif
/* We can support one only if we support weak or comdat. */
-#define SUPPORTS_ONE_ONLY (SUPPORTS_WEAK || SUPPORTS_SOM_COMDAT)
+#define SUPPORTS_ONE_ONLY (TARGET_SUPPORTS_WEAK || SUPPORTS_SOM_COMDAT)
/* We use DECL_COMMON for uninitialized one-only variables as we don't
have linkonce .bss. We use SOM secondary definitions or comdat for
@@ -300,7 +302,7 @@ do { \
&& (DECL_INITIAL (DECL) == 0 \
|| DECL_INITIAL (DECL) == error_mark_node)) \
DECL_COMMON (DECL) = 1; \
- else if (SUPPORTS_WEAK) \
+ else if (TARGET_SUPPORTS_WEAK) \
DECL_WEAK (DECL) = 1; \
} while (0)