summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-11 08:33:21 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-11 08:33:21 +0000
commit40109983a380ab2b69d8c1d6dfc186814987614e (patch)
tree9b4a93a8c6ef46d7812bac262156dcddbbcf0593 /gcc
parent877a501e6e18f74bc9b0edc59e5318188a7c0fef (diff)
downloadgcc-40109983a380ab2b69d8c1d6dfc186814987614e.tar.gz
Index: ChangeLog
2003-07-10 Geoffrey Keating <geoffk@apple.com> * c-decl.c (finish_decl): Handle 'used' here... * cgraphunit.c (cgraph_finalize_function): ... and here ... * c-common.c: (handle_used_attribute): ... not here. * configure.in (onstep): Support --enable-intermodule. * Makefile.in (OBJS-common): New. (OBJS-md): New. (OBJS-archive): New. (OBJS): Build from OBJS-common, OBJS-md, OBJS-archive. (OBJS-onestep): New. (libbackend.a): Support @onestep@. (libbackend.o): New. * configure: Regenerate. * c-common.h (c_reset_state): New prototype. (c_parse_file): New prototype. (finish_file): Move prototype from c-tree.h. * c-decl.c: Include <hashtab.h>. (builtin_decls): New. (current_file_decl): New. (duplicate_decls): Add extra parameter. Change all callers. Don't output duplicate common symbols. (link_hash_hash): New. (link_hash_eq): New. (poplevel): Handle popping of the top level. (warn_if_shadowing): Handle TRANSLATION_UNIT_DECL. (pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate. (pushdecl_top_level): Likewise. (redeclaration_error_message): Handle TRANSLATION_UNIT_DECL. (c_init_decl_processing): Create TRANSLATION_UNIT_DECL. (finish_decl): Handle TRANSLATION_UNIT_DECL. (merge_translation_unit_decls): New. (c_write_global_declarations): New. (c_reset_state): New. (implicitly_declare): Handle TRANSLATION_UNIT_DECL. * c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New. * c-objc-common.c (c_cannot_inline_tree_fn): Handle TRANSLATION_UNIT_DECL. (c_objc_common_finish_file): Call merge_translation_unit_decls. * c-opts.c (in_fnames): Rename from in_fname. (c_common_decode_option): Handle multiple input filenames. (c_common_post_options): Likewise. (c_common_parse_file): Likewise; also, call c_parse_file rather than yyparse. * c-parse.in: Move cleanup code to c_parse_file. (free_parser_stacks): Move contents to c_parse_file. (c_parse_file): New. * c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT for integer types. (C_DECL_FILE_SCOPE): New. (finish_file): Move prototype to c-common.h. (merge_translation_unit_decls): New prototype. (comptypes): Add extra parameter to prototype. (c_write_global_declarations): New prototype. * c-typeck.c (tagged_types_tu_compatible_p): New. (function_types_compatible_p): Add extra parameter, change all callers. (type_lists_compatible_p): Likewise. (comptypes): Likewise. (struct tagged_tu_seen): New. (tagged_tu_seen_base): New. (build_unary_op): Handle TRANSLATION_UNIT_DECL. (c_mark_addressable): Remove #if 0 code. * calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add comment explaining why it shouldn't have to. * cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY options. * cppinit.c (cpp_read_next_file): New. (cpp_read_main_file): Use it. * cpplib.c (undefine_macros): New. (cpp_undef_all): New. * cpplib.h (cpp_read_next_file): Prototype. (cpp_undef_all): Prototype. * langhooks-def.h (write_global_declarations): Remove prototype. * toplev.h (write_global_declarations): Add prototype. * tree.c (decl_type_context): Use switch statement, handle TRANSLATION_UNIT_DECL. * tree.def: Update documentation for TRANSLATION_UNIT_DECL. (TRANSLATION_UNIT_DECL): New kind of tree. * tree.h: Update documentation for TRANSLATION_UNIT_DECL. * Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies. * doc/invoke.texi: Make attempt to document new functionality. 2003-05-19 Per Bothner <bothner@apple.com> * gcc.c (combine_inputs): New. (process_command): Set combine_inputs. (do_spec_1): Handle combine_inputs. (main): Likewise. Index: cp/ChangeLog 2003-07-10 Geoffrey Keating <geoffk@apple.com> * decl.c (cp_finish_decl): Handle 'used' attribute. * cp-lang.c (c_reset_state): New dummy routine. * cp-tree.h (finish_file): Move prototype to c-common.h. * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69224 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog91
-rw-r--r--gcc/Makefile.in31
-rw-r--r--gcc/c-common.c1
-rw-r--r--gcc/c-common.h8
-rw-r--r--gcc/c-decl.c280
-rw-r--r--gcc/c-lang.c3
-rw-r--r--gcc/c-objc-common.c8
-rw-r--r--gcc/c-opts.c61
-rw-r--r--gcc/c-parse.in31
-rw-r--r--gcc/c-tree.h20
-rw-r--r--gcc/c-typeck.c233
-rw-r--r--gcc/calls.c10
-rw-r--r--gcc/cgraph.h2
-rw-r--r--gcc/cgraphunit.c3
-rwxr-xr-xgcc/configure548
-rw-r--r--gcc/configure.in10
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/cp-lang.c6
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/decl.c4
-rw-r--r--gcc/cp/parser.c10
-rw-r--r--gcc/cppinit.c12
-rw-r--r--gcc/cpplib.c40
-rw-r--r--gcc/cpplib.h7
-rw-r--r--gcc/doc/invoke.texi29
-rw-r--r--gcc/gcc.c50
-rw-r--r--gcc/langhooks-def.h2
-rw-r--r--gcc/objc/objc-act.c9
-rw-r--r--gcc/toplev.h1
-rw-r--r--gcc/tree.c32
-rw-r--r--gcc/tree.def33
-rw-r--r--gcc/tree.h14
32 files changed, 1150 insertions, 448 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b175bdf684b..c6b09e7d29b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,94 @@
+2003-07-11 Geoffrey Keating <geoffk@apple.com>
+
+ * c-decl.c (finish_decl): Handle 'used' here...
+ * cgraphunit.c (cgraph_finalize_function): ... and here ...
+ * c-common.c: (handle_used_attribute): ... not here.
+
+ * configure.in (onstep): Support --enable-intermodule.
+ * Makefile.in (OBJS-common): New.
+ (OBJS-md): New.
+ (OBJS-archive): New.
+ (OBJS): Build from OBJS-common, OBJS-md, OBJS-archive.
+ (OBJS-onestep): New.
+ (libbackend.a): Support @onestep@.
+ (libbackend.o): New.
+ * configure: Regenerate.
+
+ * c-common.h (c_reset_state): New prototype.
+ (c_parse_file): New prototype.
+ (finish_file): Move prototype from c-tree.h.
+ * c-decl.c: Include <hashtab.h>.
+ (builtin_decls): New.
+ (current_file_decl): New.
+ (duplicate_decls): Add extra parameter. Change all callers. Don't
+ output duplicate common symbols.
+ (link_hash_hash): New.
+ (link_hash_eq): New.
+ (poplevel): Handle popping of the top level.
+ (warn_if_shadowing): Handle TRANSLATION_UNIT_DECL.
+ (pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate.
+ (pushdecl_top_level): Likewise.
+ (redeclaration_error_message): Handle TRANSLATION_UNIT_DECL.
+ (c_init_decl_processing): Create TRANSLATION_UNIT_DECL.
+ (finish_decl): Handle TRANSLATION_UNIT_DECL.
+ (merge_translation_unit_decls): New.
+ (c_write_global_declarations): New.
+ (c_reset_state): New.
+ (implicitly_declare): Handle TRANSLATION_UNIT_DECL.
+ * c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
+ * c-objc-common.c (c_cannot_inline_tree_fn): Handle
+ TRANSLATION_UNIT_DECL.
+ (c_objc_common_finish_file): Call merge_translation_unit_decls.
+ * c-opts.c (in_fnames): Rename from in_fname.
+ (c_common_decode_option): Handle multiple input filenames.
+ (c_common_post_options): Likewise.
+ (c_common_parse_file): Likewise; also, call c_parse_file rather than
+ yyparse.
+ * c-parse.in: Move cleanup code to c_parse_file.
+ (free_parser_stacks): Move contents to c_parse_file.
+ (c_parse_file): New.
+ * c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT
+ for integer types.
+ (C_DECL_FILE_SCOPE): New.
+ (finish_file): Move prototype to c-common.h.
+ (merge_translation_unit_decls): New prototype.
+ (comptypes): Add extra parameter to prototype.
+ (c_write_global_declarations): New prototype.
+ * c-typeck.c (tagged_types_tu_compatible_p): New.
+ (function_types_compatible_p): Add extra parameter, change all callers.
+ (type_lists_compatible_p): Likewise.
+ (comptypes): Likewise.
+ (struct tagged_tu_seen): New.
+ (tagged_tu_seen_base): New.
+ (build_unary_op): Handle TRANSLATION_UNIT_DECL.
+ (c_mark_addressable): Remove #if 0 code.
+ * calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add
+ comment explaining why it shouldn't have to.
+ * cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY
+ options.
+ * cppinit.c (cpp_read_next_file): New.
+ (cpp_read_main_file): Use it.
+ * cpplib.c (undefine_macros): New.
+ (cpp_undef_all): New.
+ * cpplib.h (cpp_read_next_file): Prototype.
+ (cpp_undef_all): Prototype.
+ * langhooks-def.h (write_global_declarations): Remove prototype.
+ * toplev.h (write_global_declarations): Add prototype.
+ * tree.c (decl_type_context): Use switch statement, handle
+ TRANSLATION_UNIT_DECL.
+ * tree.def: Update documentation for TRANSLATION_UNIT_DECL.
+ (TRANSLATION_UNIT_DECL): New kind of tree.
+ * tree.h: Update documentation for TRANSLATION_UNIT_DECL.
+ * Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies.
+ * doc/invoke.texi: Make attempt to document new functionality.
+
+ 2003-05-19 Per Bothner <bothner@apple.com>
+
+ * gcc.c (combine_inputs): New.
+ (process_command): Set combine_inputs.
+ (do_spec_1): Handle combine_inputs.
+ (main): Likewise.
+
2003-07-10 James E Wilson <wilson@tuliptree.org>
PR optimization/9745
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a62873f27a0..83d6788c4a6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -801,7 +801,8 @@ C_OBJS = c-parse.o c-lang.o c-pretty-print.o $(C_AND_OBJC_OBJS)
# Language-independent object files.
-OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
+OBJS-common = \
+ alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o \
cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o \
cfgrtl.o combine.o conflict.o convert.o coverage.o cse.o cselib.o \
@@ -809,7 +810,7 @@ OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
dwarf2asm.o dwarf2out.o dwarfout.o emit-rtl.o except.o explow.o \
expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o \
genrtl.o ggc-common.o global.o graph.o gtype-desc.o \
- haifa-sched.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \
+ haifa-sched.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o \
insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
loop.o optabs.o options.o opts.o params.o postreload.o predict.o \
@@ -820,9 +821,16 @@ OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
sibcall.o simplify-rtx.o sreal.o ssa.o ssa-ccp.o ssa-dce.o stmt.o \
stor-layout.o stringpool.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
- tree-inline.o unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \
- alloc-pool.o et-forest.o cgraph.o cgraphunit.o cfghooks.o bt-load.o \
- $(GGC) $(out_object_file) $(EXTRA_OBJS) $(host_hook_obj)
+ unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \
+ alloc-pool.o et-forest.o cfghooks.o bt-load.o $(GGC)
+
+OBJS-md = $(out_object_file)
+OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
+ cgraph.o cgraphunit.o
+
+OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive)
+
+OBJS-onestep = libbackend.o $(OBJS-archive)
BACKEND = main.o libbackend.a
@@ -1026,9 +1034,9 @@ rest.cross: $(LIBGCC) specs
compilations: $(BACKEND)
# Like libcpp.a, this archive is strictly for the host.
-libbackend.a: $(OBJS)
+libbackend.a: $(OBJS@onestep@)
-rm -rf libbackend.a
- $(AR) $(AR_FLAGS) libbackend.a $(OBJS)
+ $(AR) $(AR_FLAGS) libbackend.a $(OBJS@onestep@)
-$(RANLIB) libbackend.a
# We call this executable `xgcc' rather than `gcc'
@@ -1817,6 +1825,15 @@ mips-tdump: mips-tdump.o version.o $(LIBDEPS)
mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h $(TM_H) version.h
+# FIXME: writing proper dependencies for this is a *LOT* of work.
+libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+ insn-attr.h options_.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ -DTARGET_NAME=\"$(target_alias)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -c $(filter %.c,$^) -o $@
+
#
# Generate header and source files from the machine description,
# and compile them.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 49ff8707e27..3fc6a861036 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4680,7 +4680,6 @@ handle_used_attribute (tree *pnode, tree name, tree args ATTRIBUTE_UNUSED,
if (TREE_CODE (node) == FUNCTION_DECL
|| (TREE_CODE (node) == VAR_DECL && TREE_STATIC (node)))
{
- mark_referenced (DECL_ASSEMBLER_NAME (node));
TREE_USED (node) = 1;
}
else
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 7fdd80969b9..94cf6d2dc86 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -963,6 +963,14 @@ extern bool c_promoting_integer_type_p (tree);
extern int self_promoting_args_p (tree);
extern tree strip_array_types (tree);
+/* This function resets the parsers' state in preparation for parsing
+ a new file. */
+extern void c_reset_state (void);
+/* This is the basic parsing function. */
+extern void c_parse_file (void);
+/* This is misnamed, it actually performs end-of-compilation processing. */
+extern void finish_file (void);
+
/* These macros provide convenient access to the various _STMT nodes. */
/* Nonzero if this statement should be considered a full-expression,
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index fbe0b02a810..24f46371056 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -127,6 +127,14 @@ static GTY(()) tree shadowed_labels;
some other global meaning for that identifier. */
static GTY(()) tree truly_local_externals;
+/* A list of the builtin file-scope DECLs. */
+
+static GTY(()) tree builtin_decls;
+
+/* A DECL for the current file-scope context. */
+
+static GTY(()) tree current_file_decl;
+
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement that specifies a return value is seen. */
@@ -265,7 +273,7 @@ tree static_ctors, static_dtors;
static struct binding_level *make_binding_level (void);
static void pop_binding_level (struct binding_level **);
-static int duplicate_decls (tree, tree, int);
+static int duplicate_decls (tree, tree, int, int);
static int redeclaration_error_message (tree, tree);
static void implicit_decl_warning (tree);
static void storedecls (tree);
@@ -282,6 +290,8 @@ static void record_external_decl (tree);
static void warn_if_shadowing (tree, tree);
static void clone_underlying_type (tree);
static bool flexible_array_type_p (tree);
+static hashval_t link_hash_hash (const void *);
+static int link_hash_eq (const void *, const void *);
/* States indicating how grokdeclarator() should handle declspecs marked
with __attribute__((deprecated)). An object declared as
@@ -482,8 +492,12 @@ poplevel (int keep, int reverse, int functionbody)
/* We used to warn about unused variables in expand_end_bindings,
i.e. while generating RTL. But in function-at-a-time mode we may
choose to never expand a function at all (e.g. auto inlining), so
- we do this explicitly now. */
- warn_about_unused_variables (decls);
+ we do this explicitly now.
+ No warnings when the global scope is popped because the global
+ scope isn't popped for the last translation unit, so the warnings
+ are done in c_write_global_declaration. */
+ if (current_binding_level != global_binding_level)
+ warn_about_unused_variables (decls);
/* Clear out the name-meanings declared on this level.
Propagate TREE_ADDRESSABLE from nested functions to their
@@ -492,7 +506,8 @@ poplevel (int keep, int reverse, int functionbody)
{
if (DECL_NAME (link) != 0)
{
- if (DECL_EXTERNAL (link))
+ if (DECL_EXTERNAL (link)
+ && current_binding_level != global_binding_level)
/* External decls stay in the symbol-value slot but are
inaccessible. */
C_DECL_INVISIBLE (link) = 1;
@@ -626,7 +641,7 @@ poplevel (int keep, int reverse, int functionbody)
/* Dispose of the block that we just made inside some higher level. */
if (functionbody)
DECL_INITIAL (current_function_decl) = block;
- else if (block)
+ else if (block && current_binding_level)
current_binding_level->blocks
= chainon (current_binding_level->blocks, block);
/* If we did not make a block for the level just exited,
@@ -634,7 +649,7 @@ poplevel (int keep, int reverse, int functionbody)
(since they cannot be recorded as subblocks in that level)
must be carried forward so they will later become subblocks
of something else. */
- else if (subblocks)
+ else if (! block && subblocks)
current_binding_level->blocks
= chainon (current_binding_level->blocks, subblocks);
@@ -784,9 +799,13 @@ pushtag (tree name, tree type)
and OLDDECL is in an outer binding level and should thus not be changed. */
static int
-duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
+duplicate_decls (tree newdecl, tree olddecl, int different_binding_level,
+ int different_tu)
{
- int types_match = comptypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl));
+ int comptype_flags = (different_tu ? COMPARE_DIFFERENT_TU
+ : COMPARE_STRICT);
+ int types_match = comptypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl),
+ comptype_flags);
int new_is_definition = (TREE_CODE (newdecl) == FUNCTION_DECL
&& DECL_INITIAL (newdecl) != 0);
tree oldtype = TREE_TYPE (olddecl);
@@ -908,7 +927,7 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
trytype = build_type_attribute_variant (trytype,
TYPE_ATTRIBUTES (oldtype));
- types_match = comptypes (newtype, trytype);
+ types_match = comptypes (newtype, trytype, comptype_flags);
if (types_match)
oldtype = trytype;
}
@@ -931,7 +950,7 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
trytype = build_type_attribute_variant (trytype,
TYPE_ATTRIBUTES (oldtype));
- types_match = comptypes (newtype, trytype);
+ types_match = comptypes (newtype, trytype, comptype_flags);
if (types_match)
oldtype = trytype;
}
@@ -1030,7 +1049,7 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
&& ! pedantic
/* Return types must still match. */
&& comptypes (TREE_TYPE (oldtype),
- TREE_TYPE (newtype))
+ TREE_TYPE (newtype), comptype_flags)
&& TYPE_ARG_TYPES (newtype) == 0))
{
error_with_decl (newdecl, "conflicting types for `%s'");
@@ -1038,7 +1057,7 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
involving an empty arglist vs a nonempty one. */
if (TREE_CODE (olddecl) == FUNCTION_DECL
&& comptypes (TREE_TYPE (oldtype),
- TREE_TYPE (newtype))
+ TREE_TYPE (newtype), comptype_flags)
&& ((TYPE_ARG_TYPES (oldtype) == 0
&& DECL_INITIAL (olddecl) == 0)
||
@@ -1166,7 +1185,8 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
}
/* Type for passing arg must be consistent
with that declared for the arg. */
- if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type)))
+ if (! comptypes (TREE_VALUE (parm), TREE_VALUE (type),
+ comptype_flags))
{
error_with_decl (newdecl,
"prototype for `%s' follows and argument %d doesn't match",
@@ -1393,7 +1413,7 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
}
if (DECL_EXTERNAL (newdecl))
{
- if (! different_binding_level)
+ if (! different_binding_level || different_tu)
{
/* Don't mess with these flags on local externs; they remain
external even if there's a declaration at file scope which
@@ -1404,7 +1424,13 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level)
/* An extern decl does not override previous storage class. */
TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl);
if (! DECL_EXTERNAL (newdecl))
- DECL_CONTEXT (newdecl) = DECL_CONTEXT (olddecl);
+ {
+ DECL_CONTEXT (newdecl) = DECL_CONTEXT (olddecl);
+ /* If we have two non-EXTERNAL file-scope decls that are
+ the same, only one of them should be written out. */
+ if (different_tu)
+ TREE_ASM_WRITTEN (newdecl) = 1;
+ }
}
else
{
@@ -1586,7 +1612,7 @@ warn_if_shadowing (tree x, tree old)
if (TREE_CODE (old) == PARM_DECL)
shadow_warning (SW_PARAM, name, old);
- else if (DECL_CONTEXT (old) == 0)
+ else if (C_DECL_FILE_SCOPE (old))
shadow_warning (SW_GLOBAL, name, old);
else
shadow_warning (SW_LOCAL, name, old);
@@ -1685,12 +1711,13 @@ pushdecl (tree x)
/* A local extern declaration for a function doesn't constitute nesting.
A local auto declaration does, since it's a forward decl
for a nested function coming later. */
- if ((TREE_CODE (x) == FUNCTION_DECL || TREE_CODE (x) == VAR_DECL)
- && DECL_INITIAL (x) == 0 && DECL_EXTERNAL (x))
- DECL_CONTEXT (x) = 0;
+ if (current_function_decl == NULL
+ || ((TREE_CODE (x) == FUNCTION_DECL || TREE_CODE (x) == VAR_DECL)
+ && DECL_INITIAL (x) == 0 && DECL_EXTERNAL (x)))
+ DECL_CONTEXT (x) = current_file_decl;
else
DECL_CONTEXT (x) = current_function_decl;
-
+
if (name)
{
tree old;
@@ -1703,7 +1730,7 @@ pushdecl (tree x)
IDENTIFIER_POINTER (name));
old = lookup_name_current_level (name);
- if (old && duplicate_decls (x, old, 0))
+ if (old && duplicate_decls (x, old, 0, false))
return old;
if (DECL_EXTERNAL (x) || scope == global_binding_level)
{
@@ -1714,7 +1741,8 @@ pushdecl (tree x)
tree ext = any_external_decl (name);
if (ext)
{
- if (duplicate_decls (x, ext, scope != global_binding_level))
+ if (duplicate_decls (x, ext, scope != global_binding_level,
+ false))
x = copy_node (ext);
}
else
@@ -1788,13 +1816,13 @@ pushdecl_top_level (tree x)
if (DECL_CONTEXT (old))
abort ();
- if (!duplicate_decls (x, old, 0))
+ if (!duplicate_decls (x, old, 0, false))
abort ();
return old;
}
- DECL_CONTEXT (x) = 0;
+ DECL_CONTEXT (x) = current_file_decl;
IDENTIFIER_SYMBOL_VALUE (name) = x;
TREE_CHAIN (x) = global_binding_level->names;
global_binding_level->names = x;
@@ -1855,7 +1883,7 @@ implicitly_declare (tree functionid)
if (!C_DECL_IMPLICIT (decl))
{
implicit_decl_warning (DECL_NAME (decl));
- if (DECL_CONTEXT (decl))
+ if (! C_DECL_FILE_SCOPE (decl))
warning_with_decl (decl, "previous declaration of `%s'");
C_DECL_IMPLICIT (decl) = 1;
}
@@ -1935,7 +1963,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
return 1;
return 0;
}
- else if (DECL_CONTEXT (newdecl) == NULL_TREE)
+ else if (C_DECL_FILE_SCOPE (newdecl))
{
/* Objects declared at top level: */
/* If at least one is a reference, it's ok. */
@@ -2245,6 +2273,9 @@ c_init_decl_processing (void)
input_location.file = "<internal>";
input_location.line = 0;
+ /* Make the DECL for the toplevel file scope. */
+ current_file_decl = build_decl (TRANSLATION_UNIT_DECL, NULL, NULL);
+
build_common_tree_nodes (flag_signed_char);
c_common_nodes_and_builtins ();
@@ -2277,6 +2308,8 @@ c_init_decl_processing (void)
make_fname_decl = c_make_fname_decl;
start_fname_decls ();
+
+ builtin_decls = global_binding_level->names;
}
/* Create the VAR_DECL for __FUNCTION__ etc. ID is the name to give the
@@ -2692,7 +2725,7 @@ start_decl (tree declarator, tree declspecs, int initialized, tree attributes)
and we preserved the rtl from the previous one
(which may or may not happen). */
&& !DECL_RTL_SET_P (tem)
- && !DECL_CONTEXT (tem))
+ && C_DECL_FILE_SCOPE (tem))
{
if (TREE_TYPE (tem) != error_mark_node
&& COMPLETE_TYPE_P (TREE_TYPE (tem)))
@@ -2795,7 +2828,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
Otherwise, let it through, but if it is not `extern'
then it may cause an error message later. */
(DECL_INITIAL (decl) != 0
- || DECL_CONTEXT (decl) != 0)
+ || !C_DECL_FILE_SCOPE (decl))
:
/* An automatic variable with an incomplete type
is an error. */
@@ -2860,7 +2893,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
if (c_dialect_objc ())
objc_check_decl (decl);
- if (!DECL_CONTEXT (decl))
+ if (C_DECL_FILE_SCOPE (decl))
{
if (DECL_INITIAL (decl) == NULL_TREE
|| DECL_INITIAL (decl) == error_mark_node)
@@ -2868,9 +2901,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
when a tentative file-scope definition is seen.
But at end of compilation, do output code for them. */
DECL_DEFER_OUTPUT (decl) = 1;
- rest_of_decl_compilation (decl, asmspec,
- (DECL_CONTEXT (decl) == 0
- || TREE_ASM_WRITTEN (decl)), 0);
+ rest_of_decl_compilation (decl, asmspec, true, 0);
}
else
{
@@ -2902,7 +2933,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
add_decl_stmt (decl);
}
- if (DECL_CONTEXT (decl) != 0)
+ if (!C_DECL_FILE_SCOPE (decl))
{
/* Recompute the RTL of a local array now
if it used to be an incomplete type. */
@@ -2918,12 +2949,16 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
}
}
+ /* If this was marked 'used', be sure it will be output. */
+ if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
+ mark_referenced (DECL_ASSEMBLER_NAME (decl));
+
if (TREE_CODE (decl) == TYPE_DECL)
{
/* This is a no-op in c-lang.c or something real in objc-act.c. */
if (c_dialect_objc ())
objc_check_decl (decl);
- rest_of_decl_compilation (decl, NULL, DECL_CONTEXT (decl) == 0, 0);
+ rest_of_decl_compilation (decl, NULL, C_DECL_FILE_SCOPE (decl), 0);
}
/* At the end of a declaration, throw away any variable type sizes
@@ -5970,7 +6005,8 @@ store_parm_decls (void)
declared for the arg. ISO C says we take the unqualified
type for parameters declared with qualified type. */
if (! comptypes (TYPE_MAIN_VARIANT (DECL_ARG_TYPE (parm)),
- TYPE_MAIN_VARIANT (TREE_VALUE (type))))
+ TYPE_MAIN_VARIANT (TREE_VALUE (type)),
+ COMPARE_STRICT))
{
if (TYPE_MAIN_VARIANT (TREE_TYPE (parm))
== TYPE_MAIN_VARIANT (TREE_VALUE (type)))
@@ -6697,7 +6733,7 @@ tree
identifier_global_value (tree t)
{
tree decl = IDENTIFIER_SYMBOL_VALUE (t);
- if (decl == 0 || DECL_CONTEXT (decl) == 0)
+ if (decl == 0 || C_DECL_FILE_SCOPE (decl))
return decl;
/* Shadowed by something else; find the true global value. */
@@ -6751,4 +6787,176 @@ make_pointer_declarator (tree type_quals_attrs, tree target)
return build1 (INDIRECT_REF, quals, itarget);
}
+/* Hash and equality functions for link_hash_table: key off
+ DECL_ASSEMBLER_NAME. */
+
+static hashval_t
+link_hash_hash (const void *x_p)
+{
+ tree x = (tree)x_p;
+ return (hashval_t) DECL_ASSEMBLER_NAME (x);
+}
+
+static int
+link_hash_eq (const void *x1_p, const void *x2_p)
+{
+ tree x1 = (tree)x1_p;
+ tree x2 = (tree)x2_p;
+ return DECL_ASSEMBLER_NAME (x1) == DECL_ASSEMBLER_NAME (x2);
+}
+
+/* Propagate information between definitions and uses between multiple
+ translation units in TU_LIST based on linkage rules. */
+
+void
+merge_translation_unit_decls (void)
+{
+ const tree tu_list = current_file_decl;
+ tree tu;
+ tree decl;
+ htab_t link_hash_table;
+ tree block;
+
+ /* Create the BLOCK that poplevel would have created, but don't
+ actually call poplevel since that's expensive. */
+ block = make_node (BLOCK);
+ BLOCK_VARS (block) = current_binding_level->names;
+ TREE_USED (block) = 1;
+ DECL_INITIAL (current_file_decl) = block;
+
+ /* If only one translation unit seen, no copying necessary. */
+ if (TREE_CHAIN (tu_list) == NULL_TREE)
+ return;
+
+ link_hash_table = htab_create (1021, link_hash_hash, link_hash_eq, NULL);
+
+ /* Enter any actual definitions into the hash table. */
+ for (tu = tu_list; tu; tu = TREE_CHAIN (tu))
+ for (decl = BLOCK_VARS (DECL_INITIAL (tu)); decl; decl = TREE_CHAIN (decl))
+ if (TREE_PUBLIC (decl) && ! DECL_EXTERNAL (decl))
+ {
+ PTR *slot;
+ slot = htab_find_slot (link_hash_table, decl, INSERT);
+
+ /* If we've already got a definition, work out which one is
+ the real one, put it into the hash table, and make the
+ other one DECL_EXTERNAL. This is important to avoid
+ putting out two definitions of the same symbol in the
+ assembly output. */
+ if (*slot != NULL)
+ {
+ tree old_decl = (tree) *slot;
+
+ /* If this is weak or common or whatever, suppress it
+ in favour of the other definition. */
+ if (DECL_WEAK (decl))
+ DECL_EXTERNAL (decl) = 1;
+ else if (DECL_WEAK (old_decl) && ! DECL_WEAK (decl))
+ DECL_EXTERNAL (old_decl) = 1;
+ else if (DECL_COMMON (decl) || DECL_ONE_ONLY (decl))
+ DECL_EXTERNAL (decl) = 1;
+ else if (DECL_COMMON (old_decl) || DECL_ONE_ONLY (old_decl))
+ DECL_EXTERNAL (old_decl) = 1;
+
+ if (DECL_EXTERNAL (decl))
+ {
+ DECL_INITIAL (decl) = NULL_TREE;
+ DECL_COMMON (decl) = 0;
+ DECL_ONE_ONLY (decl) = 0;
+ DECL_WEAK (decl) = 0;
+ }
+ else if (DECL_EXTERNAL (old_decl))
+ {
+ DECL_INITIAL (old_decl) = NULL_TREE;
+ DECL_COMMON (old_decl) = 0;
+ DECL_ONE_ONLY (old_decl) = 0;
+ DECL_WEAK (old_decl) = 0;
+ *slot = decl;
+ }
+ else
+ {
+ error_with_decl (decl, "redefinition of global `%s'");
+ error_with_decl (old_decl, "`%s' previously defined here");
+ }
+ }
+ else
+ *slot = decl;
+ }
+
+ /* Now insert the desired information from all the definitions
+ into any plain declarations. */
+ for (tu = tu_list; tu; tu = TREE_CHAIN (tu))
+ for (decl = BLOCK_VARS (DECL_INITIAL (tu)); decl; decl = TREE_CHAIN (decl))
+ if (TREE_PUBLIC (decl) && DECL_EXTERNAL (decl))
+ {
+ tree global_decl;
+ global_decl = (tree) htab_find (link_hash_table, decl);
+
+ if (! global_decl)
+ continue;
+
+ /* Print any appropriate error messages, and partially merge
+ the decls. */
+ (void) duplicate_decls (decl, global_decl, true, true);
+ }
+
+ htab_delete (link_hash_table);
+}
+
+/* Perform final processing on file-scope data. */
+
+void
+c_write_global_declarations(void)
+{
+ tree link;
+
+ for (link = current_file_decl; link; link = TREE_CHAIN (link))
+ {
+ tree globals = BLOCK_VARS (DECL_INITIAL (link));
+ int len = list_length (globals);
+ tree *vec = (tree *) xmalloc (sizeof (tree) * len);
+ int i;
+ tree decl;
+
+ /* Process the decls in reverse order--earliest first.
+ Put them into VEC from back to front, then take out from front. */
+
+ for (i = 0, decl = globals; i < len; i++, decl = TREE_CHAIN (decl))
+ vec[len - i - 1] = decl;
+
+ wrapup_global_declarations (vec, len);
+
+ check_global_declarations (vec, len);
+
+ /* Clean up. */
+ free (vec);
+ }
+}
+
+/* Reset the parser's state in preparation for a new file. */
+
+void
+c_reset_state (void)
+{
+ tree link;
+ tree file_scope_decl;
+
+ /* Pop the global binding level. */
+ if (current_binding_level != global_binding_level)
+ current_binding_level = global_binding_level;
+ file_scope_decl = current_file_decl;
+ DECL_INITIAL (file_scope_decl) = poplevel (1, 0, 0);
+ truly_local_externals = NULL_TREE;
+
+ /* Start a new global binding level. */
+ pushlevel (0);
+ global_binding_level = current_binding_level;
+ current_file_decl = build_decl (TRANSLATION_UNIT_DECL, NULL, NULL);
+ TREE_CHAIN (current_file_decl) = file_scope_decl;
+
+ /* Reintroduce the global declarations. */
+ for (link = builtin_decls; link; link = TREE_CHAIN (link))
+ pushdecl (copy_node (link));
+}
+
#include "gt-c-decl.h"
diff --git a/gcc/c-lang.c b/gcc/c-lang.c
index 815a72f1a20..fcf03dfba99 100644
--- a/gcc/c-lang.c
+++ b/gcc/c-lang.c
@@ -125,6 +125,9 @@ enum c_language_kind c_language = clk_c;
#undef LANG_HOOKS_TYPE_PROMOTES_TO
#define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to
+#undef LANG_HOOKS_WRITE_GLOBALS
+#define LANG_HOOKS_WRITE_GLOBALS c_write_global_declarations
+
/* ### When changing hooks, consider if ObjC needs changing too!! ### */
/* Each front end provides its own. */
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 438b3fba808..eacc719bdec 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -127,7 +127,7 @@ inline_forbidden_p (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
/* We cannot inline a nested function that jumps to a nonlocal
label. */
if (TREE_CODE (t) == LABEL_DECL
- && DECL_CONTEXT (t) && DECL_CONTEXT (t) != fn)
+ && !C_DECL_FILE_SCOPE (t) && DECL_CONTEXT (t) != fn)
return node;
break;
@@ -184,7 +184,7 @@ c_cannot_inline_tree_fn (tree *fnp)
goto cannot_inline;
}
- if (DECL_CONTEXT (fn))
+ if (! C_DECL_FILE_SCOPE (fn))
{
/* If a nested function has pending sizes, we may have already
saved them. */
@@ -357,6 +357,10 @@ c_objc_common_finish_file (void)
if (pch_file)
c_common_write_pch ();
+ /* If multiple translation units were built, copy information between
+ them based on linkage rules. */
+ merge_translation_unit_decls ();
+
if (flag_unit_at_a_time)
{
cgraph_finalize_compilation_unit ();
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index a12ced1f06e..bf60504bab7 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -52,7 +52,8 @@ static int saved_lineno;
static cpp_options *cpp_opts;
/* Input filename. */
-static const char *in_fname;
+static const char **in_fnames;
+static unsigned num_in_fnames;
/* Filename and stream for preprocessed output. */
static const char *out_fname;
@@ -1039,12 +1040,9 @@ c_common_handle_option (size_t scode, const char *arg, int value)
void
c_common_handle_filename (const char *filename)
{
- if (!in_fname)
- in_fname = filename;
- else if (!out_fname)
- out_fname = filename;
- else
- error ("output filename specified twice");
+ num_in_fnames++;
+ in_fnames = xrealloc (in_fnames, num_in_fnames * sizeof (in_fnames[0]));
+ in_fnames[num_in_fnames - 1] = filename;
}
/* Post-switch processing. */
@@ -1052,8 +1050,13 @@ bool
c_common_post_options (const char **pfilename)
{
/* Canonicalize the input and output filenames. */
- if (in_fname == NULL || !strcmp (in_fname, "-"))
- in_fname = "";
+ if (in_fnames == NULL)
+ {
+ in_fnames = xmalloc (sizeof (in_fnames[0]));
+ in_fnames[0] = "";
+ }
+ else if (strcmp (in_fnames[0], "-") == 0)
+ in_fnames[0] = "";
if (out_fname == NULL || !strcmp (out_fname, "-"))
out_fname = "";
@@ -1119,6 +1122,10 @@ c_common_post_options (const char **pfilename)
return false;
}
+ if (num_in_fnames > 1)
+ error ("too many filenames given. Type %s --help for usage",
+ progname);
+
init_pp_output (out_stream);
}
else
@@ -1132,7 +1139,7 @@ c_common_post_options (const char **pfilename)
cpp_get_callbacks (parse_in)->file_change = cb_file_change;
/* NOTE: we use in_fname here, not the one supplied. */
- *pfilename = cpp_read_main_file (parse_in, in_fname);
+ *pfilename = cpp_read_main_file (parse_in, in_fnames[0]);
saved_lineno = input_line;
input_line = 0;
@@ -1176,23 +1183,43 @@ c_common_init (void)
return true;
}
-/* A thin wrapper around the real parser that initializes the
- integrated preprocessor after debug output has been initialized.
- Also, make sure the start_source_file debug hook gets called for
- the primary source file. */
+/* Initialize the integrated preprocessor after debug output has been
+ initialized; loop over each input file. */
void
c_common_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
{
+ unsigned file_index;
+
#if YYDEBUG != 0
yydebug = set_yydebug;
#else
warning ("YYDEBUG not defined");
#endif
- finish_options();
- pch_init();
- yyparse ();
+ file_index = 0;
+
+ do
+ {
+ if (file_index > 0)
+ {
+ /* Reset the state of the parser. */
+ c_reset_state();
+
+ /* Reset cpplib's macros and start a new file. */
+ cpp_undef_all (parse_in);
+ cpp_read_next_file (parse_in, in_fnames[file_index]);
+ }
+
+ finish_options();
+ if (file_index == 0)
+ pch_init();
+ c_parse_file ();
+
+ file_index++;
+ } while (file_index < num_in_fnames);
+
free_parser_stacks ();
+ finish_file ();
}
/* Common finish hook for the C, ObjC and C++ front ends. */
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 787167c155d..bd26489f7c8 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -352,20 +352,8 @@ c_parse_init (void)
program: /* empty */
{ if (pedantic)
pedwarn ("ISO C forbids an empty source file");
- finish_file ();
}
| extdefs
- {
- /* In case there were missing closebraces,
- get us back to the global binding level. */
- while (! global_bindings_p ())
- poplevel (0, 0, 0);
- /* __FUNCTION__ is defined at file scope (""). This
- call may not be necessary as my tests indicate it
- still works without it. */
- finish_fname_decls ();
- finish_file ();
- }
;
/* the reason for the strange actions in this rule
@@ -718,7 +706,7 @@ primary:
e1 = TYPE_MAIN_VARIANT (groktypename ($3));
e2 = TYPE_MAIN_VARIANT (groktypename ($5));
- $$ = comptypes (e1, e2)
+ $$ = comptypes (e1, e2, COMPARE_STRICT)
? build_int_2 (1, 0) : build_int_2 (0, 0);
}
| primary '[' expr ']' %prec '.'
@@ -3795,10 +3783,27 @@ yyprint (FILE *file, int yychar, YYSTYPE yyl)
void
free_parser_stacks (void)
{
+}
+
+/* Parse the file. */
+void
+c_parse_file (void)
+{
+ yyparse ();
+ /* In case there were missing closebraces, get us back to the global
+ binding level. */
+ while (! global_bindings_p ())
+ poplevel (0, 0, 0);
+ /* __FUNCTION__ is defined at file scope (""). This
+ call may not be necessary as my tests indicate it
+ still works without it. */
+ finish_fname_decls ();
+
if (malloced_yyss)
{
free (malloced_yyss);
free (malloced_yyvs);
+ malloced_yyss = 0;
}
}
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 593877aee73..adfea88924b 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -46,7 +46,7 @@ struct lang_identifier GTY(())
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
- chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
+ chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *)TYPE_NEXT_VARIANT (&%h.generic) : (union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
{
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
@@ -146,6 +146,11 @@ struct lang_type GTY(())
|| (TYPE_ARG_TYPES (TREE_TYPE (EXP)) == 0 \
&& !DECL_BUILT_IN (EXP)))
+/* Nonzero for a decl which is at file scope. */
+#define C_DECL_FILE_SCOPE(EXP) \
+ (! DECL_CONTEXT (EXP) \
+ || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
+
/* For FUNCTION_TYPE, a hidden list of types of arguments. The same as
TYPE_ARG_TYPES for functions with prototypes, but created for functions
without prototypes. */
@@ -157,7 +162,6 @@ extern tree lookup_interface (tree);
extern tree is_class_name (tree);
extern tree objc_is_id (tree);
extern void objc_check_decl (tree);
-extern void finish_file (void);
extern int objc_comptypes (tree, tree, int);
extern tree objc_message_selector (void);
extern tree lookup_objc_ivar (tree);
@@ -226,6 +230,7 @@ extern tree c_begin_compound_stmt (void);
extern void c_expand_deferred_function (tree);
extern void c_expand_decl_stmt (tree);
extern tree make_pointer_declarator (tree, tree);
+extern void merge_translation_unit_decls (void);
/* in c-objc-common.c */
extern int c_disregard_inline_limits (tree);
@@ -242,9 +247,17 @@ extern bool c_warn_unused_global_decl (tree);
((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0))
#define c_sizeof_nowarn(T) c_sizeof_or_alignof_type (T, SIZEOF_EXPR, 0)
+
/* in c-typeck.c */
+
+/* For use with comptypes. */
+enum {
+ COMPARE_STRICT = 0,
+ COMPARE_DIFFERENT_TU = 1
+};
+
extern tree require_complete_type (tree);
-extern int comptypes (tree, tree);
+extern int comptypes (tree, tree, int);
extern tree c_size_in_bytes (tree);
extern bool c_mark_addressable (tree);
extern void c_incomplete_type_error (tree, tree);
@@ -301,6 +314,7 @@ extern int system_header_p;
/* In c-decl.c */
extern void c_finish_incomplete_decl (tree);
+extern void c_write_global_declarations (void);
extern GTY(()) tree static_ctors;
extern GTY(()) tree static_dtors;
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 718bd8f5986..3228d044506 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -53,9 +53,10 @@ static int missing_braces_mentioned;
static int undeclared_variable_notice;
static tree qualify_type (tree, tree);
+static int tagged_types_tu_compatible_p (tree, tree, int);
static int comp_target_types (tree, tree, int);
-static int function_types_compatible_p (tree, tree);
-static int type_lists_compatible_p (tree, tree);
+static int function_types_compatible_p (tree, tree, int);
+static int type_lists_compatible_p (tree, tree, int);
static tree decl_constant_value_for_broken_optimization (tree);
static tree default_function_array_conversion (tree);
static tree lookup_field (tree, tree);
@@ -409,7 +410,8 @@ common_type (tree t1, tree t2)
tree memb;
for (memb = TYPE_FIELDS (TREE_VALUE (p1));
memb; memb = TREE_CHAIN (memb))
- if (comptypes (TREE_TYPE (memb), TREE_VALUE (p2)))
+ if (comptypes (TREE_TYPE (memb), TREE_VALUE (p2),
+ COMPARE_STRICT))
{
TREE_VALUE (n) = TREE_VALUE (p2);
if (pedantic)
@@ -423,7 +425,8 @@ common_type (tree t1, tree t2)
tree memb;
for (memb = TYPE_FIELDS (TREE_VALUE (p2));
memb; memb = TREE_CHAIN (memb))
- if (comptypes (TREE_TYPE (memb), TREE_VALUE (p1)))
+ if (comptypes (TREE_TYPE (memb), TREE_VALUE (p1),
+ COMPARE_STRICT))
{
TREE_VALUE (n) = TREE_VALUE (p1);
if (pedantic)
@@ -452,7 +455,7 @@ common_type (tree t1, tree t2)
but a warning may be needed if you use them together. */
int
-comptypes (tree type1, tree type2)
+comptypes (tree type1, tree type2, int flags)
{
tree t1 = type1;
tree t2 = type2;
@@ -512,11 +515,11 @@ comptypes (tree type1, tree type2)
{
case POINTER_TYPE:
val = (TREE_TYPE (t1) == TREE_TYPE (t2)
- ? 1 : comptypes (TREE_TYPE (t1), TREE_TYPE (t2)));
+ ? 1 : comptypes (TREE_TYPE (t1), TREE_TYPE (t2), flags));
break;
case FUNCTION_TYPE:
- val = function_types_compatible_p (t1, t2);
+ val = function_types_compatible_p (t1, t2, flags);
break;
case ARRAY_TYPE:
@@ -529,7 +532,8 @@ comptypes (tree type1, tree type2)
/* Target types must match incl. qualifiers. */
if (TREE_TYPE (t1) != TREE_TYPE (t2)
- && 0 == (val = comptypes (TREE_TYPE (t1), TREE_TYPE (t2))))
+ && 0 == (val = comptypes (TREE_TYPE (t1), TREE_TYPE (t2),
+ flags)))
return 0;
/* Sizes must match unless one is missing or variable. */
@@ -561,6 +565,11 @@ comptypes (tree type1, tree type2)
case RECORD_TYPE:
if (c_dialect_objc () && objc_comptypes (t1, t2, 0) == 1)
val = 1;
+
+ case ENUMERAL_TYPE:
+ case UNION_TYPE:
+ if (val != 1 && (flags & COMPARE_DIFFERENT_TU))
+ val = tagged_types_tu_compatible_p (t1, t2, flags);
break;
case VECTOR_TYPE:
@@ -592,7 +601,7 @@ comp_target_types (tree ttl, tree ttr, int reflexive)
return val;
val = comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (ttl)),
- TYPE_MAIN_VARIANT (TREE_TYPE (ttr)));
+ TYPE_MAIN_VARIANT (TREE_TYPE (ttr)), COMPARE_STRICT);
if (val == 2 && pedantic)
pedwarn ("types are not quite compatible");
@@ -601,6 +610,159 @@ comp_target_types (tree ttl, tree ttr, int reflexive)
/* Subroutines of `comptypes'. */
+/* The C standard says that two structures in different translation
+ units are compatible with each other only if the types of their
+ fields are compatible (among other things). So, consider two copies
+ of this structure: */
+
+struct tagged_tu_seen {
+ const struct tagged_tu_seen * next;
+ tree t1;
+ tree t2;
+};
+
+/* Can they be compatible with each other? We choose to break the
+ recursion by allowing those types to be compatible. */
+
+static const struct tagged_tu_seen * tagged_tu_seen_base;
+
+/* Return 1 if two 'struct', 'union', or 'enum' types T1 and T2 are
+ compatible. If the two types are not the same (which has been
+ checked earlier), this can only happen when multiple translation
+ units are being compiled. See C99 6.2.7 paragraph 1 for the exact
+ rules. */
+
+static int
+tagged_types_tu_compatible_p (tree t1, tree t2, int flags)
+{
+ tree s1, s2;
+ bool needs_warning = false;
+
+ /* We have to verify that the tags of the types are the same. This
+ is harder than it looks because this may be a typedef, so we have
+ to go look at the original type. It may even be a typedef of a
+ typedef... */
+ while (TYPE_NAME (t1) && TREE_CODE (TYPE_NAME (t1)) == TYPE_DECL)
+ t1 = DECL_ORIGINAL_TYPE (TYPE_NAME (t1));
+
+ while (TYPE_NAME (t2) && TREE_CODE (TYPE_NAME (t2)) == TYPE_DECL)
+ t2 = DECL_ORIGINAL_TYPE (TYPE_NAME (t2));
+
+ /* C90 didn't have the requirement that the two tags be the same. */
+ if (flag_isoc99 && TYPE_NAME (t1) != TYPE_NAME (t2))
+ return 0;
+
+ /* C90 didn't say what happened if one or both of the types were
+ incomplete; we choose to follow C99 rules here, which is that they
+ are compatible. */
+ if (TYPE_SIZE (t1) == NULL
+ || TYPE_SIZE (t2) == NULL)
+ return 1;
+
+ {
+ const struct tagged_tu_seen * tts_i;
+ for (tts_i = tagged_tu_seen_base; tts_i != NULL; tts_i = tts_i->next)
+ if (tts_i->t1 == t1 && tts_i->t2 == t2)
+ return 1;
+ }
+
+ switch (TREE_CODE (t1))
+ {
+ case ENUMERAL_TYPE:
+ {
+ if (list_length (TYPE_VALUES (t1)) != list_length (TYPE_VALUES (t2)))
+ return 0;
+
+ for (s1 = TYPE_VALUES (t1); s1; s1 = TREE_CHAIN (s1))
+ {
+ s2 = purpose_member (TREE_PURPOSE (s1), TYPE_VALUES (t2));
+ if (s2 == NULL
+ || simple_cst_equal (TREE_VALUE (s1), TREE_VALUE (s2)) != 1)
+ return 0;
+ }
+ return 1;
+ }
+
+ case UNION_TYPE:
+ {
+ if (list_length (TYPE_FIELDS (t1)) != list_length (TYPE_FIELDS (t2)))
+ return 0;
+
+ for (s1 = TYPE_FIELDS (t1); s1; s1 = TREE_CHAIN (s1))
+ {
+ bool ok = false;
+ struct tagged_tu_seen tts;
+
+ tts.next = tagged_tu_seen_base;
+ tts.t1 = t1;
+ tts.t2 = t2;
+ tagged_tu_seen_base = &tts;
+
+ if (DECL_NAME (s1) != NULL)
+ for (s2 = TYPE_VALUES (t2); s2; s2 = TREE_CHAIN (s2))
+ if (DECL_NAME (s1) == DECL_NAME (s2))
+ {
+ int result;
+ result = comptypes (TREE_TYPE (s1), TREE_TYPE (s2), flags);
+ if (result == 0)
+ break;
+ if (result == 2)
+ needs_warning = true;
+
+ if (TREE_CODE (s1) == FIELD_DECL
+ && simple_cst_equal (DECL_FIELD_BIT_OFFSET (s1),
+ DECL_FIELD_BIT_OFFSET (s2)) != 1)
+ break;
+
+ ok = true;
+ break;
+ }
+ tagged_tu_seen_base = tts.next;
+ if (! ok)
+ return 0;
+ }
+ return needs_warning ? 2 : 1;
+ }
+
+ case RECORD_TYPE:
+ {
+ struct tagged_tu_seen tts;
+
+ tts.next = tagged_tu_seen_base;
+ tts.t1 = t1;
+ tts.t2 = t2;
+ tagged_tu_seen_base = &tts;
+
+ for (s1 = TYPE_FIELDS (t1), s2 = TYPE_FIELDS (t2);
+ s1 && s2;
+ s1 = TREE_CHAIN (s1), s2 = TREE_CHAIN (s2))
+ {
+ int result;
+ if (TREE_CODE (s1) != TREE_CODE (s2)
+ || DECL_NAME (s1) != DECL_NAME (s2))
+ break;
+ result = comptypes (TREE_TYPE (s1), TREE_TYPE (s2), flags);
+ if (result == 0)
+ break;
+ if (result == 2)
+ needs_warning = true;
+
+ if (TREE_CODE (s1) == FIELD_DECL
+ && simple_cst_equal (DECL_FIELD_BIT_OFFSET (s1),
+ DECL_FIELD_BIT_OFFSET (s2)) != 1)
+ break;
+ }
+ tagged_tu_seen_base = tts.next;
+ if (s1 && s2)
+ return 0;
+ return needs_warning ? 2 : 1;
+ }
+
+ default:
+ abort ();
+ }
+}
+
/* Return 1 if two function types F1 and F2 are compatible.
If either type specifies no argument types,
the other must specify a fixed number of self-promoting arg types.
@@ -609,7 +771,7 @@ comp_target_types (tree ttl, tree ttr, int reflexive)
Otherwise, the argument types must match. */
static int
-function_types_compatible_p (tree f1, tree f2)
+function_types_compatible_p (tree f1, tree f2, int flags)
{
tree args1, args2;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
@@ -630,7 +792,7 @@ function_types_compatible_p (tree f1, tree f2)
if (TYPE_VOLATILE (ret2))
ret2 = build_qualified_type (TYPE_MAIN_VARIANT (ret2),
TYPE_QUALS (ret2) & ~TYPE_QUAL_VOLATILE);
- val = comptypes (ret1, ret2);
+ val = comptypes (ret1, ret2, flags);
if (val == 0)
return 0;
@@ -648,7 +810,8 @@ function_types_compatible_p (tree f1, tree f2)
compare that with the other type's arglist.
If they don't match, ask for a warning (but no error). */
if (TYPE_ACTUAL_ARG_TYPES (f1)
- && 1 != type_lists_compatible_p (args2, TYPE_ACTUAL_ARG_TYPES (f1)))
+ && 1 != type_lists_compatible_p (args2, TYPE_ACTUAL_ARG_TYPES (f1),
+ flags))
val = 2;
return val;
}
@@ -657,13 +820,14 @@ function_types_compatible_p (tree f1, tree f2)
if (!self_promoting_args_p (args1))
return 0;
if (TYPE_ACTUAL_ARG_TYPES (f2)
- && 1 != type_lists_compatible_p (args1, TYPE_ACTUAL_ARG_TYPES (f2)))
+ && 1 != type_lists_compatible_p (args1, TYPE_ACTUAL_ARG_TYPES (f2),
+ flags))
val = 2;
return val;
}
/* Both types have argument lists: compare them and propagate results. */
- val1 = type_lists_compatible_p (args1, args2);
+ val1 = type_lists_compatible_p (args1, args2, flags);
return val1 != 1 ? val1 : val;
}
@@ -672,7 +836,7 @@ function_types_compatible_p (tree f1, tree f2)
or 2 for compatible with warning. */
static int
-type_lists_compatible_p (tree args1, tree args2)
+type_lists_compatible_p (tree args1, tree args2, int flags)
{
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
int val = 1;
@@ -701,7 +865,8 @@ type_lists_compatible_p (tree args1, tree args2)
return 0;
}
else if (! (newval = comptypes (TYPE_MAIN_VARIANT (TREE_VALUE (args1)),
- TYPE_MAIN_VARIANT (TREE_VALUE (args2)))))
+ TYPE_MAIN_VARIANT (TREE_VALUE (args2)),
+ flags)))
{
/* Allow wait (union {union wait *u; int *i} *)
and wait (union wait *) to be compatible. */
@@ -715,7 +880,8 @@ type_lists_compatible_p (tree args1, tree args2)
tree memb;
for (memb = TYPE_FIELDS (TREE_VALUE (args1));
memb; memb = TREE_CHAIN (memb))
- if (comptypes (TREE_TYPE (memb), TREE_VALUE (args2)))
+ if (comptypes (TREE_TYPE (memb), TREE_VALUE (args2),
+ flags))
break;
if (memb == 0)
return 0;
@@ -730,7 +896,8 @@ type_lists_compatible_p (tree args1, tree args2)
tree memb;
for (memb = TYPE_FIELDS (TREE_VALUE (args2));
memb; memb = TREE_CHAIN (memb))
- if (comptypes (TREE_TYPE (memb), TREE_VALUE (args1)))
+ if (comptypes (TREE_TYPE (memb), TREE_VALUE (args1),
+ flags))
break;
if (memb == 0)
return 0;
@@ -1409,7 +1576,7 @@ build_external_ref (tree id, int fun)
/* Properly declared variable or function reference. */
if (!objc_ivar)
ref = decl;
- else if (decl != objc_ivar && DECL_CONTEXT (decl) != 0)
+ else if (decl != objc_ivar && !C_DECL_FILE_SCOPE (decl))
{
warning ("local declaration of `%s' hides instance variable",
IDENTIFIER_POINTER (id));
@@ -1449,7 +1616,7 @@ build_external_ref (tree id, int fun)
TREE_CONSTANT (ref) = 1;
}
else if (current_function_decl != 0
- && DECL_CONTEXT (current_function_decl) != 0
+ && !C_DECL_FILE_SCOPE (current_function_decl)
&& (TREE_CODE (ref) == VAR_DECL
|| TREE_CODE (ref) == PARM_DECL
|| TREE_CODE (ref) == FUNCTION_DECL))
@@ -3031,7 +3198,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
file-scope function counts as a constant. */
if (staticp (arg)
&& ! (TREE_CODE (arg) == FUNCTION_DECL
- && DECL_CONTEXT (arg) != 0))
+ && !C_DECL_FILE_SCOPE (arg)))
TREE_CONSTANT (addr) = 1;
return addr;
}
@@ -3258,6 +3425,7 @@ c_mark_addressable (tree exp)
/* drops in */
case FUNCTION_DECL:
TREE_ADDRESSABLE (x) = 1;
+ /* drops out */
default:
return true;
}
@@ -3523,7 +3691,7 @@ build_c_cast (tree type, tree expr)
for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (field)),
- TYPE_MAIN_VARIANT (TREE_TYPE (value))))
+ TYPE_MAIN_VARIANT (TREE_TYPE (value)), COMPARE_STRICT))
break;
if (field)
@@ -3917,7 +4085,7 @@ convert_for_assignment (tree type, tree rhs, const char *errtype,
This code doesn't fully support references, it's just for the
special case of va_start and va_copy. */
if (codel == REFERENCE_TYPE
- && comptypes (TREE_TYPE (type), TREE_TYPE (rhs)) == 1)
+ && comptypes (TREE_TYPE (type), TREE_TYPE (rhs), COMPARE_STRICT) == 1)
{
if (!lvalue_p (rhs))
{
@@ -3966,7 +4134,7 @@ convert_for_assignment (tree type, tree rhs, const char *errtype,
tree memb_type = TREE_TYPE (memb_types);
if (comptypes (TYPE_MAIN_VARIANT (memb_type),
- TYPE_MAIN_VARIANT (rhstype)))
+ TYPE_MAIN_VARIANT (rhstype), COMPARE_STRICT))
break;
if (TREE_CODE (memb_type) != POINTER_TYPE)
@@ -4543,7 +4711,7 @@ digest_init (tree type, tree init, int require_constant)
&& ((inside_init && TREE_CODE (inside_init) == STRING_CST)))
{
if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
- TYPE_MAIN_VARIANT (type)))
+ TYPE_MAIN_VARIANT (type), COMPARE_STRICT))
return inside_init;
if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (inside_init)))
@@ -4585,12 +4753,13 @@ digest_init (tree type, tree init, int require_constant)
vector constructor is not constant (e.g. {1,2,3,foo()}) then punt
below and handle as a constructor. */
if (code == VECTOR_TYPE
- && comptypes (TREE_TYPE (inside_init), type)
+ && comptypes (TREE_TYPE (inside_init), type, COMPARE_STRICT)
&& TREE_CONSTANT (inside_init))
{
if (TREE_CODE (inside_init) == VECTOR_CST
&& comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
- TYPE_MAIN_VARIANT (type)))
+ TYPE_MAIN_VARIANT (type),
+ COMPARE_STRICT))
return inside_init;
else
return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
@@ -4601,16 +4770,16 @@ digest_init (tree type, tree init, int require_constant)
if (inside_init && TREE_TYPE (inside_init) != 0
&& (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
- TYPE_MAIN_VARIANT (type))
+ TYPE_MAIN_VARIANT (type), COMPARE_STRICT)
|| (code == ARRAY_TYPE
- && comptypes (TREE_TYPE (inside_init), type))
+ && comptypes (TREE_TYPE (inside_init), type, COMPARE_STRICT))
|| (code == VECTOR_TYPE
- && comptypes (TREE_TYPE (inside_init), type))
+ && comptypes (TREE_TYPE (inside_init), type, COMPARE_STRICT))
|| (code == POINTER_TYPE
&& (TREE_CODE (TREE_TYPE (inside_init)) == ARRAY_TYPE
|| TREE_CODE (TREE_TYPE (inside_init)) == FUNCTION_TYPE)
&& comptypes (TREE_TYPE (TREE_TYPE (inside_init)),
- TREE_TYPE (type)))))
+ TREE_TYPE (type), COMPARE_STRICT))))
{
if (code == POINTER_TYPE)
inside_init = default_function_array_conversion (inside_init);
@@ -6039,7 +6208,7 @@ output_init_element (tree value, tree type, tree field, int pending)
&& TREE_CODE (type) == ARRAY_TYPE
&& TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE)
&& !comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (value)),
- TYPE_MAIN_VARIANT (type))))
+ TYPE_MAIN_VARIANT (type), COMPARE_STRICT)))
value = default_conversion (value);
if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR
diff --git a/gcc/calls.c b/gcc/calls.c
index 700564a33db..d66ebd93d1c 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -600,8 +600,14 @@ special_function_p (tree fndecl, int flags)
&& IDENTIFIER_LENGTH (DECL_NAME (fndecl)) <= 17
/* Exclude functions not at the file scope, or not `extern',
since they are not the magic functions we would otherwise
- think they are. */
- && DECL_CONTEXT (fndecl) == NULL_TREE && TREE_PUBLIC (fndecl))
+ think they are.
+ FIXME: this should be handled with attributes, not with this
+ hacky imitation of DECL_ASSEMBLER_NAME. It's (also) wrong
+ because you can declare fork() inside a function if you
+ wish. */
+ && (DECL_CONTEXT (fndecl) == NULL_TREE
+ || TREE_CODE (DECL_CONTEXT (fndecl)) == TRANSLATION_UNIT_DECL)
+ && TREE_PUBLIC (fndecl))
{
const char *name = IDENTIFIER_POINTER (DECL_NAME (fndecl));
const char *tname = name;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 65bda0717cc..7650326d7dd 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -62,7 +62,7 @@ struct cgraph_rtl_info GTY(())
/* The cgraph data strutcture.
Each function decl has assigned cgraph_node listing callees and callers. */
-struct cgraph_node GTY(())
+struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
{
tree decl;
struct cgraph_edge *callees;
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index ad504dd08e5..0a3ae487f35 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -71,7 +71,8 @@ cgraph_finalize_function (decl, body)
It is possible to assemble the name later after finalizing the function
and the fact is noticed in assemble_name then. */
|| (DECL_ASSEMBLER_NAME_SET_P (decl)
- && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
+ && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
+ || lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
{
cgraph_mark_needed_node (node, 1);
}
diff --git a/gcc/configure b/gcc/configure
index 798361b7ec4..3120ae30805 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -64,6 +64,8 @@ ac_help="$ac_help
ac_help="$ac_help
--with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
ac_help="$ac_help
+ --enable-intermodule build the compiler in one step"
+ac_help="$ac_help
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
ac_help="$ac_help
--enable-initfini-array use .init_array/.fini_array sections"
@@ -655,7 +657,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:659: checking host system type" >&5
+echo "configure:661: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -676,7 +678,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:680: checking target system type" >&5
+echo "configure:682: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -694,7 +696,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:698: checking build system type" >&5
+echo "configure:700: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -771,7 +773,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:775: checking LIBRARY_PATH variable" >&5
+echo "configure:777: checking LIBRARY_PATH variable" >&5
case ${LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
library_path_setting="contains current directory"
@@ -796,7 +798,7 @@ fi
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
-echo "configure:800: checking GCC_EXEC_PREFIX variable" >&5
+echo "configure:802: checking GCC_EXEC_PREFIX variable" >&5
case ${GCC_EXEC_PREFIX} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
gcc_exec_prefix_setting="contains current directory"
@@ -905,7 +907,7 @@ EOF
fi
echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
-echo "configure:909: checking whether a default linker was specified" >&5
+echo "configure:911: checking whether a default linker was specified" >&5
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test x"$gnu_ld_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
@@ -949,7 +951,7 @@ EOF
fi
echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
-echo "configure:953: checking whether a default assembler was specified" >&5
+echo "configure:955: checking whether a default assembler was specified" >&5
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test x"$gas_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
@@ -968,7 +970,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:972: checking for $ac_word" >&5
+echo "configure:974: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -998,7 +1000,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1002: checking for $ac_word" >&5
+echo "configure:1004: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1049,7 +1051,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1053: checking for $ac_word" >&5
+echo "configure:1055: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1081,7 +1083,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1087: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1092,12 +1094,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1096 "configure"
+#line 1098 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1123,12 +1125,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1127: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1129: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1132: checking whether we are using GNU C" >&5
+echo "configure:1134: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1137,7 +1139,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1156,7 +1158,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1160: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1162: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1189,10 +1191,10 @@ fi
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1193: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1195: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1196: checking whether cc understands -c and -o together" >&5
+echo "configure:1198: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1204,16 +1206,16 @@ else
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
@@ -1253,21 +1255,21 @@ fi
# -------------------------
echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1257: checking whether ${CC-cc} accepts -Wno-long-long" >&5
+echo "configure:1259: checking whether ${CC-cc} accepts -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="-Wno-long-long"
cat > conftest.$ac_ext <<EOF
-#line 1264 "configure"
+#line 1266 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_cc_no_long_long=yes
else
@@ -1283,7 +1285,7 @@ fi
echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1287: checking how to run the C preprocessor" >&5
+echo "configure:1289: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1298,13 +1300,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1302 "configure"
+#line 1304 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1315,13 +1317,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1319 "configure"
+#line 1321 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1332,13 +1334,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1336 "configure"
+#line 1338 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1363,21 +1365,21 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1367: checking for inline" >&5
+echo "configure:1369: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1374 "configure"
+#line 1376 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1404,19 +1406,19 @@ esac
echo $ac_n "checking for long long int""... $ac_c" 1>&6
-echo "configure:1408: checking for long long int" >&5
+echo "configure:1410: checking for long long int" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1413 "configure"
+#line 1415 "configure"
#include "confdefs.h"
int main() {
long long int i;
; return 0; }
EOF
-if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_long=yes
else
@@ -1436,19 +1438,19 @@ EOF
fi
echo $ac_n "checking for __int64""... $ac_c" 1>&6
-echo "configure:1440: checking for __int64" >&5
+echo "configure:1442: checking for __int64" >&5
if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1445 "configure"
+#line 1447 "configure"
#include "confdefs.h"
int main() {
__int64 i;
; return 0; }
EOF
-if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c___int64=yes
else
@@ -1469,19 +1471,19 @@ EOF
fi
echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
-echo "configure:1473: checking for built-in _Bool" >&5
+echo "configure:1475: checking for built-in _Bool" >&5
if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1478 "configure"
+#line 1480 "configure"
#include "confdefs.h"
int main() {
_Bool foo;
; return 0; }
EOF
-if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c__bool=yes
else
@@ -1505,13 +1507,13 @@ fi
# sizeof(char) is 1 by definition.
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:1509: checking size of void *" >&5
+echo "configure:1511: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1515 "configure"
+#line 1517 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1521,7 +1523,7 @@ int main() {
switch (0) case 0: case (sizeof (void *) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_void_p=$ac_size
else
@@ -1544,13 +1546,13 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1548: checking size of short" >&5
+echo "configure:1550: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1554 "configure"
+#line 1556 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1560,7 +1562,7 @@ int main() {
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_short=$ac_size
else
@@ -1583,13 +1585,13 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1587: checking size of int" >&5
+echo "configure:1589: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1593 "configure"
+#line 1595 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1599,7 +1601,7 @@ int main() {
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_int=$ac_size
else
@@ -1622,13 +1624,13 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1626: checking size of long" >&5
+echo "configure:1628: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1632 "configure"
+#line 1634 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1638,7 +1640,7 @@ int main() {
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
@@ -1662,13 +1664,13 @@ EOF
if test $ac_cv_c_long_long = yes; then
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1666: checking size of long long" >&5
+echo "configure:1668: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1672 "configure"
+#line 1674 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1678,7 +1680,7 @@ int main() {
switch (0) case 0: case (sizeof (long long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long_long=$ac_size
else
@@ -1703,13 +1705,13 @@ EOF
fi
if test $ac_cv_c___int64 = yes; then
echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:1707: checking size of __int64" >&5
+echo "configure:1709: checking size of __int64" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1713 "configure"
+#line 1715 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1719,7 +1721,7 @@ int main() {
switch (0) case 0: case (sizeof (__int64) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof___int64=$ac_size
else
@@ -1758,7 +1760,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1762: checking for $ac_word" >&5
+echo "configure:1764: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1790,7 +1792,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1794: checking for $ac_word" >&5
+echo "configure:1796: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1823,7 +1825,7 @@ fi
fi
echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
-echo "configure:1827: checking for compiler driver that understands Ada" >&5
+echo "configure:1829: checking for compiler driver that understands Ada" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1866,7 +1868,7 @@ fi
if test x$have_gnat != xno ; then
echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1870: checking whether ${ADAC} accepts -Wno-long-long" >&5
+echo "configure:1872: checking whether ${ADAC} accepts -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2004,9 +2006,9 @@ if test x$ac_checking_valgrind != x ; then
# It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both.
echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
-echo "configure:2008: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
+echo "configure:2010: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 2010 "configure"
+#line 2012 "configure"
#include "confdefs.h"
#include <memcheck.h>
#ifndef VALGRIND_DISCARD
@@ -2014,7 +2016,7 @@ echo "configure:2008: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2030,17 +2032,17 @@ rm -f conftest*
echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
-echo "configure:2034: checking for valgrind.h" >&5
+echo "configure:2036: checking for valgrind.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2039 "configure"
+#line 2041 "configure"
#include "confdefs.h"
#include <valgrind.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2094,7 +2096,7 @@ rm -f conf$$.file
# Extract the first word of "valgrind", so it can be a program name with args.
set dummy valgrind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2098: checking for $ac_word" >&5
+echo "configure:2100: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2330,12 +2332,25 @@ fi
+# Build with intermodule optimisations
+local_prefix=
+# Check whether --enable-intermodule or --disable-intermodule was given.
+if test "${enable_intermodule+set}" = set; then
+ enableval="$enable_intermodule"
+ case "${enable_intermodule}" in
+ yes) onestep=-onestep : ;;
+ *) onestep= : ;;
+esac
+fi
+
+
+
# -------------------------
# Checks for other programs
# -------------------------
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2339: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2354: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2368,7 +2383,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2372: checking for $ac_word" >&5
+echo "configure:2387: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2398,7 +2413,7 @@ test -n "$AWK" && break
done
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:2402: checking whether ln works" >&5
+echo "configure:2417: checking whether ln works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2430,7 +2445,7 @@ else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2434: checking whether ln -s works" >&5
+echo "configure:2449: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2464,7 +2479,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2468: checking for $ac_word" >&5
+echo "configure:2483: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2502,7 +2517,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2506: checking for a BSD compatible install" >&5
+echo "configure:2521: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2556,7 +2571,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "mktemp", so it can be a program name with args.
set dummy mktemp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2560: checking for $ac_word" >&5
+echo "configure:2575: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2595,7 +2610,7 @@ else
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2599: checking for $ac_word" >&5
+echo "configure:2614: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2624,13 +2639,13 @@ fi
if test -n "$MAKEINFO"; then
# Found it, now check the version.
echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
-echo "configure:2628: checking for modern makeinfo" >&5
+echo "configure:2643: checking for modern makeinfo" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
- echo "configure:2634: version of makeinfo is $ac_prog_version" >&5
+ echo "configure:2649: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)
@@ -2658,7 +2673,7 @@ fi
# Is pod2man recent enough to regenerate manpages?
echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
-echo "configure:2662: checking for recent Pod::Man" >&5
+echo "configure:2677: checking for recent Pod::Man" >&5
if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
echo "$ac_t""yes" 1>&6
GENERATED_MANPAGES=generated-manpages
@@ -2672,7 +2687,7 @@ fi
# "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
# but we need to sink errors and handle broken shells.
echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
-echo "configure:2676: checking for cmp's capabilities" >&5
+echo "configure:2691: checking for cmp's capabilities" >&5
echo abfoo >t1
echo cdfoo >t2
if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
@@ -2695,7 +2710,7 @@ else
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_word" >&5
+echo "configure:2714: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2732,7 +2747,7 @@ else
# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2736: checking for $ac_word" >&5
+echo "configure:2751: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2766,12 +2781,12 @@ fi
# --------------------
echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
-echo "configure:2770: checking for GNU C library" >&5
+echo "configure:2785: checking for GNU C library" >&5
if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2775 "configure"
+#line 2790 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
@@ -2781,7 +2796,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:2785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_glibc=yes
else
@@ -2802,12 +2817,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2806: checking for ANSI C header files" >&5
+echo "configure:2821: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2811 "configure"
+#line 2826 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2815,7 +2830,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2832,7 +2847,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2836 "configure"
+#line 2851 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2850,7 +2865,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2854 "configure"
+#line 2869 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2871,7 +2886,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2875 "configure"
+#line 2890 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2882,7 +2897,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2906,12 +2921,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2910: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2925: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2915 "configure"
+#line 2930 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2920,7 +2935,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2941,19 +2956,19 @@ EOF
fi
echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
-echo "configure:2945: checking for working stdbool.h" >&5
+echo "configure:2960: checking for working stdbool.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
+#line 2965 "configure"
#include "confdefs.h"
#include <stdbool.h>
int main() {
bool foo = false;
; return 0; }
EOF
-if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_stdbool_h=yes
else
@@ -2974,12 +2989,12 @@ EOF
fi
echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
-echo "configure:2978: checking whether string.h and strings.h may both be included" >&5
+echo "configure:2993: checking whether string.h and strings.h may both be included" >&5
if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2983 "configure"
+#line 2998 "configure"
#include "confdefs.h"
#include <string.h>
#include <strings.h>
@@ -2987,7 +3002,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_string=yes
else
@@ -3008,12 +3023,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:3012: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:3027: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3017 "configure"
+#line 3032 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -3029,7 +3044,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -3056,17 +3071,17 @@ for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3060: checking for $ac_hdr" >&5
+echo "configure:3075: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3065 "configure"
+#line 3080 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3096,17 +3111,17 @@ done
# Check for thread headers.
ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for thread.h""... $ac_c" 1>&6
-echo "configure:3100: checking for thread.h" >&5
+echo "configure:3115: checking for thread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3105 "configure"
+#line 3120 "configure"
#include "confdefs.h"
#include <thread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3130,17 +3145,17 @@ fi
ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:3134: checking for pthread.h" >&5
+echo "configure:3149: checking for pthread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3139 "configure"
+#line 3154 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3165,12 +3180,12 @@ fi
# These tests can't be done till we know if we have limits.h.
echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
-echo "configure:3169: checking for CHAR_BIT" >&5
+echo "configure:3184: checking for CHAR_BIT" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3174 "configure"
+#line 3189 "configure"
#include "confdefs.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
@@ -3195,7 +3210,7 @@ fi
echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
if test $gcc_cv_decl_char_bit = no; then
echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
-echo "configure:3199: checking number of bits in a byte" >&5
+echo "configure:3214: checking number of bits in a byte" >&5
if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3203,7 +3218,7 @@ else
gcc_cv_c_nbby=
while test $i -lt 65; do
cat > conftest.$ac_ext <<EOF
-#line 3207 "configure"
+#line 3222 "configure"
#include "confdefs.h"
int main() {
@@ -3213,7 +3228,7 @@ switch(0) {
; }
; return 0; }
EOF
-if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_nbby=$i; break
else
@@ -3238,14 +3253,14 @@ EOF
fi
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3242: checking whether byte ordering is bigendian" >&5
+echo "configure:3257: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3249 "configure"
+#line 3264 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3256,11 +3271,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3264 "configure"
+#line 3279 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3271,7 +3286,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3291,7 +3306,7 @@ if test "$cross_compiling" = yes; then
echo $ac_n "cross-compiling... " 2>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3295 "configure"
+#line 3310 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3304,7 +3319,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3322,7 +3337,7 @@ fi
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = unknown; then
echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
-echo "configure:3326: checking to probe for byte ordering" >&5
+echo "configure:3341: checking to probe for byte ordering" >&5
cat >conftest.c <<EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
@@ -3402,7 +3417,7 @@ esac
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
-echo "configure:3406: checking for collect2 libraries" >&5
+echo "configure:3421: checking for collect2 libraries" >&5
if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3413,7 +3428,7 @@ for libs in '' -lld -lmld \
do
LIBS="$libs"
cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
+#line 3432 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3424,7 +3439,7 @@ int main() {
ldopen()
; return 0; }
EOF
-if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gcc_cv_collect2_libs="$libs"; break
else
@@ -3450,14 +3465,14 @@ save_LIBS="$LIBS"
LIBS=
echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
-echo "configure:3454: checking for library containing exc_resume" >&5
+echo "configure:3469: checking for library containing exc_resume" >&5
if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_exc_resume="no"
cat > conftest.$ac_ext <<EOF
-#line 3461 "configure"
+#line 3476 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3468,7 +3483,7 @@ int main() {
exc_resume()
; return 0; }
EOF
-if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_exc_resume="none required"
else
@@ -3479,7 +3494,7 @@ rm -f conftest*
test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3483 "configure"
+#line 3498 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3490,7 +3505,7 @@ int main() {
exc_resume()
; return 0; }
EOF
-if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_exc_resume="-l$i"
break
@@ -3520,14 +3535,14 @@ save_LIBS="$LIBS"
LIBS=
echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
-echo "configure:3524: checking for library containing ldexp" >&5
+echo "configure:3539: checking for library containing ldexp" >&5
if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_ldexp="no"
cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 3546 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3538,7 +3553,7 @@ int main() {
ldexp()
; return 0; }
EOF
-if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_ldexp="none required"
else
@@ -3549,7 +3564,7 @@ rm -f conftest*
test "$ac_cv_search_ldexp" = "no" && for i in m; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3553 "configure"
+#line 3568 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3560,7 +3575,7 @@ int main() {
ldexp()
; return 0; }
EOF
-if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_ldexp="-l$i"
break
@@ -3587,12 +3602,12 @@ LIBS="$save_LIBS"
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
-echo "configure:3591: checking for inttypes.h" >&5
+echo "configure:3606: checking for inttypes.h" >&5
if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3596 "configure"
+#line 3611 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <inttypes.h>
@@ -3600,7 +3615,7 @@ int main() {
intmax_t i = -1;
; return 0; }
EOF
-if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_inttypes_h=yes
else
@@ -3628,12 +3643,12 @@ for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
setlocale
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3632: checking for $ac_func" >&5
+echo "configure:3647: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3637 "configure"
+#line 3652 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3656,7 +3671,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3683,7 +3698,7 @@ done
if test x$ac_cv_func_mbstowcs = xyes; then
echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
-echo "configure:3687: checking whether mbstowcs works" >&5
+echo "configure:3702: checking whether mbstowcs works" >&5
if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3691,7 +3706,7 @@ else
gcc_cv_func_mbstowcs_works=yes
else
cat > conftest.$ac_ext <<EOF
-#line 3695 "configure"
+#line 3710 "configure"
#include "confdefs.h"
#include <stdlib.h>
int main()
@@ -3700,7 +3715,7 @@ int main()
return 0;
}
EOF
-if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_func_mbstowcs_works=yes
else
@@ -3724,12 +3739,12 @@ EOF
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3728: checking for ssize_t" >&5
+echo "configure:3743: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3733 "configure"
+#line 3748 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3760,12 +3775,12 @@ fi
# Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t).
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3764: checking for uid_t in sys/types.h" >&5
+echo "configure:3779: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3769 "configure"
+#line 3784 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3794,7 +3809,7 @@ EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:3798: checking type of array argument to getgroups" >&5
+echo "configure:3813: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3802,7 +3817,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 3806 "configure"
+#line 3821 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -3827,7 +3842,7 @@ main()
}
EOF
-if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -3841,7 +3856,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 3845 "configure"
+#line 3860 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -3882,7 +3897,7 @@ fi
echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:3886: checking whether the printf functions support %p" >&5
+echo "configure:3901: checking whether the printf functions support %p" >&5
if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3890,7 +3905,7 @@ else
gcc_cv_func_printf_ptr=no
else
cat > conftest.$ac_ext <<EOF
-#line 3894 "configure"
+#line 3909 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3903,7 +3918,7 @@ int main()
return (p != q);
}
EOF
-if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_func_printf_ptr=yes
else
@@ -3933,7 +3948,7 @@ if test $ac_cv_header_sys_mman_h != yes \
gcc_cv_func_mmap_anon=no
else
echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
-echo "configure:3937: checking whether read-only mmap of a plain file works" >&5
+echo "configure:3952: checking whether read-only mmap of a plain file works" >&5
if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3952,7 +3967,7 @@ fi
echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6
echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
-echo "configure:3956: checking whether mmap from /dev/zero works" >&5
+echo "configure:3971: checking whether mmap from /dev/zero works" >&5
if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3978,12 +3993,12 @@ echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6
# Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
-echo "configure:3982: checking for MAP_ANON(YMOUS)" >&5
+echo "configure:3997: checking for MAP_ANON(YMOUS)" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3987 "configure"
+#line 4002 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/mman.h>
@@ -3997,7 +4012,7 @@ int main() {
int n = MAP_ANONYMOUS;
; return 0; }
EOF
-if { (eval echo configure:4001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_map_anon=yes
else
@@ -4015,7 +4030,7 @@ echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6
gcc_cv_func_mmap_anon=no
else
echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
-echo "configure:4019: checking whether mmap with MAP_ANON(YMOUS) works" >&5
+echo "configure:4034: checking whether mmap with MAP_ANON(YMOUS) works" >&5
if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4070,12 +4085,12 @@ case "${host}" in
;;
esac
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:4074: checking for pid_t" >&5
+echo "configure:4089: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4079 "configure"
+#line 4094 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4104,17 +4119,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:4108: checking for vfork.h" >&5
+echo "configure:4123: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4113 "configure"
+#line 4128 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4139,18 +4154,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:4143: checking for working vfork" >&5
+echo "configure:4158: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:4149: checking for vfork" >&5
+echo "configure:4164: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4154 "configure"
+#line 4169 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -4173,7 +4188,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -4195,7 +4210,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 4199 "configure"
+#line 4214 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -4290,7 +4305,7 @@ main() {
}
}
EOF
-if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -4329,7 +4344,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:4333: checking for iconv" >&5
+echo "configure:4348: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4337,7 +4352,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 4341 "configure"
+#line 4356 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -4347,7 +4362,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -4359,7 +4374,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
cat > conftest.$ac_ext <<EOF
-#line 4363 "configure"
+#line 4378 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -4369,7 +4384,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:4373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -4390,13 +4405,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:4394: checking for iconv declaration" >&5
+echo "configure:4409: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4400 "configure"
+#line 4415 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -4415,7 +4430,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
@@ -4448,19 +4463,19 @@ LIBICONV_DEP=
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:4452: checking for LC_MESSAGES" >&5
+echo "configure:4467: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4457 "configure"
+#line 4472 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -4491,12 +4506,12 @@ for ac_func in getenv atol sbrk abort atof getcwd getwd \
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4495: checking whether $ac_func is declared" >&5
+echo "configure:4510: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4500 "configure"
+#line 4515 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4510,7 +4525,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4612,12 +4627,12 @@ for ac_func in getrlimit setrlimit getrusage
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4616: checking whether $ac_func is declared" >&5
+echo "configure:4631: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4621 "configure"
+#line 4636 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4635,7 +4650,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4674,7 +4689,7 @@ fi
cat > conftest.$ac_ext <<EOF
-#line 4678 "configure"
+#line 4693 "configure"
#include "confdefs.h"
#include "ansidecl.h"
@@ -4687,7 +4702,7 @@ int main() {
rlim_t l = 0;
; return 0; }
EOF
-if { (eval echo configure:4691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
@@ -4704,12 +4719,12 @@ for ac_func in ldgetname
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4708: checking whether $ac_func is declared" >&5
+echo "configure:4723: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4713 "configure"
+#line 4728 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4727,7 +4742,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4763,12 +4778,12 @@ for ac_func in times
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4767: checking whether $ac_func is declared" >&5
+echo "configure:4782: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4772 "configure"
+#line 4787 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4786,7 +4801,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4820,13 +4835,13 @@ fi
# More time-related stuff.
echo $ac_n "checking for struct tms""... $ac_c" 1>&6
-echo "configure:4824: checking for struct tms" >&5
+echo "configure:4839: checking for struct tms" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4830 "configure"
+#line 4845 "configure"
#include "confdefs.h"
#include "ansidecl.h"
@@ -4839,7 +4854,7 @@ int main() {
struct tms tms;
; return 0; }
EOF
-if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tms=yes
else
@@ -4862,13 +4877,13 @@ fi
# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
# revisit after autoconf 2.50.
echo $ac_n "checking for clock_t""... $ac_c" 1>&6
-echo "configure:4866: checking for clock_t" >&5
+echo "configure:4881: checking for clock_t" >&5
if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4872 "configure"
+#line 4887 "configure"
#include "confdefs.h"
#include "ansidecl.h"
@@ -4878,7 +4893,7 @@ int main() {
clock_t x;
; return 0; }
EOF
-if { (eval echo configure:4882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_type_clock_t=yes
else
@@ -4899,12 +4914,12 @@ EOF
fi
echo $ac_n "checking for uchar""... $ac_c" 1>&6
-echo "configure:4903: checking for uchar" >&5
+echo "configure:4918: checking for uchar" >&5
if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4908 "configure"
+#line 4923 "configure"
#include "confdefs.h"
#include "ansidecl.h"
@@ -4915,7 +4930,7 @@ if ((uchar *)0) return 0;
if (sizeof(uchar)) return 0;
; return 0; }
EOF
-if { (eval echo configure:4919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_uchar=yes
else
@@ -4945,7 +4960,7 @@ if test "${enable_initfini_array+set}" = set; then
else
echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
-echo "configure:4949: checking for .preinit_array/.init_array/.fini_array support" >&5
+echo "configure:4964: checking for .preinit_array/.init_array/.fini_array support" >&5
if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4953,7 +4968,7 @@ else
gcc_cv_initfini_array=no
else
cat > conftest.$ac_ext <<EOF
-#line 4957 "configure"
+#line 4972 "configure"
#include "confdefs.h"
static int x = -1;
@@ -4961,7 +4976,7 @@ int main (void) { return x; }
int foo (void) { x = 0; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
EOF
-if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_initfini_array=yes
else
@@ -4989,12 +5004,12 @@ fi
# mkdir takes a single argument on some systems.
echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
-echo "configure:4993: checking if mkdir takes one argument" >&5
+echo "configure:5008: checking if mkdir takes one argument" >&5
if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4998 "configure"
+#line 5013 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -5011,7 +5026,7 @@ int main() {
mkdir ("foo", 0);
; return 0; }
EOF
-if { (eval echo configure:5015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_mkdir_takes_one_arg=no
else
@@ -5051,7 +5066,7 @@ fi
echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
-echo "configure:5055: checking for main in -lunwind" >&5
+echo "configure:5070: checking for main in -lunwind" >&5
ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5059,14 +5074,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lunwind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5063 "configure"
+#line 5078 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5361,7 +5376,7 @@ if test -f ../intl/config.intl; then
. ../intl/config.intl
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:5365: checking whether NLS is requested" >&5
+echo "configure:5380: checking whether NLS is requested" >&5
if test x"$USE_NLS" != xyes; then
echo "$ac_t""no" 1>&6
else
@@ -5372,7 +5387,7 @@ EOF
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:5376: checking for catalogs to be installed" >&5
+echo "configure:5391: checking for catalogs to be installed" >&5
# Look for .po and .gmo files in the source directory.
CATALOGS=
XLINGUAS=
@@ -5422,7 +5437,7 @@ fi
case $host_os in
win32 | pe | cygwin* | mingw32* | uwin*)
echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
-echo "configure:5426: checking whether windows registry support is requested" >&5
+echo "configure:5441: checking whether windows registry support is requested" >&5
if test "x$enable_win32_registry" != xno; then
cat >> confdefs.h <<\EOF
#define ENABLE_WIN32_REGISTRY 1
@@ -5431,14 +5446,14 @@ EOF
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
-echo "configure:5435: checking for library containing RegOpenKeyExA" >&5
+echo "configure:5450: checking for library containing RegOpenKeyExA" >&5
if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_RegOpenKeyExA="no"
cat > conftest.$ac_ext <<EOF
-#line 5442 "configure"
+#line 5457 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5449,7 +5464,7 @@ int main() {
RegOpenKeyExA()
; return 0; }
EOF
-if { (eval echo configure:5453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_RegOpenKeyExA="none required"
else
@@ -5460,7 +5475,7 @@ rm -f conftest*
test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5464 "configure"
+#line 5479 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5471,7 +5486,7 @@ int main() {
RegOpenKeyExA()
; return 0; }
EOF
-if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_RegOpenKeyExA="-l$i"
break
@@ -5513,7 +5528,7 @@ esac
if test "x$enable_win32_registry" != xno; then
echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
-echo "configure:5517: checking registry key on windows hosts" >&5
+echo "configure:5532: checking registry key on windows hosts" >&5
cat >> confdefs.h <<EOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
EOF
@@ -5723,7 +5738,7 @@ esac
# build->target assembler and hope that it will have the same features
# as the host->target assembler we'll be using.
echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
-echo "configure:5727: checking what assembler to use" >&5
+echo "configure:5742: checking what assembler to use" >&5
in_tree_gas=no
gcc_cv_as=
gcc_cv_gas_major_version=
@@ -5841,7 +5856,7 @@ esac
# build->target linker and hope that it will have the same features
# as the host->target linker we'll be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6
-echo "configure:5845: checking what linker to use" >&5
+echo "configure:5860: checking what linker to use" >&5
in_tree_ld=no
gcc_cv_ld=
gcc_cv_gld_major_version=
@@ -5949,7 +5964,7 @@ esac
# Figure out what nm we will be using.
gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
-echo "configure:5953: checking what nm to use" >&5
+echo "configure:5968: checking what nm to use" >&5
in_tree_nm=no
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
@@ -5972,7 +5987,7 @@ esac
# Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
-echo "configure:5976: checking what objdump to use" >&5
+echo "configure:5991: checking what objdump to use" >&5
in_tree_objdump=no
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
@@ -5997,7 +6012,7 @@ esac
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:6001: checking assembler alignment features" >&5
+echo "configure:6016: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test $in_tree_gas = yes; then
# Gas version 2.6 and later support for .balign and .p2align.
@@ -6058,7 +6073,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:6062: checking assembler subsection support" >&5
+echo "configure:6077: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6106,7 +6121,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
-echo "configure:6110: checking assembler weak support" >&5
+echo "configure:6125: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6136,7 +6151,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
-echo "configure:6140: checking assembler hidden support" >&5
+echo "configure:6155: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6221,7 +6236,7 @@ libgcc_visibility=$gcc_cv_as_hidden
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
-echo "configure:6225: checking assembler leb128 support" >&5
+echo "configure:6240: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6273,7 +6288,7 @@ fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
-echo "configure:6277: checking assembler eh_frame optimization" >&5
+echo "configure:6292: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6361,7 +6376,7 @@ fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
-echo "configure:6365: checking assembler section merging support" >&5
+echo "configure:6380: checking assembler section merging support" >&5
gcc_cv_as_shf_merge=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6391,7 +6406,7 @@ fi
echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
-echo "configure:6395: checking assembler thread-local storage support" >&5
+echo "configure:6410: checking assembler thread-local storage support" >&5
gcc_cv_as_tls=no
conftest_s=
tls_first_major=
@@ -6601,7 +6616,7 @@ case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
-echo "configure:6605: checking assembler supports explicit relocations" >&5
+echo "configure:6620: checking assembler supports explicit relocations" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6654,7 +6669,7 @@ EOF
;;
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
-echo "configure:6658: checking assembler .register pseudo-op support" >&5
+echo "configure:6673: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6682,7 +6697,7 @@ EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
-echo "configure:6686: checking assembler supports -relax" >&5
+echo "configure:6701: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6710,7 +6725,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
-echo "configure:6714: checking assembler and linker support unaligned pc related relocs" >&5
+echo "configure:6729: checking assembler and linker support unaligned pc related relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6737,7 +6752,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
-echo "configure:6741: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
+echo "configure:6756: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6777,7 +6792,7 @@ EOF
fi
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:6781: checking for assembler offsetable %lo() support" >&5
+echo "configure:6796: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6816,7 +6831,7 @@ EOF
i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:6820: checking assembler instructions" >&5
+echo "configure:6835: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6850,7 +6865,7 @@ EOF
echo "$ac_t""$gcc_cv_as_instructions" 1>&6
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
-echo "configure:6854: checking assembler GOTOFF in data directives" >&5
+echo "configure:6869: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -6884,7 +6899,7 @@ EOF
ia64*-*-*)
echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
-echo "configure:6888: checking assembler supports ltoffx and ldxmov" >&5
+echo "configure:6903: checking assembler supports ltoffx and ldxmov" >&5
if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6928,7 +6943,7 @@ EOF
;;
powerpc*-*-*)
echo $ac_n "checking assembler supports mfcr field""... $ac_c" 1>&6
-echo "configure:6932: checking assembler supports mfcr field" >&5
+echo "configure:6947: checking assembler supports mfcr field" >&5
if eval "test \"`echo '$''{'gcc_cv_as_mfcrf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6978,7 +6993,7 @@ EOF
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
-echo "configure:6982: checking assembler dwarf2 debug_line support" >&5
+echo "configure:6997: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
@@ -7042,7 +7057,7 @@ fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
-echo "configure:7046: checking assembler --gdwarf2 support" >&5
+echo "configure:7061: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -7074,7 +7089,7 @@ fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
-echo "configure:7078: checking assembler --gstabs support" >&5
+echo "configure:7093: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
@@ -7112,7 +7127,7 @@ fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
-echo "configure:7116: checking linker read-only and read-write section mixing" >&5
+echo "configure:7131: checking linker read-only and read-write section mixing" >&5
gcc_cv_ld_ro_rw_mix=unknown
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \
@@ -7151,7 +7166,7 @@ fi
echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
-echo "configure:7155: checking linker PT_GNU_EH_FRAME support" >&5
+echo "configure:7170: checking linker PT_GNU_EH_FRAME support" >&5
gcc_cv_ld_eh_frame_hdr=no
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \
@@ -7173,7 +7188,7 @@ fi
echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
-echo "configure:7177: checking linker position independent executable support" >&5
+echo "configure:7192: checking linker position independent executable support" >&5
gcc_cv_ld_pie=no
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \
@@ -7198,7 +7213,7 @@ echo "$ac_t""$gcc_cv_ld_pie" 1>&6
case "$target" in
mips*-*-*)
echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
-echo "configure:7202: checking whether libgloss uses STARTUP directives consistently" >&5
+echo "configure:7217: checking whether libgloss uses STARTUP directives consistently" >&5
gcc_cv_mips_libgloss_startup=no
gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
if test "x$exec_prefix" = xNONE; then
@@ -7226,7 +7241,7 @@ EOF
echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
-echo "configure:7230: checking whether the assembler has explicit relocation support" >&5
+echo "configure:7245: checking whether the assembler has explicit relocation support" >&5
if test x$gcc_cv_mips_explicit_relocs = x; then
gcc_cv_mips_explicit_relocs=no
if test $in_tree_gas = yes; then
@@ -7432,7 +7447,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:7436: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:7451: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -7939,6 +7954,7 @@ s%@enable_shared@%$enable_shared%g
s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
+s%@onestep@%$onestep%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AWK@%$AWK%g
s%@LN@%$LN%g
diff --git a/gcc/configure.in b/gcc/configure.in
index 16bd3ea583f..5207e4cf49f 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -569,6 +569,16 @@ AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
AC_SUBST(CROSS_SYSTEM_HEADER_DIR)
+# Build with intermodule optimisations
+local_prefix=
+AC_ARG_ENABLE(intermodule,
+[ --enable-intermodule build the compiler in one step],
+[case "${enable_intermodule}" in
+ yes) onestep=-onestep : ;;
+ *) onestep= : ;;
+esac])
+AC_SUBST(onestep)
+
# -------------------------
# Checks for other programs
# -------------------------
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d64d722303b..dfeaa4ac27f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2003-07-11 Geoffrey Keating <geoffk@apple.com>
+
+ * decl.c (cp_finish_decl): Handle 'used' attribute.
+
+ * cp-lang.c (c_reset_state): New dummy routine.
+ * cp-tree.h (finish_file): Move prototype to c-common.h.
+ * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
+
2003-07-11 Mark Mitchell <mark@codesourcery.com>
PR c++/8327
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 741a0cc7747..3c687113b95 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -372,3 +372,9 @@ cp_var_mod_type_p (tree type)
return false;
}
+/* Stub routine to tell people that this doesn't work yet. */
+void
+c_reset_state (void)
+{
+ sorry ("inter-module optimisations not implemented yet");
+}
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 052c12ab09e..c713191360e 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3773,7 +3773,6 @@ extern void comdat_linkage (tree);
extern void import_export_vtable (tree, tree, int);
extern void import_export_decl (tree);
extern void import_export_tinfo (tree, tree, bool);
-extern void finish_file (void);
extern tree build_cleanup (tree);
extern tree build_offset_ref_call_from_tree (tree, tree);
extern void set_decl_namespace (tree, tree, bool);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 966da3ca704..be2846b7d07 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8259,6 +8259,10 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags)
if (was_readonly)
TREE_READONLY (decl) = 1;
+
+ /* If this was marked 'used', be sure it will be output. */
+ if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
+ mark_referenced (DECL_ASSEMBLER_NAME (decl));
}
/* This is here for a midend callback from c-common.c */
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 8a76eac0b70..da8eb085096 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -14617,10 +14617,10 @@ static GTY (()) cp_parser *the_parser;
/* External interface. */
-/* Parse the entire translation unit. */
+/* Parse one entire translation unit. */
-int
-yyparse (void)
+void
+c_parse_file (void)
{
bool error_occurred;
@@ -14629,10 +14629,6 @@ yyparse (void)
? dk_no_deferred : dk_no_check);
error_occurred = cp_parser_translation_unit (the_parser);
the_parser = NULL;
-
- finish_file ();
-
- return error_occurred;
}
/* Clean up after parsing the entire translation unit. */
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index cc1faecf966..f12cf1cc347 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -427,6 +427,15 @@ cpp_add_dependency_target (cpp_reader *pfile, const char *target, int quote)
deps_add_target (pfile->deps, target, quote);
}
+/* This sets up for processing input from the file FNAME.
+ It returns false on error. */
+bool
+cpp_read_next_file (cpp_reader *pfile, const char *fname)
+{
+ /* Open the main input file. */
+ return _cpp_read_file (pfile, fname);
+}
+
/* This is called after options have been parsed, and partially
processed. Setup for processing input from the file named FNAME,
or stdin if it is the empty string. Return the original filename
@@ -451,9 +460,8 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname)
deps_add_default_target (pfile->deps, fname);
}
- /* Open the main input file. */
pfile->line = 1;
- if (!_cpp_read_file (pfile, fname))
+ if (!cpp_read_next_file (pfile, fname))
return NULL;
/* Set this here so the client can change the option if it wishes,
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 1dfef726954..f0096812c08 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -109,6 +109,7 @@ static unsigned int read_flag (cpp_reader *, unsigned int);
static int strtoul_for_line (const uchar *, unsigned int, unsigned long *);
static void do_diagnostic (cpp_reader *, int, int);
static cpp_hashnode *lex_macro_node (cpp_reader *);
+static int undefine_macros (cpp_reader *, cpp_hashnode *, void *);
static void do_include_common (cpp_reader *, enum include_type);
static struct pragma_entry *lookup_pragma_entry (struct pragma_entry *,
const cpp_hashnode *);
@@ -540,6 +541,45 @@ do_undef (cpp_reader *pfile)
check_eol (pfile);
}
+/* Undefine a single macro/assertion/whatever. */
+
+static int
+undefine_macros (cpp_reader *pfile, cpp_hashnode *h,
+ void *data_p ATTRIBUTE_UNUSED)
+{
+ switch (h->type)
+ {
+ case NT_VOID:
+ break;
+
+ case NT_MACRO:
+ if (pfile->cb.undef)
+ (*pfile->cb.undef) (pfile, pfile->directive_line, h);
+
+ if (CPP_OPTION (pfile, warn_unused_macros))
+ _cpp_warn_if_unused_macro (pfile, h, NULL);
+
+ /* and fall through... */
+ case NT_ASSERTION:
+ _cpp_free_definition (h);
+ break;
+
+ default:
+ abort ();
+ }
+ h->flags &= ~NODE_POISONED;
+ return 1;
+}
+
+/* Undefine all macros and assertions. */
+
+void
+cpp_undef_all (cpp_reader *pfile)
+{
+ cpp_forall_identifiers (pfile, undefine_macros, NULL);
+}
+
+
/* Helper routine used by parse_include. Reinterpret the current line
as an h-char-sequence (< ... >); we are looking at the first token
after the <. Returns a malloced filename. */
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index fb3cc78ec67..661bbe5467d 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -535,6 +535,10 @@ extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
too. If there was an error opening the file, it returns NULL. */
extern const char *cpp_read_main_file (cpp_reader *, const char *);
+/* This continues processing to a new file. It will return false if
+ there was an error opening the file. */
+extern bool cpp_read_next_file (cpp_reader *, const char *);
+
/* Set up built-ins like __FILE__. */
extern void cpp_init_builtins (cpp_reader *, int);
@@ -584,6 +588,9 @@ extern void cpp_assert (cpp_reader *, const char *);
extern void cpp_undef (cpp_reader *, const char *);
extern void cpp_unassert (cpp_reader *, const char *);
+/* Undefine all macros and assertions. */
+extern void cpp_undef_all (cpp_reader *);
+
extern cpp_buffer *cpp_push_buffer (cpp_reader *, const unsigned char *,
size_t, int, int);
extern int cpp_defined (cpp_reader *, const unsigned char *, int);
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 83c2354d151..022050494d4 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -710,10 +710,12 @@ in the following sections.
@section Options Controlling the Kind of Output
Compilation can involve up to four stages: preprocessing, compilation
-proper, assembly and linking, always in that order. The first three
-stages apply to an individual source file, and end by producing an
-object file; linking combines all the object files (those newly
-compiled, and those specified as input) into an executable file.
+proper, assembly and linking, always in that order. GCC is capable of
+preprocessing and compiling several files either into several
+assembler input files, or into one assembler input file; then each
+assembler input file produces an object file, and linking combines all
+the object files (those newly compiled, and those specified as input)
+into an executable file.
@cindex file name suffix
For any given input file, the file name suffix determines what kind of
@@ -885,9 +887,9 @@ Place output in file @var{file}. This applies regardless to whatever
sort of output is being produced, whether it be an executable file,
an object file, an assembler file or preprocessed C code.
-Since only one output file can be specified, it does not make sense to
-use @option{-o} when compiling more than one input file, unless you are
-producing an executable file as output.
+If you specify @option{-o} when compiling more than one input file, or
+you are producing an executable file as output, all the source files
+on the command line will be compiled at once.
If @option{-o} is not specified, the default is to put an executable file
in @file{a.out}, the object file for @file{@var{source}.@var{suffix}} in
@@ -3471,6 +3473,14 @@ Turning on optimization flags makes the compiler attempt to improve
the performance and/or code size at the expense of compilation time
and possibly the ability to debug the program.
+The compiler performs optimisation based on the knowledge it has of
+the program. Using the @option{-funit-at-a-time} flag will allow the
+compiler to consider information gained from later functions in the
+file when compiling a function. Compiling multiple files at once to a
+single output file (and using @option{-funit-at-a-time}) will allow
+the compiler to use information gained from all of the files when
+compiling each of them.
+
Not all optimizations are controlled directly by a flag. Only
optimizations that have a flag are listed.
@@ -4362,8 +4372,9 @@ better job.
@item -funit-at-a-time
@opindex funit-at-a-time
-Parse the whole compilation unit before starting to produce code. This allows some
-extra optimizations to take place but consumes more memory.
+Parse the whole compilation unit before starting to produce code.
+This allows some extra optimizations to take place but consumes more
+memory.
@item -funroll-loops
@opindex funroll-loops
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 0f59b27ba2d..cd6a3f59b73 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2891,6 +2891,11 @@ static struct infile *infiles;
int n_infiles;
+/* True if multiple input files are being compiled to a single
+ assembly file. */
+
+static bool combine_inputs;
+
/* This counts the number of libraries added by lang_specific_driver, so that
we can tell if there were any user supplied any files or libraries. */
@@ -3715,8 +3720,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
}
}
- if (have_c && have_o && lang_n_infiles > 1)
- fatal ("cannot specify -o with -c or -S and multiple compilations");
+ combine_inputs = (have_c && have_o && lang_n_infiles > 1);
if ((save_temps_flag || report_times) && use_pipes)
{
@@ -4760,8 +4764,16 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
break;
case 'i':
- obstack_grow (&obstack, input_filename, input_filename_length);
- arg_going = 1;
+ if (combine_inputs)
+ {
+ for (i = 0; (int) i < n_infiles; i++)
+ store_arg (infiles[i].name, 0, 0);
+ }
+ else
+ {
+ obstack_grow (&obstack, input_filename, input_filename_length);
+ arg_going = 1;
+ }
break;
case 'I':
@@ -6291,7 +6303,28 @@ main (int argc, const char *const *argv)
explicit_link_files = xcalloc (1, n_infiles);
- for (i = 0; (int) i < n_infiles; i++)
+ if (combine_inputs)
+ {
+ int lang_n_infiles = 0;
+ for (i = 0; (int) i < n_infiles; i++)
+ {
+ const char *name = infiles[i].name;
+ struct compiler *compiler
+ = lookup_compiler (name, strlen (name), infiles[i].language);
+ if (compiler == NULL)
+ error ("%s: linker input file unused because linking not done",
+ name);
+ else if (lang_n_infiles > 0 && compiler != input_file_compiler)
+ fatal ("cannot specify -o with -c or -S and multiple languages");
+ else
+ {
+ lang_n_infiles++;
+ input_file_compiler = compiler;
+ }
+ }
+ }
+
+ for (i = 0; (int) i < (combine_inputs ? 1 : n_infiles); i++)
{
int this_file_error = 0;
@@ -6306,9 +6339,10 @@ main (int argc, const char *const *argv)
/* Figure out which compiler from the file's suffix. */
- input_file_compiler
- = lookup_compiler (infiles[i].name, input_filename_length,
- infiles[i].language);
+ if (! combine_inputs)
+ input_file_compiler
+ = lookup_compiler (infiles[i].name, input_filename_length,
+ infiles[i].language);
if (input_file_compiler)
{
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 12da91c5c45..864cff9e150 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -80,8 +80,6 @@ extern int lhd_tree_inlining_start_inlining (tree);
extern void lhd_tree_inlining_end_inlining (tree);
extern tree lhd_tree_inlining_convert_parm_for_inlining (tree, tree, tree);
-extern void write_global_declarations (void);
-
#define LANG_HOOKS_NAME "GNU unknown"
#define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
#define LANG_HOOKS_INIT hook_bool_void_false
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 3d78b099941..f7f07f9d102 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -3521,7 +3521,7 @@ check_ivars (inter, imp)
t1 = TREE_TYPE (intdecls); t2 = TREE_TYPE (impdecls);
- if (!comptypes (t1, t2))
+ if (!comptypes (t1, t2, false))
{
if (DECL_NAME (intdecls) == DECL_NAME (impdecls))
{
@@ -4905,7 +4905,7 @@ finish_message_expr (receiver, sel_name, method_params)
;
else if (! IS_ID (rtype)
/* Allow any type that matches objc_class_type. */
- && ! comptypes (rtype, objc_class_type))
+ && ! comptypes (rtype, objc_class_type, false))
{
warning ("invalid receiver type `%s'",
gen_declaration (rtype, errbuf));
@@ -7064,7 +7064,8 @@ comp_method_with_proto (method, proto)
/* install return type */
TREE_TYPE (function1_template) = groktypename (TREE_TYPE (proto));
- return comptypes (TREE_TYPE (METHOD_DEFINITION (method)), function1_template);
+ return comptypes (TREE_TYPE (METHOD_DEFINITION (method)), function1_template,
+ false);
}
/* Return 1 if PROTO1 is consistent with PROTO2. */
@@ -7087,7 +7088,7 @@ comp_proto_with_proto (proto0, proto1)
TREE_TYPE (function1_template) = groktypename (TREE_TYPE (proto0));
TREE_TYPE (function2_template) = groktypename (TREE_TYPE (proto1));
- return comptypes (function1_template, function2_template);
+ return comptypes (function1_template, function2_template, false);
}
/* - Generate an identifier for the function. the format is "_n_cls",
diff --git a/gcc/toplev.h b/gcc/toplev.h
index a36f9eb1670..a5d0c532e3a 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -91,6 +91,7 @@ extern void fnotice (FILE *, const char *, ...)
extern int wrapup_global_declarations (tree *, int);
extern void check_global_declarations (tree *, int);
+extern void write_global_declarations (void);
/* A unique local time stamp, might be zero if none is available. */
extern unsigned local_tick;
diff --git a/gcc/tree.c b/gcc/tree.c
index b61a70b262f..2f870337428 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4370,26 +4370,30 @@ decl_type_context (tree decl)
tree context = DECL_CONTEXT (decl);
while (context)
- {
- if (TREE_CODE (context) == NAMESPACE_DECL)
+ switch (TREE_CODE (context))
+ {
+ case NAMESPACE_DECL:
+ case TRANSLATION_UNIT_DECL:
return NULL_TREE;
- if (TREE_CODE (context) == RECORD_TYPE
- || TREE_CODE (context) == UNION_TYPE
- || TREE_CODE (context) == QUAL_UNION_TYPE)
+ case RECORD_TYPE:
+ case UNION_TYPE:
+ case QUAL_UNION_TYPE:
return context;
-
- if (TREE_CODE (context) == TYPE_DECL
- || TREE_CODE (context) == FUNCTION_DECL)
+
+ case TYPE_DECL:
+ case FUNCTION_DECL:
context = DECL_CONTEXT (context);
-
- else if (TREE_CODE (context) == BLOCK)
+ break;
+
+ case BLOCK:
context = BLOCK_SUPERCONTEXT (context);
-
- else
- /* Unhandled CONTEXT!? */
+ break;
+
+ default:
abort ();
- }
+ }
+
return NULL_TREE;
}
diff --git a/gcc/tree.def b/gcc/tree.def
index b71d31d0454..a62206f33fb 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -277,17 +277,18 @@ DEFTREECODE (VECTOR_CST, "vector_cst", 'c', 0)
/* Contents are TREE_STRING_LENGTH and TREE_STRING_POINTER fields. */
DEFTREECODE (STRING_CST, "string_cst", 'c', 0)
-/* Declarations. All references to names are represented as ..._DECL nodes.
- The decls in one binding context are chained through the TREE_CHAIN field.
- Each DECL has a DECL_NAME field which contains an IDENTIFIER_NODE.
- (Some decls, most often labels, may have zero as the DECL_NAME).
- DECL_CONTEXT points to the node representing the context in which
- this declaration has its scope. For FIELD_DECLs, this is the
- RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE node that the field
- is a member of. For VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
- and CONST_DECL nodes, this points to either the FUNCTION_DECL for the
- containing function, the RECORD_TYPE or UNION_TYPE for the containing
- type, or NULL_TREE if the given decl has "file scope".
+/* Declarations. All references to names are represented as ..._DECL
+ nodes. The decls in one binding context are chained through the
+ TREE_CHAIN field. Each DECL has a DECL_NAME field which contains
+ an IDENTIFIER_NODE. (Some decls, most often labels, may have zero
+ as the DECL_NAME). DECL_CONTEXT points to the node representing
+ the context in which this declaration has its scope. For
+ FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
+ QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
+ PARM_DECL, FUNCTION_DECL, LABEL_DECL, and CONST_DECL nodes, this
+ points to either the FUNCTION_DECL for the containing function, the
+ RECORD_TYPE or UNION_TYPE for the containing type, or NULL_TREE or
+ a TRANSLATION_UNIT_DECL if the given decl has "file scope".
DECL_ABSTRACT_ORIGIN, if non-NULL, points to the original (abstract)
..._DECL node of which this decl is an (inlined or template expanded)
instance.
@@ -298,9 +299,9 @@ DEFTREECODE (STRING_CST, "string_cst", 'c', 0)
and DECL_MODE fields exist in decl nodes just as in type nodes.
They are unused in LABEL_DECL, TYPE_DECL and CONST_DECL nodes.
- DECL_OFFSET holds an integer number of bits offset for the location.
- DECL_VOFFSET holds an expression for a variable offset; it is
- to be multiplied by DECL_VOFFSET_UNIT (an integer).
+ DECL_FIELD_BIT_OFFSET holds an integer number of bits offset for
+ the location. DECL_VOFFSET holds an expression for a variable
+ offset; it is to be multiplied by DECL_VOFFSET_UNIT (an integer).
These fields are relevant only in FIELD_DECLs and PARM_DECLs.
DECL_INITIAL holds the value to initialize a variable to,
@@ -346,6 +347,10 @@ DEFTREECODE (FIELD_DECL, "field_decl", 'd', 0)
/* A namespace declaration. Namespaces appear in DECL_CONTEXT of other
_DECLs, providing a hierarchy of names. */
DEFTREECODE (NAMESPACE_DECL, "namespace_decl", 'd', 0)
+
+/* A translation unit. This is not technically a declaration, since it
+ can't be looked up, but it's close enough. */
+DEFTREECODE (TRANSLATION_UNIT_DECL, "translation_unit_decl", 'd', 0)
/* References to storage. */
diff --git a/gcc/tree.h b/gcc/tree.h
index abb3c608ebb..803004cb90c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1253,12 +1253,13 @@ struct tree_type GTY(())
the name from decl_attributes to make_function_rtl and make_decl_rtl. */
#define DECL_SECTION_NAME(NODE) (DECL_CHECK (NODE)->decl.section_name)
-/* For FIELD_DECLs, this is the
- RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE node that the field is
- a member of. For VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
- and CONST_DECL nodes, this points to either the FUNCTION_DECL for the
- containing function, the RECORD_TYPE or UNION_TYPE for the containing
- type, or NULL_TREE if the given decl has "file scope". */
+/* For FIELD_DECLs, this is the RECORD_TYPE, UNION_TYPE, or
+ QUAL_UNION_TYPE node that the field is a member of. For VAR_DECL,
+ PARM_DECL, FUNCTION_DECL, LABEL_DECL, and CONST_DECL nodes, this
+ points to either the FUNCTION_DECL for the containing function,
+ the RECORD_TYPE or UNION_TYPE for the containing type, or
+ NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file
+ scope". */
#define DECL_CONTEXT(NODE) (DECL_CHECK (NODE)->decl.context)
#define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl.context)
/* In a DECL this is the field where attributes are stored. */
@@ -1287,6 +1288,7 @@ struct tree_type GTY(())
/* In PARM_DECL, holds the type as written (perhaps a function or array). */
#define DECL_ARG_TYPE_AS_WRITTEN(NODE) (PARM_DECL_CHECK (NODE)->decl.result)
/* For a FUNCTION_DECL, holds the tree of BINDINGs.
+ For a TRANSLATION_UNIT_DECL, holds the namespace's BLOCK.
For a VAR_DECL, holds the initial value.
For a PARM_DECL, not used--default
values for parameters are encoded in the type of the function,