aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2004-09-09 17:11:18 +0000
committerZack Weinberg <zack@gcc.gnu.org>2004-09-09 17:11:18 +0000
commit15072eb1299f2e6f415798e4bbaf054ddc905645 (patch)
tree22dfd0c501438c728e2e20b8cf0e2db8c8e0cfb7
parentc2433d7d163406078b767dcc45c9426a089ce91a (diff)
downloadgcc-15072eb1299f2e6f415798e4bbaf054ddc905645.zip
gcc-15072eb1299f2e6f415798e4bbaf054ddc905645.tar.gz
gcc-15072eb1299f2e6f415798e4bbaf054ddc905645.tar.bz2
defaults.h (MULTIPLE_SYMBOL_SPACES): Provide default.
* defaults.h (MULTIPLE_SYMBOL_SPACES): Provide default. * config/arm/pecoff.h, config/i386/beos-elf.h * config/i386/cygming.h, config/i386/i386-interix.h: Define MULTIPLE_SYMBOL_SPACES to 1, not nothing. Remove comment cloned from manual. * doc/tm.texi: Update description of MULTIPLE_SYMBOL_SPACES. cp: * decl2.c (import_export_class) * lex.c (handle_pragma_interface): Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef. From-SVN: r87243
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/arm/pe.h7
-rw-r--r--gcc/config/i386/beos-elf.h7
-rw-r--r--gcc/config/i386/cygming.h7
-rw-r--r--gcc/config/i386/i386-interix.h7
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl2.c8
-rw-r--r--gcc/cp/lex.c6
-rw-r--r--gcc/defaults.h5
-rw-r--r--gcc/doc/tm.texi11
10 files changed, 43 insertions, 32 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76581c8..bf58622 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2004-09-09 Zack Weinberg <zack@codesourcery.com>
+
+ * defaults.h (MULTIPLE_SYMBOL_SPACES): Provide default.
+ * config/arm/pecoff.h, config/i386/beos-elf.h
+ * config/i386/cygming.h, config/i386/i386-interix.h:
+ Define MULTIPLE_SYMBOL_SPACES to 1, not nothing. Remove
+ comment cloned from manual.
+ * doc/tm.texi: Update description of MULTIPLE_SYMBOL_SPACES.
+
2004-09-09 Frank Ch. Eigler <fche@redhat.com>
* builtins.c (build_va_arg_indirect_ref): New function.
@@ -393,7 +402,7 @@
(bdesc_int_void2arg, bdesc_prefetches): New arrays.
(frv_init_builtins): Register the above builtins.
(frv_int_to_acc): Use ACC_MASK to check for valid accumulator
- registers. Turn the referenced accumulators into global registers.
+ registers. Turn the referenced accumulators into global registers.
(frv_read_iacc_argument): New function.
(frv_expand_int_void2arg, frv_expand_prefetches): New functions.
(frv_split_iacc_move): New function.
diff --git a/gcc/config/arm/pe.h b/gcc/config/arm/pe.h
index 63c127c..afaade2 100644
--- a/gcc/config/arm/pe.h
+++ b/gcc/config/arm/pe.h
@@ -78,11 +78,8 @@
call_used_regs [11] = 1;
-/* Define this macro if in some cases global symbols from one translation
- unit may not be bound to undefined symbols in another translation unit
- without user intervention. For instance, under Microsoft Windows
- symbols must be explicitly imported from shared libraries (DLLs). */
-#define MULTIPLE_SYMBOL_SPACES
+/* PE/COFF uses explicit import from shared libraries. */
+#define MULTIPLE_SYMBOL_SPACES 1
#define TARGET_ASM_UNIQUE_SECTION arm_pe_unique_section
#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
diff --git a/gcc/config/i386/beos-elf.h b/gcc/config/i386/beos-elf.h
index b0de9bb..23b3a22 100644
--- a/gcc/config/i386/beos-elf.h
+++ b/gcc/config/i386/beos-elf.h
@@ -235,8 +235,5 @@ Boston, MA 02111-1307, USA. */
/* BeOS headers are C++-aware (and often use C++). */
#define NO_IMPLICIT_EXTERN_C
-/* Define this macro if in some cases global symbols from one translation
- unit may not be bound to undefined symbols in another translation unit
- without user intervention. For instance, under Microsoft Windows
- symbols must be explicitly imported from shared libraries (DLLs). */
-#define MULTIPLE_SYMBOL_SPACES
+/* BeOS uses explicit import from shared libraries. */
+#define MULTIPLE_SYMBOL_SPACES 1
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index d04ef6e..a54e8a9 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -258,11 +258,8 @@ do { \
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
-/* Define this macro if in some cases global symbols from one translation
- unit may not be bound to undefined symbols in another translation unit
- without user intervention. For instance, under Microsoft Windows
- symbols must be explicitly imported from shared libraries (DLLs). */
-#define MULTIPLE_SYMBOL_SPACES
+/* Windows uses explicit import from shared libraries. */
+#define MULTIPLE_SYMBOL_SPACES 1
extern void i386_pe_unique_section (TREE, int);
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h
index 971f7cc..5d2d72f 100644
--- a/gcc/config/i386/i386-interix.h
+++ b/gcc/config/i386/i386-interix.h
@@ -337,11 +337,8 @@ while (0)
.data$ sections correctly. See corresponding note in i386/interix.c.
MK. */
-/* Define this macro if in some cases global symbols from one translation
- unit may not be bound to undefined symbols in another translation unit
- without user intervention. For instance, under Microsoft Windows
- symbols must be explicitly imported from shared libraries (DLLs). */
-#define MULTIPLE_SYMBOL_SPACES
+/* Interix uses explicit import from shared libraries. */
+#define MULTIPLE_SYMBOL_SPACES 1
extern void i386_pe_unique_section (tree, int);
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2792cca..9bd87e1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-09 Zack Weinberg <zack@codesourcery.com>
+
+ * decl2.c (import_export_class)
+ * lex.c (handle_pragma_interface):
+ Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
+
2004-09-08 Ziemowit Laski <zlaski@apple.com>
* Make-lang.in (cp/semantics.o): Depend on c-common.h.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 03c468d..bb3e4e8 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1438,7 +1438,7 @@ import_export_class (tree ctype)
if (CLASSTYPE_INTERFACE_KNOWN (ctype))
return;
- /* If MULTIPLE_SYMBOL_SPACES is defined and we saw a #pragma interface,
+ /* If MULTIPLE_SYMBOL_SPACES is set and we saw a #pragma interface,
we will have CLASSTYPE_INTERFACE_ONLY set but not
CLASSTYPE_INTERFACE_KNOWN. In that case, we don't want to use this
heuristic because someone will supply a #pragma implementation
@@ -1472,10 +1472,10 @@ import_export_class (tree ctype)
import_export = (DECL_REALLY_EXTERN (method) ? -1 : 1);
}
-#ifdef MULTIPLE_SYMBOL_SPACES
- if (import_export == -1)
+ /* When MULTIPLE_SYMBOL_SPACES is set, we cannot count on seeing
+ a definition anywhere else. */
+ if (MULTIPLE_SYMBOL_SPACES && import_export == -1)
import_export = 0;
-#endif
/* Allow backends the chance to overrule the decision. */
if (targetm.cxx.import_export_class)
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 468585e..2a48d99 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -505,9 +505,9 @@ handle_pragma_interface (cpp_reader* dfile ATTRIBUTE_UNUSED )
}
interface_only = interface_strcmp (main_filename);
-#ifdef MULTIPLE_SYMBOL_SPACES
- if (! interface_only)
-#endif
+ /* If MULTIPLE_SYMBOL_SPACES is set, we cannot assume that we can see
+ a definition in another file. */
+ if (!MULTIPLE_SYMBOL_SPACES || !interface_only)
interface_unknown = 0;
finfo->interface_only = interface_only;
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 588d0fc..849e5a9 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -291,6 +291,11 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
# define USE_COMMON_FOR_ONE_ONLY 1
#endif
+/* By default we can assume that all global symbols are in one namespace,
+ across all shared libraries. */
+#ifndef MULTIPLE_SYMBOL_SPACES
+# define MULTIPLE_SYMBOL_SPACES 0
+#endif
/* If the target supports init_priority C++ attribute, give
SUPPORTS_INIT_PRIORITY a nonzero value. */
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 0734b2c..df72053 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9114,10 +9114,13 @@ You need not define this macro if it would always return zero.
@end defmac
@defmac MULTIPLE_SYMBOL_SPACES
-Define this macro if in some cases global symbols from one translation
-unit may not be bound to undefined symbols in another translation unit
-without user intervention. For instance, under Microsoft Windows
-symbols must be explicitly imported from shared libraries (DLLs).
+Define this macro as a C expression that is nonzero if, in some cases,
+global symbols from one translation unit may not be bound to undefined
+symbols in another translation unit without user intervention. For
+instance, under Microsoft Windows symbols must be explicitly imported
+from shared libraries (DLLs).
+
+You need not define this macro if it would always evaluate to zero.
@end defmac
@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{clobbers})