summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-07-18 16:38:59 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-07-18 16:38:59 +0000
commit6cd1705862866b49116ca4c1e1c724064c1a0dbe (patch)
tree0d30a4844b89bff3fb6d4af2931b6b91793144b1 /gnu
parent3ea7d6f69d05ad249133b00a14f4e681262ce71c (diff)
Update to 990629 snapshot
closer to gcc 2.95 release.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/egcs/ChangeLog49
-rw-r--r--gnu/egcs/Makefile.in39
-rw-r--r--gnu/egcs/configure.in6
-rw-r--r--gnu/egcs/contrib/ChangeLog12
-rw-r--r--gnu/egcs/contrib/test_summary12
-rw-r--r--gnu/egcs/gcc/acconfig.h3
-rw-r--r--gnu/egcs/gcc/c-pragma.c24
-rw-r--r--gnu/egcs/gcc/config.in3
-rw-r--r--gnu/egcs/gcc/config/alpha/alpha.h11
-rw-r--r--gnu/egcs/gcc/config/alpha/elf.h6
-rw-r--r--gnu/egcs/gcc/config/alpha/vms.h4
-rw-r--r--gnu/egcs/gcc/config/arm/arm.c49
-rw-r--r--gnu/egcs/gcc/config/arm/arm.h5
-rw-r--r--gnu/egcs/gcc/config/c4x/c4x.c52
-rw-r--r--gnu/egcs/gcc/config/c4x/c4x.h33
-rw-r--r--gnu/egcs/gcc/config/c4x/c4x.md3
-rw-r--r--gnu/egcs/gcc/config/i386/cygwin.h27
-rw-r--r--gnu/egcs/gcc/config/i386/djgpp.h10
-rw-r--r--gnu/egcs/gcc/config/i386/freebsd-elf.h54
-rw-r--r--gnu/egcs/gcc/config/i386/uwin.h2
-rw-r--r--gnu/egcs/gcc/config/i386/winnt.c32
-rw-r--r--gnu/egcs/gcc/config/i386/xm-djgpp.h2
-rw-r--r--gnu/egcs/gcc/config/mips/mips.md24
-rw-r--r--gnu/egcs/gcc/config/rs6000/rs6000.md117
-rw-r--r--gnu/egcs/gcc/config/sparc/pbd.h30
-rw-r--r--gnu/egcs/gcc/config/sparc/sun4o3.h8
-rw-r--r--gnu/egcs/gcc/config/sparc/sysv4.h27
-rw-r--r--gnu/egcs/gcc/config/svr4.h3
-rw-r--r--gnu/egcs/gcc/cp/ChangeLog67
-rw-r--r--gnu/egcs/gcc/cp/NEWS32
-rw-r--r--gnu/egcs/gcc/cp/class.c12
-rw-r--r--gnu/egcs/gcc/cp/init.c160
-rw-r--r--gnu/egcs/gcc/cp/method.c37
-rw-r--r--gnu/egcs/gcc/cp/search.c4
-rw-r--r--gnu/egcs/gcc/cp/semantics.c7
-rw-r--r--gnu/egcs/gcc/dwarfout.c63
-rw-r--r--gnu/egcs/gcc/expmed.c4
-rw-r--r--gnu/egcs/gcc/f/BUGS10
-rw-r--r--gnu/egcs/gcc/f/ChangeLog19
-rw-r--r--gnu/egcs/gcc/f/NEWS71
-rw-r--r--gnu/egcs/gcc/f/bugs.texi13
-rw-r--r--gnu/egcs/gcc/f/com.c5
-rw-r--r--gnu/egcs/gcc/f/g77.texi6
-rw-r--r--gnu/egcs/gcc/f/news.texi9
-rw-r--r--gnu/egcs/gcc/f/version.c2
-rw-r--r--gnu/egcs/gcc/final.c4
-rw-r--r--gnu/egcs/gcc/fixinc/Makefile.in2
-rw-r--r--gnu/egcs/gcc/fixinc/fixinc.svr42
-rw-r--r--gnu/egcs/gcc/fixinc/fixinc.winnt2
-rw-r--r--gnu/egcs/gcc/fixinc/fixincl.sh4
-rw-r--r--gnu/egcs/gcc/fixinc/fixincl.x290
-rw-r--r--gnu/egcs/gcc/fixinc/inclhack.def72
-rw-r--r--gnu/egcs/gcc/fixinc/inclhack.sh221
-rw-r--r--gnu/egcs/gcc/fixinc/inclhack.tpl2
-rw-r--r--gnu/egcs/gcc/fixincludes3
-rw-r--r--gnu/egcs/gcc/haifa-sched.c7
-rw-r--r--gnu/egcs/gcc/java/ChangeLog83
-rw-r--r--gnu/egcs/gcc/java/Make-lang.in8
-rw-r--r--gnu/egcs/gcc/java/except.c9
-rw-r--r--gnu/egcs/gcc/java/jvspec.c2
-rw-r--r--gnu/egcs/gcc/java/parse.c1420
-rw-r--r--gnu/egcs/gcc/java/parse.y177
-rw-r--r--gnu/egcs/gcc/libgcc2.c21
-rw-r--r--gnu/egcs/gcc/real.c8
-rw-r--r--gnu/egcs/gcc/reg-stack.c2
-rw-r--r--gnu/egcs/gcc/system.h7
-rw-r--r--gnu/egcs/gcc/varasm.c2
-rw-r--r--gnu/egcs/ltconfig1825
-rw-r--r--gnu/egcs/ltmain.sh2949
69 files changed, 5650 insertions, 2640 deletions
diff --git a/gnu/egcs/ChangeLog b/gnu/egcs/ChangeLog
index 923c715195c..39e0be0c64d 100644
--- a/gnu/egcs/ChangeLog
+++ b/gnu/egcs/ChangeLog
@@ -1,3 +1,48 @@
+Tue Jun 22 23:39:29 1999 Tom Tromey <tromey@cygnus.com>
+
+ * configure.in (target_libs): Added target-zlib.
+ * Makefile.in (ALL_TARGET_MODULES): Added zlib.
+ (CONFIGURE_TARGET_MODULES): Likewise.
+ (CHECK_TARGET_MODULES): Likewise.
+ (INSTALL_TARGET_MODULES): Likewise.
+ (CLEAN_TARGET_MODULES): Likewise.
+ (configure-target-zlib): New target.
+ (all-target-zlib): Likewise.
+ (all-target-libjava): Depend on all-target-zlib.
+ (configure-target-libjava): Depend on configure-target-zlib.
+
+ * Makefile.in (configure-target-libjava): Depend on
+ configure-target-newlib.
+ (configure-target-boehm-gc): New target.
+ (configure-target-qthreads): New target.
+
+ * configure.in (host_tools): Added zip.
+ * Makefile.in (all-target-libjava): Depend on all-zip.
+ (all-zip): New target.
+ (ALL_MODULES): Added all-zip.
+ (NATIVE_CHECK_MODULES): Added check-zip.
+ (INSTALL_MODULES): Added install-zip.
+ (CLEAN_MODULES): Added clean-zip.
+
+ * configure.in (target_libs): Added target-qthreads.
+ * Makefile.in (ALL_TARGET_MODULES): Added qthreads.
+ (CONFIGURE_TARGET_MODULES): Likewise.
+ (CHECK_TARGET_MODULES): Likewise.
+ (INSTALL_TARGET_MODULES): Likewise.
+ (CLEAN_TARGET_MODULES): Likewise.
+ (all-target-qthreads): New target.
+ (configure-target-libjava): Depend on configure-target-qthreads.
+ (all-target-libjava): Depend on all-target-qthreads.
+
+ * Makefile.in (ALL_TARGET_MODULES): Added libjava, boehm-gc.
+ (CONFIGURE_TARGET_MODULES): Likewise.
+ (CHECK_TARGET_MODULES): Likewise.
+ (INSTALL_TARGET_MODULES): Likewise.
+ (CLEAN_TARGET_MODULES): Likewise.
+ (all-target-libjava): New target.
+ (all-target-boehm-gc): Likewise.
+ * configure.in (target_libs): Added libjava, boehm-gc.
+
Sun May 30 16:03:16 1999 Cort Dougan <cort@cs.nmt.edu>
* config.guess (ppc-*-linux-gnu): Also use ld emul elf32ppclinux.
@@ -6,6 +51,10 @@ Thu May 20 10:00:42 1999 Stephen L Moshier <moshier@world.std.com>
* Makefile.in (GCC_FOR_TARGET): Add -I$(build_tooldir)/include.
+1999-04-23 Tom Tromey <tromey@cygnus.com>
+
+ * ltconfig, ltmain.sh: Update to libtool 1.2f.
+
Tue Apr 13 22:50:54 1999 Donn Terry (donn@interix.com)
Martin Heller (Ing.-Buero_Heller@t-online.de)
diff --git a/gnu/egcs/Makefile.in b/gnu/egcs/Makefile.in
index 65676eabc37..7af178465b9 100644
--- a/gnu/egcs/Makefile.in
+++ b/gnu/egcs/Makefile.in
@@ -567,6 +567,7 @@ ALL_MODULES = \
all-time \
all-uudecode \
all-wdiff \
+ all-zip \
$(EXTRA_TARGET_HOST_ALL_MODULES)
# This is a list of the check targets for all of the modules which are
@@ -578,7 +579,8 @@ ALL_MODULES = \
NATIVE_CHECK_MODULES = \
check-bison \
check-byacc \
- check-flex
+ check-flex \
+ check-zip
CROSS_CHECK_MODULES = \
check-apache \
@@ -710,6 +712,7 @@ INSTALL_MODULES = \
install-time \
install-uudecode \
install-wdiff \
+ install-zip \
$(EXTRA_TARGET_HOST_INSTALL_MODULES)
# This is a list of the targets for all of the modules which are compiled
@@ -767,6 +770,10 @@ ALL_TARGET_MODULES = \
all-target-gperf \
all-target-examples \
all-target-libstub \
+ all-target-libjava \
+ all-target-zlib \
+ all-target-boehm-gc \
+ all-target-qthreads \
all-target-cygmon
# This is a list of the configure targets for all of the modules which
@@ -786,6 +793,10 @@ CONFIGURE_TARGET_MODULES = \
configure-target-gperf \
configure-target-examples \
configure-target-libstub \
+ configure-target-libjava \
+ configure-target-zlib \
+ configure-target-boehm-gc \
+ configure-target-qthreads \
configure-target-cygmon
# This is a list of the check targets for all of the modules which are
@@ -800,6 +811,10 @@ CHECK_TARGET_MODULES = \
check-target-libobjc \
check-target-winsup \
check-target-libiberty \
+ check-target-libjava \
+ check-target-zlib \
+ check-target-boehm-gc \
+ check-target-qthreads \
check-target-gperf
# This is a list of the install targets for all of the modules which are
@@ -815,6 +830,11 @@ INSTALL_TARGET_MODULES = \
install-target-winsup \
install-target-libgloss \
install-target-libiberty \
+ install-target-bsp \
+ install-target-libjava \
+ install-target-zlib \
+ install-target-boehm-gc \
+ install-target-qthreads \
install-target-gperf
# This is a list of the targets for which we can do a clean-{target}.
@@ -880,7 +900,9 @@ CLEAN_MODULES = \
clean-tgas \
clean-time \
clean-uudecode \
- clean-wdiff
+ clean-wdiff \
+ clean-zip
+
# All of the target modules that can be cleaned
CLEAN_TARGET_MODULES = \
@@ -898,6 +920,10 @@ CLEAN_TARGET_MODULES = \
clean-target-gperf \
clean-target-examples \
clean-target-libstub \
+ clean-target-libjava \
+ clean-target-zlib \
+ clean-target-boehm-gc \
+ clean-target-qthreads \
clean-target-cygmon
# All of the x11 modules that can be cleaned
@@ -1535,6 +1561,8 @@ all-bash:
all-bfd: all-libiberty all-intl
all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
all-bison: all-texinfo
+configure-target-boehm-gc: configure-target-newlib configure-target-qthreads
+all-target-boehm-gc: configure-target-boehm-gc
all-byacc:
all-bzip2:
all-cvssrc:
@@ -1587,6 +1615,8 @@ all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libib
check-target-libio: all-target-libstdc++
all-libgui: all-tcl all-tk all-itcl
all-libiberty:
+configure-target-libjava: $(ALL_GCC) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-newlib
+all-target-libjava: configure-target-libjava all-gcc all-zip all-target-newlib all-target-zlib all-target-boehm-gc all-target-qthreads
configure-target-librx: $(ALL_GCC) configure-target-newlib
all-target-librx: configure-target-librx
configure-target-libstdc++: $(ALL_GCC)
@@ -1606,6 +1636,8 @@ all-opcodes: all-bfd all-libiberty
all-patch: all-libiberty
all-perl:
all-prms: all-libiberty
+configure-target-qthreads: configure-target-newlib
+all-target-qthreads: configure-target-qthreads
all-rcs:
all-readline:
all-recode: all-libiberty
@@ -1627,6 +1659,9 @@ all-wdiff:
all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
configure-target-winsup: configure-target-newlib
all-uudecode: all-libiberty
+all-zip:
+configure-target-zlib: $(ALL_GCC)
+all-target-zlib: configure-target-zlib
configure-target-libiberty: $(ALL_GCC)
all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
all-target: $(ALL_TARGET_MODULES)
diff --git a/gnu/egcs/configure.in b/gnu/egcs/configure.in
index d0e7166d51a..7265f49a87f 100644
--- a/gnu/egcs/configure.in
+++ b/gnu/egcs/configure.in
@@ -50,7 +50,7 @@ fi
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
# know that we are building the simulator.
-host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext"
+host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
# these libraries are built for the target environment, and are built after
@@ -65,6 +65,10 @@ target_libs="target-libiberty \
target-libg++ \
target-libf2c \
target-libchill \
+ target-libjava \
+ target-zlib \
+ target-boehm-gc \
+ target-qthreads \
target-libobjc"
# these tools are built using the target libs, and are intended to run only
diff --git a/gnu/egcs/contrib/ChangeLog b/gnu/egcs/contrib/ChangeLog
index 99420bc04a8..90ba2b68c72 100644
--- a/gnu/egcs/contrib/ChangeLog
+++ b/gnu/egcs/contrib/ChangeLog
@@ -1,3 +1,15 @@
+1999-06-12 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * test_summary: Set default mail-address and version for egcs
+ instead of relying on unpredictable pathnames.
+ Reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+1999-06-12 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * test_summary: Set default mail-address and version for egcs
+ instead of relying on unpredictable pathnames.
+ Reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
Fri Apr 2 16:09:02 1999 Jeffrey A Law (law@cygnus.com)
* fixinc/*: Delete obsolete files.
diff --git a/gnu/egcs/contrib/test_summary b/gnu/egcs/contrib/test_summary
index fd76292682f..db1a8b62214 100644
--- a/gnu/egcs/contrib/test_summary
+++ b/gnu/egcs/contrib/test_summary
@@ -85,6 +85,8 @@ if $forcemail || $anychange; then :; else mailto=nobody; fi &&
$AWK '
BEGIN {
lang="";
+ address="egcs-testresults@egcs.cygnus.com";
+ version="egcs";
print "cat <<\EOF |";
'${prepend_logs+" system(\"cat $prepend_logs\"); "}'
}
@@ -95,16 +97,6 @@ $1 ~ /\/configure$/ { $1 = "configure flags:"; configflags = $0 }
/^[ ]*=== [^ ]+ tests ===/ {
if (lang == "") lang = " "$2" "; else lang = " ";
}
-/\/ss(\/|c? )/ {
- program="ss";
- if (lang == " ") address="nobody";
- else if (lang == " gcc ") address="gcc2@cygnus.com";
- else address="g++@cygnus.com";
-}
-/\/egcsh?((-[^ ]*)?\/|c?[ -])/ {
- address="egcs-testresults@egcs.cygnus.com";
- if (version == 0) version="egcs";
-}
/--disable-haifa/ { prefix="haifa-disabled "; }
/--enable-haifa/ { prefix="haifa-enabled "; }
$2 == "version" { save = $0; $1 = ""; $2 = ""; version = $0; gsub(/^ */, "", version); gsub(/\r$/, "", version); $0 = save; }
diff --git a/gnu/egcs/gcc/acconfig.h b/gnu/egcs/gcc/acconfig.h
index 68bee4f7cbd..d702b0e0222 100644
--- a/gnu/egcs/gcc/acconfig.h
+++ b/gnu/egcs/gcc/acconfig.h
@@ -93,6 +93,9 @@
/* Whether strsignal must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSIGNAL
+/* Whether strstr must be declared even if <string.h> is included. */
+#undef NEED_DECLARATION_STRSTR
+
/* Whether getcwd must be declared even if <unistd.h> is included. */
#undef NEED_DECLARATION_GETCWD
diff --git a/gnu/egcs/gcc/c-pragma.c b/gnu/egcs/gcc/c-pragma.c
index eedd0a13f0d..5aa8d9f2870 100644
--- a/gnu/egcs/gcc/c-pragma.c
+++ b/gnu/egcs/gcc/c-pragma.c
@@ -141,7 +141,7 @@ pop_alignment (id)
{
entry = alignment_stack->prev;
- if (entry == NULL || entry->alignment > 4)
+ if (entry == NULL)
maximum_field_alignment = 0;
else
maximum_field_alignment = entry->alignment * 8;
@@ -163,6 +163,7 @@ insert_pack_attributes (node, attributes, prefix)
tree * prefix;
{
tree a;
+ int field_alignment;
/* If we are not packing, then there is nothing to do. */
if (maximum_field_alignment == 0
@@ -173,12 +174,16 @@ insert_pack_attributes (node, attributes, prefix)
if (TREE_CODE_CLASS (TREE_CODE (node)) != 'd'
|| TREE_CODE (node) != FIELD_DECL)
return;
+
+ field_alignment = TYPE_ALIGN (TREE_TYPE (node));
+ if (field_alignment <= 0 || field_alignment > maximum_field_alignment)
+ field_alignment = maximum_field_alignment;
/* Add a 'packed' attribute. */
* attributes = tree_cons (get_identifier ("packed"), NULL, * attributes);
/* If the alignment is > 8 then add an alignment attribute as well. */
- if (maximum_field_alignment > 8)
+ if (field_alignment > 8)
{
/* If the aligned attribute is already present then do not override it. */
for (a = * attributes; a; a = TREE_CHAIN (a))
@@ -201,7 +206,7 @@ insert_pack_attributes (node, attributes, prefix)
* attributes = tree_cons
(get_identifier ("aligned"),
tree_cons (NULL,
- build_int_2 (maximum_field_alignment / 8, 0),
+ build_int_2 (field_alignment / 8, 0),
NULL),
* attributes);
}
@@ -383,8 +388,17 @@ handle_pragma_token (string, token)
case ps_left:
if (token == NULL_TREE)
- state = (strcmp (string, ")") ? ps_bad : ps_right);
-
+ {
+ /* #pragma pack () resets packing rules to their
+ defaults. */
+ if (strcmp (string, ")") == 0)
+ {
+ align = 0;
+ state = ps_right;
+ }
+ else
+ state = ps_bad;
+ }
else if (TREE_CODE (token) == INTEGER_CST)
goto handle_align;
diff --git a/gnu/egcs/gcc/config.in b/gnu/egcs/gcc/config.in
index 0b14498ec93..c804a2b682e 100644
--- a/gnu/egcs/gcc/config.in
+++ b/gnu/egcs/gcc/config.in
@@ -94,6 +94,9 @@
/* Whether strsignal must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSIGNAL
+/* Whether strstr must be declared even if <string.h> is included. */
+#undef NEED_DECLARATION_STRSTR
+
/* Whether getcwd must be declared even if <unistd.h> is included. */
#undef NEED_DECLARATION_GETCWD
diff --git a/gnu/egcs/gcc/config/alpha/alpha.h b/gnu/egcs/gcc/config/alpha/alpha.h
index 85711182a52..e9c3f6d2f68 100644
--- a/gnu/egcs/gcc/config/alpha/alpha.h
+++ b/gnu/egcs/gcc/config/alpha/alpha.h
@@ -157,14 +157,14 @@ extern enum alpha_fp_trap_mode alpha_fptm;
/* This means that the processor is an EV5, EV56, or PCA56. This is defined
only in TARGET_CPU_DEFAULT. */
-#define MASK_CPU_EV5 (1 << 29)
+#define MASK_CPU_EV5 (1 << 28)
/* Likewise for EV6. */
-#define MASK_CPU_EV6 (1 << 30)
+#define MASK_CPU_EV6 (1 << 29)
/* This means we support the .arch directive in the assembler. Only
defined in TARGET_CPU_DEFAULT. */
-#define MASK_SUPPORT_ARCH (1 << 31)
+#define MASK_SUPPORT_ARCH (1 << 30)
#define TARGET_SUPPORT_ARCH (target_flags & MASK_SUPPORT_ARCH)
/* These are for target os support and cannot be changed at runtime. */
@@ -2145,6 +2145,11 @@ literal_section () \
} \
while (0)
+/* To get unaligned data, we have to turn off auto alignment. */
+#define UNALIGNED_SHORT_ASM_OP ".align 0\n\t.word"
+#define UNALIGNED_INT_ASM_OP ".align 0\n\t.long"
+#define UNALIGNED_DOUBLE_INT_ASM_OP ".align 0\n\t.quad"
+
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
diff --git a/gnu/egcs/gcc/config/alpha/elf.h b/gnu/egcs/gcc/config/alpha/elf.h
index 0e647ef534c..6cea3da5d5b 100644
--- a/gnu/egcs/gcc/config/alpha/elf.h
+++ b/gnu/egcs/gcc/config/alpha/elf.h
@@ -526,3 +526,9 @@ do { \
/* We support #pragma. */
#define HANDLE_SYSV_PRAGMA
+
+/* Undo the auto-alignment stuff from alpha.h. ELF has unaligned data
+ pseudos natively. */
+#undef UNALIGNED_SHORT_ASM_OP
+#undef UNALIGNED_INT_ASM_OP
+#undef UNALIGNED_DOUBLE_INT_ASM_OP
diff --git a/gnu/egcs/gcc/config/alpha/vms.h b/gnu/egcs/gcc/config/alpha/vms.h
index 44cf5bf82df..44388b2cf33 100644
--- a/gnu/egcs/gcc/config/alpha/vms.h
+++ b/gnu/egcs/gcc/config/alpha/vms.h
@@ -439,10 +439,6 @@ extern int vms_valid_decl_attribute_p ();
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
fprintf (FILE, "\t.align %d\n", LOG);
-#define UNALIGNED_SHORT_ASM_OP ".word"
-#define UNALIGNED_INT_ASM_OP ".long"
-#define UNALIGNED_DOUBLE_INT_ASM_OP ".quad"
-
#define ASM_OUTPUT_SECTION(FILE,SECTION) \
(strcmp (SECTION, ".text") == 0) \
? text_section () \
diff --git a/gnu/egcs/gcc/config/arm/arm.c b/gnu/egcs/gcc/config/arm/arm.c
index 1ba5edd2e1b..553e25c7b76 100644
--- a/gnu/egcs/gcc/config/arm/arm.c
+++ b/gnu/egcs/gcc/config/arm/arm.c
@@ -486,13 +486,6 @@ arm_override_options ()
if (flag_pic && ! TARGET_APCS_STACK)
arm_pic_register = 10;
- /* Well, I'm about to have a go, but pic is NOT going to be compatible
- with APCS reentrancy, since that requires too much support in the
- assembler and linker, and the ARMASM assembler seems to lack some
- required directives. */
- if (flag_pic)
- warning ("Position independent code not supported");
-
if (TARGET_APCS_FLOAT)
warning ("Passing floating point arguments in fp regs not yet supported");
@@ -583,9 +576,14 @@ use_return_insn (iscond)
return 0;
if ((iscond && arm_is_strong)
|| TARGET_THUMB_INTERWORK)
- for (regno = 0; regno < 16; regno++)
- if (regs_ever_live[regno] && ! call_used_regs[regno])
+ {
+ for (regno = 0; regno < 16; regno++)
+ if (regs_ever_live[regno] && ! call_used_regs[regno])
+ return 0;
+
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
return 0;
+ }
/* Can't be done if any of the FPU regs are pushed, since this also
requires an insn */
@@ -3704,7 +3702,7 @@ arm_reload_in_hi (operands)
gen_rtx_MEM (QImode,
plus_constant (base,
offset + 1))));
- if (BYTES_BIG_ENDIAN)
+ if (! BYTES_BIG_ENDIAN)
emit_insn (gen_rtx_SET (VOIDmode, gen_rtx_SUBREG (SImode, operands[0], 0),
gen_rtx_IOR (SImode,
gen_rtx_ASHIFT
@@ -5319,6 +5317,9 @@ output_return_instruction (operand, really_return, reverse)
if (regs_ever_live[reg] && ! call_used_regs[reg])
live_regs++;
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ live_regs++;
+
if (live_regs || (regs_ever_live[14] && ! lr_save_eliminated))
live_regs++;
@@ -5338,7 +5339,9 @@ output_return_instruction (operand, really_return, reverse)
reverse ? "ldm%?%D0fd\t%|sp!, {" : "ldm%?%d0fd\t%|sp!, {");
for (reg = 0; reg <= 10; reg++)
- if (regs_ever_live[reg] && ! call_used_regs[reg])
+ if (regs_ever_live[reg]
+ && (! call_used_regs[reg]
+ || (flag_pic && reg == PIC_OFFSET_TABLE_REGNUM)))
{
strcat (instr, "%|");
strcat (instr, reg_names[reg]);
@@ -5498,6 +5501,9 @@ output_func_prologue (f, frame_size)
if (regs_ever_live[reg] && ! call_used_regs[reg])
live_regs_mask |= (1 << reg);
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ live_regs_mask |= (1 << PIC_OFFSET_TABLE_REGNUM);
+
if (frame_pointer_needed)
live_regs_mask |= 0xD800;
else if (regs_ever_live[14])
@@ -5574,6 +5580,12 @@ output_func_epilogue (f, frame_size)
floats_offset += 4;
}
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ {
+ live_regs_mask |= (1 << PIC_OFFSET_TABLE_REGNUM);
+ floats_offset += 4;
+ }
+
if (frame_pointer_needed)
{
if (arm_fpu_arch == FP_SOFT2)
@@ -5834,12 +5846,17 @@ arm_expand_prologue ()
store_arg_regs = 1;
if (! volatile_func)
- for (reg = 0; reg <= 10; reg++)
- if (regs_ever_live[reg] && ! call_used_regs[reg])
- live_regs_mask |= 1 << reg;
+ {
+ for (reg = 0; reg <= 10; reg++)
+ if (regs_ever_live[reg] && ! call_used_regs[reg])
+ live_regs_mask |= 1 << reg;
- if (! volatile_func && regs_ever_live[14])
- live_regs_mask |= 0x4000;
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ live_regs_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
+
+ if (regs_ever_live[14])
+ live_regs_mask |= 0x4000;
+ }
if (frame_pointer_needed)
{
diff --git a/gnu/egcs/gcc/config/arm/arm.h b/gnu/egcs/gcc/config/arm/arm.h
index 7b5cd490376..3c133a01b0e 100644
--- a/gnu/egcs/gcc/config/arm/arm.h
+++ b/gnu/egcs/gcc/config/arm/arm.h
@@ -726,7 +726,7 @@ extern const char * structure_size_string;
if (flag_pic) \
{ \
fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 0; \
+ call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
} \
else if (TARGET_APCS_STACK) \
{ \
@@ -1263,6 +1263,9 @@ do { \
for (regno = 0; regno <= 10; regno++) \
if (regs_ever_live[regno] && ! call_used_regs[regno]) \
saved_hard_reg = 1, offset += 4; \
+ /* PIC register is a fixed reg, so call_used_regs set. */ \
+ if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) \
+ saved_hard_reg = 1, offset += 4; \
for (regno = 16; regno <=23; regno++) \
if (regs_ever_live[regno] && ! call_used_regs[regno]) \
offset += 12; \
diff --git a/gnu/egcs/gcc/config/c4x/c4x.c b/gnu/egcs/gcc/config/c4x/c4x.c
index 5c5690a4eaf..23f8bfa093f 100644
--- a/gnu/egcs/gcc/config/c4x/c4x.c
+++ b/gnu/egcs/gcc/config/c4x/c4x.c
@@ -1077,7 +1077,8 @@ c4x_emit_move_sequence (operands, mode)
and emit associated (HIGH (SYMREF)) if large memory model.
c4x_legitimize_address could be used to do this,
perhaps by calling validize_address. */
- if (! (reload_in_progress || reload_completed)
+ if (TARGET_EXPOSE_LDP
+ && ! (reload_in_progress || reload_completed)
&& GET_CODE (op1) == MEM
&& symbolic_address_operand (XEXP (op1, 0), Pmode))
{
@@ -1088,7 +1089,8 @@ c4x_emit_move_sequence (operands, mode)
gen_rtx_LO_SUM (Pmode, dp_reg, XEXP (op1, 0)));
}
- if (! (reload_in_progress || reload_completed)
+ if (TARGET_EXPOSE_LDP
+ && ! (reload_in_progress || reload_completed)
&& GET_CODE (op0) == MEM
&& symbolic_address_operand (XEXP (op0, 0), Pmode))
{
@@ -1409,12 +1411,14 @@ c4x_check_legit_addr (mode, addr, strict)
/* Direct addressing. */
case LABEL_REF:
case SYMBOL_REF:
+ if (! TARGET_EXPOSE_LDP && ! strict && mode != HFmode && mode != HImode)
+ return 1;
/* These need to be converted to a LO_SUM (...).
- c4x_legitimize_address will fix them up. */
+ LEGITIMIZE_RELOAD_ADDRESS will do this during reload. */
return 0;
/* Do not allow direct memory access to absolute addresses.
- This is more pain than its worth, especially for the
+ This is more pain than it's worth, especially for the
small memory model where we can't guarantee that
this address is within the data page---we don't want
to modify the DP register in the small memory model,
@@ -1515,6 +1519,32 @@ c4x_legitimize_address (orig, mode)
}
+rtx
+c4x_legitimize_reload_address (orig, mode, insn)
+ rtx orig ATTRIBUTE_UNUSED;
+ enum machine_mode mode;
+ rtx insn;
+{
+ if (mode != HImode
+ && mode != HFmode
+ && GET_MODE (orig) != HImode
+ && GET_MODE (orig) != HFmode
+ && (GET_CODE (orig) == CONST
+ || GET_CODE (orig) == SYMBOL_REF
+ || GET_CODE (orig) == LABEL_REF))
+ {
+ rtx dp_reg = gen_rtx_REG (Pmode, DP_REGNO);
+ if (! TARGET_SMALL)
+ emit_insn_before (gen_rtx_SET (VOIDmode, dp_reg,
+ gen_rtx_HIGH (Pmode, orig)),
+ insn);
+ return gen_rtx_LO_SUM (Pmode, dp_reg, orig);
+ }
+
+ return NULL_RTX;
+}
+
+
/* Provide the costs of an addressing mode that contains ADDR.
If ADDR is not a valid address, its cost is irrelevant.
This is used in cse and loop optimisation to determine
@@ -3002,20 +3032,24 @@ src_operand (op, mode)
if (GET_CODE (op) == CONST_DOUBLE)
return c4x_H_constant (op);
- /* Disallow symbolic addresses. */
+ /* Disallow symbolic addresses. Only the predicate
+ symbolic_address_operand will match these. */
if (GET_CODE (op) == SYMBOL_REF
|| GET_CODE (op) == LABEL_REF
|| GET_CODE (op) == CONST)
return 0;
- /* Disallow direct memory access symbolic addresses.
- These are usually caught by the movqi expander and
- converted to a LO_SUM. */
+ /* If TARGET_EXPOSE_LDP is zero, allow direct memory access to
+ symbolic addresses. These will be rejected by
+ GO_IF_LEGITIMATE_ADDRESS and fixed up by
+ LEGITIMIZE_RELOAD_ADDRESS. If TARGET_EXPOSE_LDP is nonzero,
+ disallow direct memory access to symbolic addresses. These
+ should be converted to a HIGH/LO_SUM pair by the movqi expander. */
if (GET_CODE (op) == MEM
&& ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
|| GET_CODE (XEXP (op, 0)) == LABEL_REF
|| GET_CODE (XEXP (op, 0)) == CONST)))
- return 0;
+ return ! TARGET_EXPOSE_LDP;
return general_operand (op, mode);
}
diff --git a/gnu/egcs/gcc/config/c4x/c4x.h b/gnu/egcs/gcc/config/c4x/c4x.h
index 1dc8d5c63ed..7ef0738f008 100644
--- a/gnu/egcs/gcc/config/c4x/c4x.h
+++ b/gnu/egcs/gcc/config/c4x/c4x.h
@@ -303,7 +303,9 @@ extern int target_flags;
#define TARGET_C40 (target_flags & C40_FLAG)
#define TARGET_C44 (target_flags & C44_FLAG)
+/* Define some options to control code generation. */
#define TARGET_LOAD_ADDRESS (1 || (! TARGET_C3X && ! TARGET_SMALL))
+#define TARGET_EXPOSE_LDP 0
/* -mrpts allows the use of the RPTS instruction irregardless.
-mrpts=max-cycles will use RPTS if the number of cycles is constant
@@ -1664,6 +1666,20 @@ extern struct rtx_def *c4x_legitimize_address ();
} \
}
+extern struct rtx_def *c4x_legitimize_reload_address ();
+#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \
+{ \
+ rtx new; \
+ new = c4x_legitimize_reload_address (X, MODE, insn); \
+ if (new != NULL_RTX) \
+ { \
+ (X) = new; \
+ /* We do not have to call push_reload because we do not require \
+ any more reloads. */ \
+ goto WIN; \
+ } \
+}
+
/* No mode-dependent addresses on the C4x are autoincrements. */
@@ -1684,7 +1700,9 @@ extern struct rtx_def *c4x_legitimize_address ();
restricted subset of CONST_INT and CONST_DOUBLE. Disallow
LABEL_REF and SYMBOL_REF (except on the C40 with the big memory
model) so that the symbols will be forced into the constant pool.
- On second thoughts, lets do this with the move expanders.
+ On second thoughts, let's do this with the move expanders since
+ the alias analysis has trouble if we force constant addresses
+ into memory.
*/
#define LEGITIMATE_CONSTANT_P(X) \
@@ -2078,7 +2096,7 @@ dtors_section () \
fprintf (FILE, "\n"); \
}
-#define ASM_FILE_END(FILE) fprintf (FILE, "\t.end\n")
+#define ASM_FILE_END(FILE) fprintf (FILE, "\t.end\n")
/* We need to have a data section we can identify so that we can set
the DP register back to a data pointer in the small memory model.
@@ -2089,7 +2107,7 @@ dtors_section () \
if (! TARGET_TI) fputs ("gcc2_compiled.:\n", FILE); \
fputs ("\t.data\ndata_sec:\n", FILE);
-#define ASM_COMMENT_START ";"
+#define ASM_COMMENT_START ";"
#define ASM_APP_ON ""
#define ASM_APP_OFF ""
@@ -2248,8 +2266,10 @@ asm_fprintf (FILE, "%s%d:\n", PREFIX, NUM)
#define CPP_PREDEFINES ""
-/* This says how to output an assembler line
- to define a local common symbol. */
+/* Output of Uninitialized Variables */
+
+/* This says how to output an assembler line to define a local
+ uninitialized variable. */
#undef ASM_OUTPUT_LOCAL
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
@@ -2257,7 +2277,8 @@ asm_fprintf (FILE, "%s%d:\n", PREFIX, NUM)
assemble_name (FILE, (NAME)), \
fprintf (FILE, ",%u\n", (ROUNDED)))
-/* Output of Uninitialized Variables */
+/* This says how to output an assembler line to define a global
+ uninitialized variable. */
#undef ASM_OUTPUT_COMMON
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
diff --git a/gnu/egcs/gcc/config/c4x/c4x.md b/gnu/egcs/gcc/config/c4x/c4x.md
index a0a4e0b9dd9..7f1b0f309ab 100644
--- a/gnu/egcs/gcc/config/c4x/c4x.md
+++ b/gnu/egcs/gcc/config/c4x/c4x.md
@@ -68,6 +68,8 @@
; src_operand general operand [rfHmI]
; par_ind_operand indirect S mode (ARx + 0, 1, IRx) [S<>]
; parallel_operand par_ind_operand or ext_low_reg_operand
+; symbolic_address_operand
+; call_address_operand
; ADDI src2, src1, dst three operand op
; ADDI src, dst two operand op
@@ -1141,7 +1143,6 @@
operands[3] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) & 0xffff);
}")
-; This pattern is required to handle the case where a register that clobbers
; CC has been selected to load a symbolic address. We force the address
; into memory and then generate LDP and LDIU insns.
; This is also required for the C30 if we pretend that we can
diff --git a/gnu/egcs/gcc/config/i386/cygwin.h b/gnu/egcs/gcc/config/i386/cygwin.h
index 48b9eba1b1c..dbea466bc86 100644
--- a/gnu/egcs/gcc/config/i386/cygwin.h
+++ b/gnu/egcs/gcc/config/i386/cygwin.h
@@ -326,11 +326,7 @@ do { \
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
do { \
if (i386_pe_dllexport_name_p (NAME)) \
- { \
- drectve_section (); \
- fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \
- I386_PE_STRIP_ENCODING (NAME)); \
- } \
+ i386_pe_record_exported_symbol (NAME); \
if (! i386_pe_dllimport_name_p (NAME)) \
{ \
fprintf ((STREAM), "\t.comm\t"); \
@@ -345,13 +341,7 @@ do { \
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
do { \
if (i386_pe_dllexport_name_p (NAME)) \
- { \
- enum in_section save_section = in_section; \
- drectve_section (); \
- fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \
- I386_PE_STRIP_ENCODING (NAME)); \
- switch_to_section (save_section, (DECL)); \
- } \
+ i386_pe_record_exported_symbol (NAME); \
ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
} while (0)
@@ -447,12 +437,7 @@ do { \
do \
{ \
if (i386_pe_dllexport_name_p (NAME)) \
- { \
- drectve_section (); \
- fprintf ((FILE), "\t.ascii \" -export:%s\"\n", \
- I386_PE_STRIP_ENCODING (NAME)); \
- function_section (DECL); \
- } \
+ i386_pe_record_exported_symbol (NAME); \
if (write_symbols != SDB_DEBUG) \
i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \
ASM_OUTPUT_LABEL (FILE, NAME); \
@@ -518,6 +503,7 @@ do { \
extern void i386_pe_record_external_function PROTO((char *));
extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int));
+extern void i386_pe_record_exported_symbol PROTO((char *));
extern void i386_pe_asm_file_end STDIO_PROTO((FILE *));
/* For Win32 ABI compatibility */
@@ -532,3 +518,8 @@ extern void i386_pe_asm_file_end STDIO_PROTO((FILE *));
#undef PCC_BITFIELDS_TYPE_MATTERS
#define PCC_BITFIELDS_TYPE_MATTERS 0
+/* Enable alias attribute support. */
+#ifndef SET_ASM_OP
+#define SET_ASM_OP "\t.set"
+#endif
+
diff --git a/gnu/egcs/gcc/config/i386/djgpp.h b/gnu/egcs/gcc/config/i386/djgpp.h
index 6cee75bc837..5727b0a9bbd 100644
--- a/gnu/egcs/gcc/config/i386/djgpp.h
+++ b/gnu/egcs/gcc/config/i386/djgpp.h
@@ -70,7 +70,15 @@ Boston, MA 02111-1307, USA. */
\t%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\
\t-Tdjgpp.djl %{T*}}}}}}}\n\
%{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}"
-
+
+/* Always just link in 'libc.a'. */
+#undef LIB_SPEC
+#define LIB_SPEC "-lc"
+
+/* Pick the right startup code depending on the -pg flag. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:crt0.o%s}"
+
/* Make sure that gcc will not look for .h files in /usr/local/include
unless user explicitly requests it. */
#undef LOCAL_INCLUDE_DIR
diff --git a/gnu/egcs/gcc/config/i386/freebsd-elf.h b/gnu/egcs/gcc/config/i386/freebsd-elf.h
index c74ae992efc..e97d4ca07bb 100644
--- a/gnu/egcs/gcc/config/i386/freebsd-elf.h
+++ b/gnu/egcs/gcc/config/i386/freebsd-elf.h
@@ -135,23 +135,15 @@ Boston, MA 02111-1307, USA. */
: ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
: (-1))
-/* Output assembler code to FILE to increment profiler label # LABELNO
- for profiling a function entry. */
+/* Tell final.c that we don't need a label passed to mcount. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
if (flag_pic) \
- { \
- fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
- LPREFIX, (LABELNO)); \
- fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
- } \
+ fprintf (FILE, "\tcall *.mcount@GOT(%%ebx)\n"); \
else \
- { \
- fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
- fprintf (FILE, "\tcall mcount\n"); \
- } \
+ fprintf (FILE, "\tcall .mcount\n"); \
}
#undef SIZE_TYPE
@@ -210,22 +202,18 @@ Boston, MA 02111-1307, USA. */
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
+ libc, depending on whether we're doing profiling or need threads support.
+ (simular to the default, except no -lg, and no -p. */
-#undef LIB_SPEC
-#if 1
-/* We no longer link with libc_p.a or libg.a by default. If you
- * want to profile or debug the C library, please add
- * -lc_p or -ggdb to LDFLAGS at the link time, respectively.
- */
-#define LIB_SPEC \
- "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
- %{!ggdb:-lc} %{ggdb:-lg}}"
-#else
-#define LIB_SPEC \
- "%{!shared: \
- %{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
- %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
-#endif
+#undef LIB_SPEC
+#define LIB_SPEC "%{!shared: \
+ %{!pg:%{!pthread:%{!kthread:-lc} \
+ %{kthread:-lpthread -lc}} \
+ %{pthread:-lc_r}} \
+ %{pg:%{!pthread:%{!kthread:-lc_p} \
+ %{kthread:-lpthread_p -lc_p}} \
+ %{pthread:-lc_r_p}}}"
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
for the special GCC options -static and -shared, which allow us to
@@ -242,13 +230,17 @@ Boston, MA 02111-1307, USA. */
done. */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
- %{!shared: \
- %{!ibcs: \
+#define LINK_SPEC "-m elf_i386 \
+ %{Wl,*:%*} \
+ %{v:-V} \
+ %{assert*} %{R*} %{rpath*} %{defsym*} \
+ %{shared:-Bshareable %{h*} %{soname*}} \
+ %{!shared: \
%{!static: \
- %{rdynamic:-export-dynamic} \
+ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
- %{static:-Bstatic}}}"
+ %{static:-Bstatic}} \
+ %{symbolic:-Bsymbolic}"
/* A C statement to output to the stdio stream FILE an assembler
command to advance the location counter to a multiple of 1<<LOG
diff --git a/gnu/egcs/gcc/config/i386/uwin.h b/gnu/egcs/gcc/config/i386/uwin.h
index 0d5019d5b04..73e04add2e9 100644
--- a/gnu/egcs/gcc/config/i386/uwin.h
+++ b/gnu/egcs/gcc/config/i386/uwin.h
@@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
-include /usr/include/astwin32.h \
- -iprefix /usr/gnu/include -iwithprefix /mingw32"
+ -idirafter /usr/gnu/include/mingw32"
/* For Windows applications, include more libraries, but always include
kernel32. */
diff --git a/gnu/egcs/gcc/config/i386/winnt.c b/gnu/egcs/gcc/config/i386/winnt.c
index f1a2d4b83be..24d8617f8df 100644
--- a/gnu/egcs/gcc/config/i386/winnt.c
+++ b/gnu/egcs/gcc/config/i386/winnt.c
@@ -545,8 +545,29 @@ i386_pe_record_external_function (name)
extern_head = p;
}
+static struct extern_list *exports_head;
+
+/* Assemble an export symbol entry. We need to keep a list of
+ these, so that we can output the export list at the end of the
+ assembly. We used to output these export symbols in each function,
+ but that causes problems with GNU ld when the sections are
+ linkonce. */
+
+void
+i386_pe_record_exported_symbol (name)
+ char *name;
+{
+ struct extern_list *p;
+
+ p = (struct extern_list *) permalloc (sizeof *p);
+ p->next = exports_head;
+ p->name = name;
+ exports_head = p;
+}
+
/* This is called at the end of assembly. For each external function
- which has not been defined, we output a declaration now. */
+ which has not been defined, we output a declaration now. We also
+ output the .drectve section. */
void
i386_pe_asm_file_end (file)
@@ -567,4 +588,13 @@ i386_pe_asm_file_end (file)
i386_pe_declare_function_type (file, p->name, TREE_PUBLIC (decl));
}
}
+
+ if (exports_head)
+ drectve_section ();
+ for (p = exports_head; p != NULL; p = p->next)
+ {
+ fprintf (file, "\t.ascii \" -export:%s\"\n",
+ I386_PE_STRIP_ENCODING (p->name));
+ }
}
+
diff --git a/gnu/egcs/gcc/config/i386/xm-djgpp.h b/gnu/egcs/gcc/config/i386/xm-djgpp.h
index 50034fd071d..ccf6e3cedf6 100644
--- a/gnu/egcs/gcc/config/i386/xm-djgpp.h
+++ b/gnu/egcs/gcc/config/i386/xm-djgpp.h
@@ -34,8 +34,6 @@ Boston, MA 02111-1307, USA. */
/* Allow test for DOS drive names. */
#define HAVE_DOS_BASED_FILESYSTEM
-#define NO_SYS_SIGLIST 1
-
#define LIBSTDCXX "-lstdcxx"
/* System dependant initialization for collect2
diff --git a/gnu/egcs/gcc/config/mips/mips.md b/gnu/egcs/gcc/config/mips/mips.md
index 6dde18bf372..81c5cd38e38 100644
--- a/gnu/egcs/gcc/config/mips/mips.md
+++ b/gnu/egcs/gcc/config/mips/mips.md
@@ -10416,3 +10416,27 @@ move\\t%0,%z4\\n\\
[(set_attr "type" "branch")
(set_attr "mode" "none")
(set_attr "length" "2")])
+
+;; For the rare case where we need to load an address into a register
+;; that can not be recognized by the normal movsi/addsi instructions.
+;; I have no idea how many insns this can actually generate. It should
+;; be rare, so over-estimating as 10 instructions should not have any
+;; real performance impact.
+(define_insn "leasi"
+ [(set (match_operand:SI 0 "register_operand" "=d")
+ (match_operand:SI 1 "address_operand" "p"))]
+ "Pmode == SImode"
+ "la %0,%a1"
+ [(set_attr "type" "arith")
+ (set_attr "mode" "SI")
+ (set_attr "length" "10")])
+
+;; Similarly for targets where we have 64bit pointers.
+(define_insn "leadi"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (match_operand:DI 1 "address_operand" "p"))]
+ "Pmode == DImode"
+ "la %0,%a1"
+ [(set_attr "type" "arith")
+ (set_attr "mode" "DI")
+ (set_attr "length" "10")])
diff --git a/gnu/egcs/gcc/config/rs6000/rs6000.md b/gnu/egcs/gcc/config/rs6000/rs6000.md
index 34ccacf9c2d..c2749f8222f 100644
--- a/gnu/egcs/gcc/config/rs6000/rs6000.md
+++ b/gnu/egcs/gcc/config/rs6000/rs6000.md
@@ -4079,7 +4079,7 @@
(clobber (match_dup 4))
(clobber (match_dup 5))
(clobber (reg:DF 76))])]
- "TARGET_HARD_FLOAT"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
"
{
operands[2] = force_reg (SImode, GEN_INT (0x43300000));
@@ -4096,7 +4096,7 @@
(clobber (match_operand:SI 4 "gpc_reg_operand" "=r"))
(clobber (match_operand 5 "gpc_reg_operand" "=b"))
(clobber (reg:DF 76))]
- "TARGET_HARD_FLOAT"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
"#"
[(set_attr "length" "24")])
@@ -4108,7 +4108,7 @@
(clobber (match_operand:SI 4 "gpc_reg_operand" ""))
(clobber (match_operand 5 "gpc_reg_operand" ""))
(clobber (reg:DF 76))]
- "TARGET_HARD_FLOAT"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
[(set (match_dup 4)
(xor:SI (match_dup 1)
(match_dup 6)))
@@ -4140,7 +4140,7 @@
(use (match_dup 3))
(clobber (match_dup 4))
(clobber (reg:DF 76))])]
- "TARGET_HARD_FLOAT"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
"
{
operands[2] = force_reg (SImode, GEN_INT (0x43300000));
@@ -4155,7 +4155,7 @@
(use (match_operand:DF 3 "gpc_reg_operand" "f"))
(clobber (match_operand 4 "gpc_reg_operand" "=b"))
(clobber (reg:DF 76))]
- "TARGET_HARD_FLOAT"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
"#"
[(set_attr "length" "20")])
@@ -4166,7 +4166,7 @@
(use (match_operand:DF 3 "gpc_reg_operand" ""))
(clobber (match_operand 4 "gpc_reg_operand" ""))
(clobber (reg:DF 76))]
- "TARGET_HARD_FLOAT"
+ "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
[(set (match_dup 4)
(unspec [(const_int 0)] 11))
(set (match_dup 5)
@@ -4294,7 +4294,7 @@
"TARGET_HARD_FLOAT"
"
{
- if (!TARGET_POWER2 && !TARGET_POWERPC)
+ if (! TARGET_POWER2 && ! TARGET_POWERPC)
{
emit_insn (gen_trunc_call (operands[0], operands[1],
gen_rtx_SYMBOL_REF (Pmode, RS6000_ITRUNC)));
@@ -4323,8 +4323,8 @@
(clobber (match_operand 3 "gpc_reg_operand" ""))
(clobber (reg:DI 76))]
"TARGET_HARD_FLOAT"
- [(set (match_dup 2)
- (sign_extend:DI (fix:SI (match_operand:DF 1 "gpc_reg_operand" ""))))
+ [(set (subreg:SI (match_dup 2) 0)
+ (fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))
(set (match_dup 3)
(unspec [(const_int 0)] 11))
(set (match_dup 4)
@@ -4433,8 +4433,8 @@
}")
(define_insn "*fctiwz"
- [(set (match_operand:DI 0 "gpc_reg_operand" "=f")
- (sign_extend:DI (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))))]
+ [(set (subreg:SI (match_operand:DI 0 "gpc_reg_operand" "=f") 0)
+ (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))]
"(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT"
"{fcirz|fctiwz} %0,%1"
[(set_attr "type" "fp")])
@@ -5809,21 +5809,6 @@
"{l|lwz} %0,%a1@got(%2)"
[(set_attr "type" "load")])
-;; Sometimes, though, the GOT `register' will be on the stack. Deal with
-;; this case specially.
-;; Force final to split this insn (if it hasn't been split already) to
-;; avoid having to create a suitable output template.
-(define_insn "*movsi_got_internal_mem"
- [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
- (unspec [(match_operand:SI 1 "got_no_const_operand" "")
- (match_operand:SI 2 "memory_operand" "m")] 8))]
- "(DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
- && flag_pic == 1
- && (reload_in_progress || reload_completed)"
- "#"
- [(set_attr "type" "load")
- (set_attr "length" "8")])
-
;; Used by sched, shorten_branches and final when the GOT pseudo reg
;; didn't get allocated to a hard register.
(define_split
@@ -6322,8 +6307,8 @@
;; The "??" is a kludge until we can figure out a more reasonable way
;; of handling these non-offsettable values.
(define_insn "*movdf_hardfloat32"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,o,!r,!r,!r,f,f,m")
- (match_operand:DF 1 "input_operand" "r,o,r,G,H,F,f,m,f"))]
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,!r,!r,!r,f,f,m")
+ (match_operand:DF 1 "input_operand" "r,m,r,G,H,F,f,m,f"))]
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
@@ -6335,24 +6320,74 @@
abort ();
case 0:
/* We normally copy the low-numbered register first. However, if
- the first register operand 0 is the same as the second register of
- operand 1, we must copy in the opposite order. */
+ the first register operand 0 is the same as the second register
+ of operand 1, we must copy in the opposite order. */
if (REGNO (operands[0]) == REGNO (operands[1]) + 1)
return \"mr %L0,%L1\;mr %0,%1\";
else
return \"mr %0,%1\;mr %L0,%L1\";
case 1:
- /* If the low-address word is used in the address, we must load it
- last. Otherwise, load it first. Note that we cannot have
- auto-increment in that case since the address register is known to be
- dead. */
- if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1,
- operands [1], 0))
- return \"{l|lwz} %L0,%L1\;{l|lwz} %0,%1\";
+ if (offsettable_memref_p (operands[1])
+ || (GET_CODE (operands[1]) == MEM
+ && GET_CODE (XEXP (operands[1], 0)) == LO_SUM))
+ {
+ /* If the low-address word is used in the address, we must load
+ it last. Otherwise, load it first. Note that we cannot have
+ auto-increment in that case since the address register is
+ known to be dead. */
+ if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1,
+ operands[1], 0))
+ return \"{l|lwz} %L0,%L1\;{l|lwz} %0,%1\";
+ else
+ return \"{l%U1|lwz%U1} %0,%1\;{l|lwz} %L0,%L1\";
+ }
else
- return \"{l%U1|lwz%U1} %0,%1\;{l|lwz} %L0,%L1\";
+ {
+ rtx addreg;
+
+ if (GET_CODE (XEXP (operands[1], 0)) == PRE_INC
+ || GET_CODE (XEXP (operands[1], 0)) == PRE_DEC)
+ abort ();
+
+ addreg = find_addr_reg (XEXP (operands[1], 0));
+ if (refers_to_regno_p (REGNO (operands[0]),
+ REGNO (operands[0]) + 1,
+ operands[1], 0))
+ {
+ output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
+ output_asm_insn (\"{lx|lwzx} %L0,%1\", operands);
+ output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
+ return \"{lx|lwzx} %0,%1\";
+ }
+ else
+ {
+ output_asm_insn (\"{lx|lwzx} %0,%1\", operands);
+ output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
+ output_asm_insn (\"{lx|lwzx} %L0,%1\", operands);
+ output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
+ return \"\";
+ }
+ }
case 2:
- return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\";
+ if (offsettable_memref_p (operands[0])
+ || (GET_CODE (operands[0]) == MEM
+ && GET_CODE (XEXP (operands[0], 0)) == LO_SUM))
+ return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\";
+ else
+ {
+ rtx addreg;
+
+ if (GET_CODE (XEXP (operands[0], 0)) == PRE_INC
+ || GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
+ abort ();
+
+ addreg = find_addr_reg (XEXP (operands[0], 0));
+ output_asm_insn (\"{stx|stwx} %1,%0\", operands);
+ output_asm_insn (\"{cal|la} %0,4(%0)\", &addreg);
+ output_asm_insn (\"{stx|stwx} %L1,%0\", operands);
+ output_asm_insn (\"{cal|la} %0,-4(%0)\", &addreg);
+ return \"\";
+ }
case 3:
case 4:
case 5:
@@ -6366,7 +6401,7 @@
}
}"
[(set_attr "type" "*,load,store,*,*,*,fp,fpload,fpstore")
- (set_attr "length" "8,8,8,8,12,16,*,*,*")])
+ (set_attr "length" "8,16,16,8,12,16,*,*,*")])
(define_insn "*movdf_softfloat32"
[(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,r,r,r")
@@ -9116,7 +9151,7 @@
(lshiftrt:SI (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r")))
(const_int 31)))
(clobber (match_scratch:SI 2 "=&r"))]
- "!TARGET_POWER"
+ "! TARGET_POWER"
"{ai|addic} %2,%1,-1\;{sfe|subfe} %0,%2,%1"
[(set_attr "length" "8")])
diff --git a/gnu/egcs/gcc/config/sparc/pbd.h b/gnu/egcs/gcc/config/sparc/pbd.h
index 459bffd901b..b70fdcb259b 100644
--- a/gnu/egcs/gcc/config/sparc/pbd.h
+++ b/gnu/egcs/gcc/config/sparc/pbd.h
@@ -144,35 +144,7 @@ Boston, MA 02111-1307, USA. */
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
fprintf (FILE, "\t.word .L%d\n", VALUE)
-/* Output assembler code to FILE to increment profiler label # LABELNO
- for profiling a function entry. */
-
-#undef FUNCTION_PROFILER
-#define FUNCTION_PROFILER(FILE, LABELNO) \
- fprintf (FILE, "\tsethi %%hi(.LP%d),%%o0\n\tcall mcount\n\tor %%lo(.LP%d),%%o0,%%o0\n", \
- (LABELNO), (LABELNO))
-
-/* Output assembler code to FILE to initialize this source file's
- basic block profiling info, if that has not already been done. */
-
-#undef FUNCTION_BLOCK_PROFILER
-#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
- fprintf (FILE, "\tsethi %%hi(.LPBX0),%%o0\n\tld [%%lo(.LPBX0)+%%o0],%%o1\n\ttst %%o1\n\tbne .LPY%d\n\tnop\n\tcall ___bb_init_func\n\tnop\n.LPY%d:\n", \
- (LABELNO), (LABELNO))
-
-/* Output assembler code to FILE to increment the entry-count for
- the BLOCKNO'th basic block in this source file. */
-
-#undef BLOCK_PROFILER
-#define BLOCK_PROFILER(FILE, BLOCKNO) \
-{ \
- int blockn = (BLOCKNO); \
- fprintf (FILE, "\tsethi %%hi(.LPBX2+%d),%%g1\n\tld [%%lo(.LPBX2+%d)+%%g1],%%g2\n\
-\tadd %%g2,1,%%g2\n\tst %%g2,[%%lo(.LPBX2+%d)+%%g1]\n", \
- 4 * blockn, 4 * blockn, 4 * blockn); \
- CC_STATUS_INIT; /* We have clobbered %g1. Also %g2. */ \
-}
-/* This is needed for SunOS 4.0, and should not hurt for 3.2
+/* This is needed for SunOS 4.0, and should not hurt for 3.2
versions either. */
#undef ASM_OUTPUT_SOURCE_LINE(file, line)
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
diff --git a/gnu/egcs/gcc/config/sparc/sun4o3.h b/gnu/egcs/gcc/config/sparc/sun4o3.h
index 10c73916b60..d2a53c1f237 100644
--- a/gnu/egcs/gcc/config/sparc/sun4o3.h
+++ b/gnu/egcs/gcc/config/sparc/sun4o3.h
@@ -1,9 +1,9 @@
#include "sparc/sparc.h"
-#undef FUNCTION_PROFILER
-#define FUNCTION_PROFILER(FILE, LABELNO) \
- fprintf (FILE, "\tsethi %%hi(LP%d),%%o0\n\tcall .mcount\n\tor %%lo(LP%d),%%o0,%%o0\n", \
- (LABELNO), (LABELNO))
+/* Override the name of the mcount profiling function. */
+
+#undef MCOUNT_FUNCTION
+#define MCOUNT_FUNCTION "*.mcount"
/* LINK_SPEC is needed only for SunOS 4. */
diff --git a/gnu/egcs/gcc/config/sparc/sysv4.h b/gnu/egcs/gcc/config/sparc/sysv4.h
index 572b9dcde73..5f9bba9e594 100644
--- a/gnu/egcs/gcc/config/sparc/sysv4.h
+++ b/gnu/egcs/gcc/config/sparc/sysv4.h
@@ -200,28 +200,6 @@ do { \
else \
fprintf (FILE, ".section\t\"%s\",#alloc,#write\n", (NAME)); \
} while (0)
-
-/* Output assembler code to FILE to initialize this source file's
- basic block profiling info, if that has not already been done. */
-
-#undef FUNCTION_BLOCK_PROFILER
-#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
- do { \
- fprintf (FILE, "\tsethi %%hi(.LLPBX0),%%o0\n\tld [%%lo(.LLPBX0)+%%o0],%%o1\n\ttst %%o1\n\tbne LPY%d\n\tadd %%o0,%%lo(.LLPBX0),%%o0\n\tcall __bb_init_func\n\tnop\nLPY%d:\n", \
- (LABELNO), (LABELNO)); \
- } while (0)
-
-/* Output assembler code to FILE to increment the entry-count for
- the BLOCKNO'th basic block in this source file. */
-
-#undef BLOCK_PROFILER
-#define BLOCK_PROFILER(FILE, BLOCKNO) \
-{ \
- int blockn = (BLOCKNO); \
- fprintf (FILE, "\tsethi %%hi(.LLPBX2+%d),%%g1\n\tld [%%lo(.LLPBX2+%d)+%%g1],%%g2\n\
-\tadd %%g2,1,%%g2\n\tst %%g2,[%%lo(.LLPBX2+%d)+%%g1]\n", \
- 4 * blockn, 4 * blockn, 4 * blockn); \
-}
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
@@ -231,3 +209,8 @@ do { \
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+
+/* Override the name of the mcount profiling function. */
+
+#undef MCOUNT_FUNCTION
+#define MCOUNT_FUNCTION "*_mcount"
diff --git a/gnu/egcs/gcc/config/svr4.h b/gnu/egcs/gcc/config/svr4.h
index 1c8482fd11d..7fa30e8ac26 100644
--- a/gnu/egcs/gcc/config/svr4.h
+++ b/gnu/egcs/gcc/config/svr4.h
@@ -247,8 +247,9 @@ do { \
#define DWARF_DEBUGGING_INFO
/* All ELF targets can support DWARF-2. */
-
+#ifndef DWARF2_DEBUGGING_INFO
#define DWARF2_DEBUGGING_INFO
+#endif
/* The numbers used to denote specific machine registers in the System V
Release 4 DWARF debugging information are quite likely to be totally
diff --git a/gnu/egcs/gcc/cp/ChangeLog b/gnu/egcs/gcc/cp/ChangeLog
index 3e095447447..7c0d65044ba 100644
--- a/gnu/egcs/gcc/cp/ChangeLog
+++ b/gnu/egcs/gcc/cp/ChangeLog
@@ -1,3 +1,70 @@
+1999-06-26 Richard Henderson <rth@cygnus.com>
+
+ * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
+
+1999-06-21 Mark Mitchell <mark@codesourcery.com>
+
+ * init.c (expand_aggr_vbase_init): Rename to
+ construct_virtual_bases. Conditionalize construction here,
+ rather than ...
+ (emit_base_init): Here.
+
+1999-06-19 Mark Mitchell <mark@codesourcery.com>
+
+ * semantics.c (finish_asm_statement): Apply decay conversions to
+ input operands.
+
+ * decl.c (expand_static_init): When building an anonymous function
+ for use with atexit, compute its body before and after entering
+ the function.
+
+1999-06-18 Mark Mitchell <mark@codesourcery.com>
+
+ * init.c (expand_aggr_vbase_init): Add flag parameter.
+ (build_partial_cleanup_for): Remove, inlining into ..
+ (expand_cleanup_for_base): ... here. Take flag parameter.
+ (emit_base_init): Pass the in_chrg parameter to
+ emit_aggr_vbase_init.
+ (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
+
+1999-06-16 Mark Mitchell <mark@codesourcery.com>
+
+ * decl2.c (import_export_decl): Use same_type_p, rather than
+ relying on pointer-equality for types.
+
+ * method.c (do_build_copy_constructor): Simplify.
+
+ * call.c (build_method_call): Remove bogus code for two-argument
+ delete.
+ * init.c (build_new_1): Expand on comment, and remove dead code.
+
+ * init.c (expand_cleanup_for_base): New function, split out
+ from ...
+ (emit_base_init): Here.
+ (expand_aggr_vbase_init): Use it.
+
+1999-06-15 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (class_cache_firstobj): Declare.
+ (maybe_push_cache_obstack): Rename to push_cache_obstack.
+ * class.c (permanent_obstack): Remove declaration.
+ (class_cache_firstobj): Make it global.
+ (add_method): Don't use permanent_obstack directly.
+ (pushclass): Only free the class_cache_obstack if we know how far
+ back to free it.
+ (maybe_push_cache_obstack): Rename to push_cache_obstack.
+ * decl.c: Remove dead comment.
+ (saved_scope): Add class_cache_firstobj.
+ (push_to_top_level): Save it.
+ (pop_from_top_level): Restore it.
+ (push_class_level_binding): Use push_cache_obstack, not
+ maybe_push_cache_obstack.
+ * search.c (push_class_decls): Likewise.
+
+1999-06-14 Nathan Sidwell <nathan@acm.org>
+
+ * call.c (build_new_op): Remove REF_BIND from all operands.
+
1999-06-07 Mark Mitchell <mark@codesourcery.com>
* search.c (convert_pointer_to_single_level): Reimplement without
diff --git a/gnu/egcs/gcc/cp/NEWS b/gnu/egcs/gcc/cp/NEWS
index 0cdcc229a4e..1a242abcf41 100644
--- a/gnu/egcs/gcc/cp/NEWS
+++ b/gnu/egcs/gcc/cp/NEWS
@@ -1,9 +1,39 @@
-*** Changes since EGCS 1.1:
+*** Changes in GCC 2.95:
* Messages about non-conformant code that we can still handle ("pedwarns")
are now errors by default, rather than warnings. This can be reverted
with -fpermissive, and is overridden by -pedantic or -pedantic-errors.
+* String constants are now of type `const char[n]', rather than `char[n]'.
+ This can be reverted with -fno-const-strings.
+
+* References to functions are now supported.
+
+* Lookup of class members during class definition now works in all cases.
+
+* In overload resolution, type conversion operators are now properly
+ treated as always coming from the most derived class.
+
+* C9x-style restricted pointers are supported, using the `__restrict'
+ keyword.
+
+* You can now use -fno-implicit-inline-templates to suppress writing out
+ implicit instantiations of inline templates. Normally we do write them
+ out, even with -fno-implicit-templates, so that optimization doesn't
+ affect which instantiations are needed.
+
+* -fstrict-prototype now also suppresses implicit declarations.
+
+* Many obsolete options have been removed: -fall-virtual, -fmemoize-lookups,
+ -fsave-memoized, +e?, -fenum-int-equivalence, -fno-nonnull-objects.
+
+* Unused virtual functions can be discarded on some targets by specifying
+ -ffunction-sections -fvtable-gc to the compiler and --gc-sections to the
+ linker. Unfortunately, this only works on Linux if you're linking
+ statically.
+
+* Lots of bugs stomped.
+
*** Changes in EGCS 1.1:
* Namespaces are fully supported. The library has not yet been converted
diff --git a/gnu/egcs/gcc/cp/class.c b/gnu/egcs/gcc/cp/class.c
index f7998c1c976..31dcb67126f 100644
--- a/gnu/egcs/gcc/cp/class.c
+++ b/gnu/egcs/gcc/cp/class.c
@@ -36,8 +36,6 @@ Boston, MA 02111-1307, USA. */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-extern struct obstack permanent_obstack;
-
/* This is how we tell when two virtual member functions are really the
same. */
#define SAME_FN(FN1DECL, FN2DECL) (DECL_ASSEMBLER_NAME (FN1DECL) == DECL_ASSEMBLER_NAME (FN2DECL))
@@ -90,7 +88,7 @@ tree previous_class_values; /* TREE_LIST: copy of the class_shadowed list
static struct obstack class_cache_obstack;
/* The first object allocated on that obstack. We can use
obstack_free with tis value to free the entire obstack. */
-static char *class_cache_firstobj;
+char *class_cache_firstobj;
struct base_info;
@@ -1136,7 +1134,8 @@ void
add_method (type, fields, method)
tree type, *fields, method;
{
- push_obstacks (&permanent_obstack, &permanent_obstack);
+ push_obstacks_nochange ();
+ end_temporary_allocation ();
/* Setting the DECL_CONTEXT and DECL_CLASS_CONTEXT here is probably
redundant. */
@@ -4474,7 +4473,8 @@ pushclass (type, modify)
invalidate_class_lookup_cache ();
/* Now, free the obstack on which we cached all the values. */
- obstack_free (&class_cache_obstack, class_cache_firstobj);
+ if (class_cache_firstobj)
+ obstack_free (&class_cache_obstack, class_cache_firstobj);
class_cache_firstobj
= (char*) obstack_finish (&class_cache_obstack);
}
@@ -5231,7 +5231,7 @@ print_class_statistics ()
effect is undone by pop_obstacks. */
void
-maybe_push_cache_obstack ()
+push_cache_obstack ()
{
static int cache_obstack_initialized;
diff --git a/gnu/egcs/gcc/cp/init.c b/gnu/egcs/gcc/cp/init.c
index 7fb203007de..38bf2487a93 100644
--- a/gnu/egcs/gcc/cp/init.c
+++ b/gnu/egcs/gcc/cp/init.c
@@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */
tree current_base_init_list, current_member_init_list;
static void expand_aggr_vbase_init_1 PROTO((tree, tree, tree, tree));
-static void expand_aggr_vbase_init PROTO((tree, tree, tree, tree));
+static void construct_virtual_bases PROTO((tree, tree, tree, tree, tree));
static void expand_aggr_init_1 PROTO((tree, tree, tree, tree, int));
static void expand_default_init PROTO((tree, tree, tree, tree, int));
static tree build_vec_delete_1 PROTO((tree, tree, tree, tree, tree,
@@ -55,11 +55,11 @@ static tree build_builtin_delete_call PROTO((tree));
static int member_init_ok_or_else PROTO((tree, tree, const char *));
static void expand_virtual_init PROTO((tree, tree));
static tree sort_member_init PROTO((tree));
-static tree build_partial_cleanup_for PROTO((tree));
static tree initializing_context PROTO((tree));
static void expand_vec_init_try_block PROTO((tree));
static void expand_vec_init_catch_clause PROTO((tree, tree, tree, tree));
static tree build_java_class_ref PROTO((tree));
+static void expand_cleanup_for_base PROTO((tree, tree));
/* Cache the identifier nodes for the magic field of a new cookie. */
static tree nc_nelts_field_id;
@@ -478,17 +478,6 @@ sort_base_init (t, rbase_ptr, vbase_ptr)
*vbase_ptr = vbases;
}
-/* Perform partial cleanups for a base for exception handling. */
-
-static tree
-build_partial_cleanup_for (binfo)
- tree binfo;
-{
- return build_scoped_method_call
- (current_class_ref, binfo, dtor_identifier,
- build_expr_list (NULL_TREE, integer_zero_node));
-}
-
/* Perform whatever initializations have yet to be done on the base
class of the class variable. These actions are in the global
variable CURRENT_BASE_INIT_LIST. Such an action could be
@@ -548,14 +537,13 @@ emit_base_init (t, immediately)
sort_base_init (t, &rbase_init_list, &vbase_init_list);
current_base_init_list = NULL_TREE;
+ /* First, initialize the virtual base classes, if we are
+ constructing the most-derived object. */
if (TYPE_USES_VIRTUAL_BASECLASSES (t))
{
tree first_arg = TREE_CHAIN (DECL_ARGUMENTS (current_function_decl));
-
- expand_start_cond (first_arg, 0);
- expand_aggr_vbase_init (t_binfo, current_class_ref, current_class_ptr,
- vbase_init_list);
- expand_end_cond ();
+ construct_virtual_bases (t, current_class_ref, current_class_ptr,
+ vbase_init_list, first_arg);
}
/* Now, perform initialization of non-virtual base classes. */
@@ -593,18 +581,7 @@ emit_base_init (t, immediately)
free_temp_slots ();
}
- if (TYPE_NEEDS_DESTRUCTOR (BINFO_TYPE (base_binfo)))
- {
- tree expr;
-
- /* All cleanups must be on the function_obstack. */
- push_obstacks_nochange ();
- resume_temporary_allocation ();
- expr = build_partial_cleanup_for (base_binfo);
- pop_obstacks ();
- add_partial_entry (expr);
- }
-
+ expand_cleanup_for_base (base_binfo, NULL_TREE);
rbase_init_list = TREE_CHAIN (rbase_init_list);
}
@@ -766,6 +743,39 @@ expand_virtual_init (binfo, decl)
expand_expr_stmt (build_modify_expr (vtbl_ptr, NOP_EXPR, vtbl));
}
+/* If an exception is thrown in a constructor, those base classes already
+ constructed must be destroyed. This function creates the cleanup
+ for BINFO, which has just been constructed. If FLAG is non-NULL,
+ it is a DECL which is non-zero when this base needs to be
+ destroyed. */
+
+static void
+expand_cleanup_for_base (binfo, flag)
+ tree binfo;
+ tree flag;
+{
+ tree expr;
+
+ if (!TYPE_NEEDS_DESTRUCTOR (BINFO_TYPE (binfo)))
+ return;
+
+ /* All cleanups must be on the function_obstack. */
+ push_obstacks_nochange ();
+ resume_temporary_allocation ();
+
+ /* Call the destructor. */
+ expr = (build_scoped_method_call
+ (current_class_ref, binfo, dtor_identifier,
+ build_expr_list (NULL_TREE, integer_zero_node)));
+ if (flag)
+ expr = fold (build (COND_EXPR, void_type_node,
+ truthvalue_conversion (flag),
+ expr, integer_zero_node));
+
+ pop_obstacks ();
+ add_partial_entry (expr);
+}
+
/* Subroutine of `expand_aggr_vbase_init'.
BINFO is the binfo of the type that is being initialized.
INIT_LIST is the list of initializers for the virtual baseclass. */
@@ -788,36 +798,60 @@ expand_aggr_vbase_init_1 (binfo, exp, addr, init_list)
free_temp_slots ();
}
-/* Initialize this object's virtual base class pointers. This must be
- done only at the top-level of the object being constructed.
-
- INIT_LIST is list of initialization for constructor to perform. */
+/* Construct the virtual base-classes of THIS_REF (whose address is
+ THIS_PTR). The object has the indicated TYPE. The construction
+ actually takes place only if FLAG is non-zero. INIT_LIST is list
+ of initialization for constructor to perform. */
static void
-expand_aggr_vbase_init (binfo, exp, addr, init_list)
- tree binfo;
- tree exp;
- tree addr;
+construct_virtual_bases (type, this_ref, this_ptr, init_list, flag)
+ tree type;
+ tree this_ref;
+ tree this_ptr;
tree init_list;
+ tree flag;
{
- tree type = BINFO_TYPE (binfo);
+ tree vbases;
+ tree result;
- if (TYPE_USES_VIRTUAL_BASECLASSES (type))
- {
- tree result = init_vbase_pointers (type, addr);
- tree vbases;
+ /* If there are no virtual baseclasses, we shouldn't even be here. */
+ my_friendly_assert (TYPE_USES_VIRTUAL_BASECLASSES (type), 19990621);
- if (result)
- expand_expr_stmt (build_compound_expr (result));
+ /* First set the pointers in our object that tell us where to find
+ our virtual baseclasses. */
+ expand_start_cond (flag, 0);
+ result = init_vbase_pointers (type, this_ptr);
+ if (result)
+ expand_expr_stmt (build_compound_expr (result));
+ expand_end_cond ();
- for (vbases = CLASSTYPE_VBASECLASSES (type); vbases;
- vbases = TREE_CHAIN (vbases))
- {
- tree tmp = purpose_member (vbases, result);
- expand_aggr_vbase_init_1 (vbases, exp,
- TREE_OPERAND (TREE_VALUE (tmp), 0),
- init_list);
- }
+ /* Now, run through the baseclasses, initializing each. */
+ for (vbases = CLASSTYPE_VBASECLASSES (type); vbases;
+ vbases = TREE_CHAIN (vbases))
+ {
+ tree tmp = purpose_member (vbases, result);
+
+ /* If there are virtual base classes with destructors, we need to
+ emit cleanups to destroy them if an exception is thrown during
+ the construction process. These exception regions (i.e., the
+ period during which the cleanups must occur) begin from the time
+ the construction is complete to the end of the function. If we
+ create a conditional block in which to initialize the
+ base-classes, then the cleanup region for the virtual base begins
+ inside a block, and ends outside of that block. This situation
+ confuses the sjlj exception-handling code. Therefore, we do not
+ create a single conditional block, but one for each
+ initialization. (That way the cleanup regions always begin
+ in the outer block.) We trust the back-end to figure out
+ that the FLAG will not change across initializations, and
+ avoid doing multiple tests. */
+ expand_start_cond (flag, 0);
+ expand_aggr_vbase_init_1 (vbases, this_ref,
+ TREE_OPERAND (TREE_VALUE (tmp), 0),
+ init_list);
+ expand_end_cond ();
+
+ expand_cleanup_for_base (vbases, flag);
}
}
@@ -2180,21 +2214,21 @@ build_new_1 (exp)
signature_error (NULL_TREE, true_type);
return error_mark_node;
}
+
+ /* When we allocate an array, and the corresponding deallocation
+ function takes a second argument of type size_t, and that's the
+ "usual deallocation function", we allocate some extra space at
+ the beginning of the array to store the size of the array.
-#if 1
- /* Get a little extra space to store a couple of things before the new'ed
- array, if this isn't the default placement new. */
+ Well, that's what we should do. For backwards compatibility, we
+ have to do this whenever there's a two-argument array-delete
+ operator.
+ FIXME: For -fnew-abi, we don't have to maintain backwards
+ compatibility and we should fix this. */
use_cookie = (has_array && TYPE_VEC_NEW_USES_COOKIE (true_type)
&& ! (placement && ! TREE_CHAIN (placement)
&& TREE_TYPE (TREE_VALUE (placement)) == ptr_type_node));
-#else
- /* Get a little extra space to store a couple of things before the new'ed
- array, if this is either non-placement new or new (nothrow). */
-
- use_cookie = (has_array && TYPE_VEC_NEW_USES_COOKIE (true_type)
- && (! placement || nothrow));
-#endif
if (use_cookie)
{
diff --git a/gnu/egcs/gcc/cp/method.c b/gnu/egcs/gcc/cp/method.c
index 323aff58ebf..d4a667bdf82 100644
--- a/gnu/egcs/gcc/cp/method.c
+++ b/gnu/egcs/gcc/cp/method.c
@@ -2231,42 +2231,21 @@ do_build_copy_constructor (fndecl)
tree binfos = TYPE_BINFO_BASETYPES (current_class_type);
int i;
+ /* Initialize all the base-classes. */
for (t = CLASSTYPE_VBASECLASSES (current_class_type); t;
t = TREE_CHAIN (t))
- {
- tree basetype = BINFO_TYPE (t);
- tree p = convert_to_reference
- (build_reference_type (basetype), parm,
- CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE);
- p = convert_from_reference (p);
-
- if (p == error_mark_node)
- cp_error ("in default copy constructor");
- else
- current_base_init_list = tree_cons (basetype,
- p, current_base_init_list);
- }
-
+ current_base_init_list
+ = tree_cons (BINFO_TYPE (t), parm, current_base_init_list);
for (i = 0; i < n_bases; ++i)
{
- tree p, basetype = TREE_VEC_ELT (binfos, i);
- if (TREE_VIA_VIRTUAL (basetype))
+ t = TREE_VEC_ELT (binfos, i);
+ if (TREE_VIA_VIRTUAL (t))
continue;
- basetype = BINFO_TYPE (basetype);
- p = convert_to_reference
- (build_reference_type (basetype), parm,
- CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE);
-
- if (p == error_mark_node)
- cp_error ("in default copy constructor");
- else
- {
- p = convert_from_reference (p);
- current_base_init_list = tree_cons (basetype,
- p, current_base_init_list);
- }
+ current_base_init_list
+ = tree_cons (BINFO_TYPE (t), parm, current_base_init_list);
}
+
for (; fields; fields = TREE_CHAIN (fields))
{
tree init, t;
diff --git a/gnu/egcs/gcc/cp/search.c b/gnu/egcs/gcc/cp/search.c
index 209256803e2..8760c6aff7d 100644
--- a/gnu/egcs/gcc/cp/search.c
+++ b/gnu/egcs/gcc/cp/search.c
@@ -2982,7 +2982,7 @@ push_class_decls (type)
/* Build up all the relevant bindings and such on the cache
obstack. That way no memory is wasted when we throw away the
cache later. */
- maybe_push_cache_obstack ();
+ push_cache_obstack ();
/* Enter type declarations and mark. */
dfs_walk (TYPE_BINFO (type), dfs_push_type_decls, unmarked_pushdecls_p, 0);
@@ -2990,7 +2990,7 @@ push_class_decls (type)
/* Enter non-type declarations and unmark. */
dfs_walk (TYPE_BINFO (type), dfs_push_decls, marked_pushdecls_p, 0);
- /* Undo the call to maybe_push_cache_obstack above. */
+ /* Undo the call to push_cache_obstack above. */
pop_obstacks ();
current_obstack = ambient_obstack;
diff --git a/gnu/egcs/gcc/cp/semantics.c b/gnu/egcs/gcc/cp/semantics.c
index 6586937fa49..7267f46aaf3 100644
--- a/gnu/egcs/gcc/cp/semantics.c
+++ b/gnu/egcs/gcc/cp/semantics.c
@@ -741,11 +741,16 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
if (output_operands != NULL_TREE || input_operands != NULL_TREE
|| clobbers != NULL_TREE)
{
+ tree t;
+
if (cv_qualifier != NULL_TREE
&& cv_qualifier != ridpointers[(int) RID_VOLATILE])
cp_warning ("%s qualifier ignored on asm",
IDENTIFIER_POINTER (cv_qualifier));
-
+
+ for (t = input_operands; t; t = TREE_CHAIN (t))
+ TREE_VALUE (t) = decay_conversion (TREE_VALUE (t));
+
c_expand_asm_operands (string, output_operands,
input_operands,
clobbers,
diff --git a/gnu/egcs/gcc/dwarfout.c b/gnu/egcs/gcc/dwarfout.c
index ac17f7fb196..2a1b482f8f8 100644
--- a/gnu/egcs/gcc/dwarfout.c
+++ b/gnu/egcs/gcc/dwarfout.c
@@ -270,6 +270,22 @@ static unsigned pending_types;
#define PENDING_TYPES_INCREMENT 64
+/* A pointer to the base of a list of incomplete types which might be
+ completed at some later time. */
+
+static tree *incomplete_types_list;
+
+/* Number of elements currently allocated for the incomplete_types_list. */
+static unsigned incomplete_types_allocated;
+
+/* Number of elements of incomplete_types_list currently in use. */
+static unsigned incomplete_types;
+
+/* Size (in elements) of increments by which we may expand the incomplete
+ types list. Actually, a single hunk of space of this size should
+ be enough for most typical programs. */
+#define INCOMPLETE_TYPES_INCREMENT 64
+
/* Pointer to an artificial RECORD_TYPE which we create in dwarfout_init.
This is used in a hack to help us get the DIEs describing types of
formal parameters to come *after* all of the DIEs describing the formal
@@ -4216,6 +4232,40 @@ output_pending_types_for_scope (containing_scope)
}
}
+/* Remember a type in the incomplete_types_list. */
+
+static void
+add_incomplete_type (type)
+ tree type;
+{
+ if (incomplete_types == incomplete_types_allocated)
+ {
+ incomplete_types_allocated += INCOMPLETE_TYPES_INCREMENT;
+ incomplete_types_list
+ = (tree *) xrealloc (incomplete_types_list,
+ sizeof (tree) * incomplete_types_allocated);
+ }
+
+ incomplete_types_list[incomplete_types++] = type;
+}
+
+/* Walk through the list of incomplete types again, trying once more to
+ emit full debugging info for them. */
+
+static void
+retry_incomplete_types ()
+{
+ register tree type;
+
+ finalizing = 1;
+ while (incomplete_types)
+ {
+ --incomplete_types;
+ type = incomplete_types_list[incomplete_types];
+ output_type (type, NULL_TREE);
+ }
+}
+
static void
output_type (type, containing_scope)
register tree type;
@@ -4380,7 +4430,10 @@ output_type (type, containing_scope)
&& TREE_CODE (TYPE_CONTEXT (type)) != FUNCTION_TYPE
&& TREE_CODE (TYPE_CONTEXT (type)) != METHOD_TYPE))
&& !finalizing)
- return; /* EARLY EXIT! Avoid setting TREE_ASM_WRITTEN. */
+ {
+ add_incomplete_type (type);
+ return; /* EARLY EXIT! Avoid setting TREE_ASM_WRITTEN. */
+ }
/* Prevent infinite recursion in cases where the type of some
member of this type is expressed in terms of this type itself. */
@@ -4435,7 +4488,11 @@ output_type (type, containing_scope)
register int i;
for (i = 0; i < n_bases; i++)
- output_die (output_inheritance_die, TREE_VEC_ELT (bases, i));
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+ output_type (BINFO_TYPE (binfo), containing_scope);
+ output_die (output_inheritance_die, binfo);
+ }
}
++in_class;
@@ -5844,6 +5901,8 @@ dwarfout_finish ()
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
+ retry_incomplete_types ();
+
fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
diff --git a/gnu/egcs/gcc/expmed.c b/gnu/egcs/gcc/expmed.c
index dc6382c296d..ffe16fedaf4 100644
--- a/gnu/egcs/gcc/expmed.c
+++ b/gnu/egcs/gcc/expmed.c
@@ -3246,7 +3246,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
insn = get_last_insn ();
if (insn != last
&& (set = single_set (insn)) != 0
- && SET_DEST (set) == quotient)
+ && SET_DEST (set) == quotient
+ && abs_d < ((unsigned HOST_WIDE_INT) 1
+ << (HOST_BITS_PER_WIDE_INT - 1)))
set_unique_reg_note (insn,
REG_EQUAL,
gen_rtx_DIV (compute_mode,
diff --git a/gnu/egcs/gcc/f/BUGS b/gnu/egcs/gcc/f/BUGS
index ffd90cc8320..398b729daad 100644
--- a/gnu/egcs/gcc/f/BUGS
+++ b/gnu/egcs/gcc/f/BUGS
@@ -40,7 +40,15 @@ via `http://egcs.cygnus.com/onlinedocs/g77_bugs.html'. Follow the
port, build, and install `g77', see "Problems Installing" in
`egcs/gcc/f/INSTALL'.
- The following information was last updated on 1999-05-06:
+ The following information was last updated on 1999-06-25:
+
+ * Input to a `NAMELIST' read involving a repeat count, such as
+ `K(5)=10*3', is not properly handled by `libf2c'. The first item
+ is written to `K(5)', but the remaining nine are written elsewhere
+ (still within the array), not necessarily starting at `K(6)'.
+
+ A fix is pending, certainly for `gcc' 3.0, perhaps for 2.96 if
+ such a release is made.
* `g77' fails to warn about use of a "live" iterative-DO variable as
an implied-DO variable in a `WRITE' or `PRINT' statement (although
diff --git a/gnu/egcs/gcc/f/ChangeLog b/gnu/egcs/gcc/f/ChangeLog
index e8d745a88ee..2fbcf24d293 100644
--- a/gnu/egcs/gcc/f/ChangeLog
+++ b/gnu/egcs/gcc/f/ChangeLog
@@ -1,3 +1,22 @@
+Mon Jun 28 10:43:11 1999 Craig Burley <craig@jcb-sc.com>
+
+ * com.c (ffecom_prepare_expr_): A COMPLEX intrinsic needs
+ a temp even if -fno-f2c.
+
+ * version.c: Bump version.
+
+Fri Jun 25 11:06:32 1999 Craig Burley <craig@jcb-sc.com>
+
+ * bugs.texi: Describe K(5)=10*3 NAMELIST-read bug.
+
+Mon Jun 21 12:40:17 1999 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * g77.texi: Update links.
+
+Wed Jun 16 11:43:02 1999 Craig Burley <craig@jcb-sc.com>
+
+ * news.texi: Mention BACKSPACE fix to libg2c.
+
Mon Jun 7 08:42:40 1999 Craig Burley <craig@jcb-sc.com>
* Make-lang.in: Any target using libsubdir must depend
diff --git a/gnu/egcs/gcc/f/NEWS b/gnu/egcs/gcc/f/NEWS
index 63570febeb8..d9a91b11df2 100644
--- a/gnu/egcs/gcc/f/NEWS
+++ b/gnu/egcs/gcc/f/NEWS
@@ -66,7 +66,7 @@ about previous `g77' versions up-to-date.
the mainline, development version of `g77' within `egcs') is available
at `http://egcs.cygnus.com/onlinedocs/g77_news.html'.
- The following information was last updated on 1999-06-04:
+ The following information was last updated on 1999-06-16:
In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
=======================================================
@@ -87,19 +87,22 @@ In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
now assigns through a temporary, in cases where such partial
overlap is deemed possible.
- 4. Automatic arrays now seem to be working on HP-UX systems.
+ 4. `libg2c' (`libf2c') no longer loses track of the file being worked
+ on during a `BACKSPACE' operation.
- 5. Fix `g77' so it no longer crashes when compiling I/O statements
+ 5. Automatic arrays now seem to be working on HP-UX systems.
+
+ 6. Fix `g77' so it no longer crashes when compiling I/O statements
using keywords that define `INTEGER' values, such as `IOSTAT=J',
where J is other than default `INTEGER' (such as `INTEGER*2').
Instead, it issues a diagnostic.
- 6. Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is
+ 7. Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is
not default `INTEGER', such as `INTEGER*2', instead of producing a
spurious diagnostic. Also fix `DATA (A(I),I=1,N)', where `N' is
not default `INTEGER' to work instead of crashing `g77'.
- 7. The `-ax' option is now obeyed when compiling Fortran programs.
+ 8. The `-ax' option is now obeyed when compiling Fortran programs.
(It is passed to the `f771' driver.)
* The new `-fbounds-check' option causes `g77' to compile run-time
@@ -126,7 +129,7 @@ In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
to the implementations of these intrinsics using the `EXTERNAL'
mechanism (which would avoid the new warnings).
- 8. `g77' now warns about a reference to a function when the
+ 9. `g77' now warns about a reference to a function when the
corresponding *subsequent* function program unit disagrees with
the reference concerning the type of the function.
@@ -137,23 +140,23 @@ In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
* The `-malign-double' option now reliably aligns *all*
double-precision variables and arrays on Intel x86 targets.
- 9. Even without the `-malign-double' option, `g77' reliably aligns
+ 10. Even without the `-malign-double' option, `g77' reliably aligns
local double-precision variables that are not in `EQUIVALENCE'
areas and not `SAVE''d.
- 10. `g77' now open-codes ("inlines") division of `COMPLEX' operands
+ 11. `g77' now open-codes ("inlines") division of `COMPLEX' operands
instead of generating a run-time call to the `libf2c' routines
`c_div' or `z_div', unless the `-Os' option is specified.
* `g77' no longer generates code to maintain `errno', a C-language
concept, when performing operations such as the `SqRt' intrinsic.
- 11. `g77' developers can temporarily use the `-fflatten-arrays' option
+ 12. `g77' developers can temporarily use the `-fflatten-arrays' option
to compare how the compiler handles code generation using C-like
constructs as compared to the Fortran-like method constructs
normally used.
- 12. A substantial portion of the `g77' front end's code-generation
+ 13. A substantial portion of the `g77' front end's code-generation
component was rewritten. It now generates code using facilities
more robustly supported by the `gcc' back end. One effect of this
rewrite is that some codes no longer produce a spurious "label LAB
@@ -161,11 +164,11 @@ In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2:
* Support for the `-fugly' option has been removed.
- 13. Improve documentation and indexing, including information on Year
+ 14. Improve documentation and indexing, including information on Year
2000 (Y2K) compliance, and providing more information on internals
of the front end.
- 14. Upgrade to `libf2c' as of 1999-05-10.
+ 15. Upgrade to `libf2c' as of 1999-05-10.
In 0.5.24 versus 0.5.23:
========================
@@ -228,25 +231,25 @@ In `EGCS' 1.1.1 versus `EGCS' 1.1:
In `EGCS' 1.1 versus `EGCS' 1.0.3:
==================================
- 15. Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte
+ 16. Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte
beyond the end of its `CHARACTER' argument, and in the `libU77'
intrinsics `GMTime' and `LTime' that overwrote their arguments.
- 16. Assumed arrays with negative bounds (such as `REAL A(-1:*)') no
+ 17. Assumed arrays with negative bounds (such as `REAL A(-1:*)') no
longer elicit spurious diagnostics from `g77', even on systems
with pointers having different sizes than integers.
This bug is not known to have existed in any recent version of
`gcc'. It was introduced in an early release of `egcs'.
- 17. Valid combinations of `EXTERNAL', passing that external as a dummy
+ 18. Valid combinations of `EXTERNAL', passing that external as a dummy
argument without explicitly giving it a type, and, in a subsequent
program unit, referencing that external as an external function
with a different type no longer crash `g77'.
- 18. `CASE DEFAULT' no longer crashes `g77'.
+ 19. `CASE DEFAULT' no longer crashes `g77'.
- 19. The `-Wunused' option no longer issues a spurious warning about
+ 20. The `-Wunused' option no longer issues a spurious warning about
the "master" procedure generated by `g77' for procedures
containing `ENTRY' statements.
@@ -271,25 +274,25 @@ In `EGCS' 1.1 versus `EGCS' 1.0.3:
`libf2c' environment, even when `libf2c' (now `libg2c') is a
shared library.
- 20. `g77' no longer installs the `f77' command and `f77.1' man page in
+ 21. `g77' no longer installs the `f77' command and `f77.1' man page in
the `/usr' or `/usr/local' heirarchy, even if the `f77-install-ok'
file exists in the source or build directory. See the
installation documentation for more information.
- 21. `g77' no longer installs the `libf2c.a' library and `f2c.h'
+ 22. `g77' no longer installs the `libf2c.a' library and `f2c.h'
include file in the `/usr' or `/usr/local' heirarchy, even if the
`f2c-install-ok' or `f2c-exists-ok' files exist in the source or
build directory. See the installation documentation for more
information.
- 22. The `libf2c.a' library produced by `g77' has been renamed to
+ 23. The `libf2c.a' library produced by `g77' has been renamed to
`libg2c.a'. It is installed only in the `gcc' "private" directory
heirarchy, `gcc-lib'. This allows system administrators and users
to choose which version of the `libf2c' library from `netlib' they
wish to use on a case-by-case basis. See the installation
documentation for more information.
- 23. The `f2c.h' include (header) file produced by `g77' has been
+ 24. The `f2c.h' include (header) file produced by `g77' has been
renamed to `g2c.h'. It is installed only in the `gcc' "private"
directory heirarchy, `gcc-lib'. This allows system administrators
and users to choose which version of the include file from
@@ -301,11 +304,11 @@ In `EGCS' 1.1 versus `EGCS' 1.0.3:
than the one built and installed as part of the same `g77' version
is picked up.
- 24. During the configuration and build process, `g77' creates
+ 25. During the configuration and build process, `g77' creates
subdirectories it needs only as it needs them. Other cleaning up
of the configuration and build process has been performed as well.
- 25. `install-info' now used to update the directory of Info
+ 26. `install-info' now used to update the directory of Info
documentation to contain an entry for `g77' (during installation).
* Some diagnostics have been changed from warnings to errors, to
@@ -314,38 +317,38 @@ In `EGCS' 1.1 versus `EGCS' 1.0.3:
in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and
about truncations of various sorts of constants.
- 26. Improve compilation of `FORMAT' expressions so that a null byte is
+ 27. Improve compilation of `FORMAT' expressions so that a null byte is
appended to the last operand if it is a constant. This provides a
cleaner run-time diagnostic as provided by `libf2c' for statements
like `PRINT '(I1', 42'.
- 27. Improve documentation and indexing.
+ 28. Improve documentation and indexing.
- 28. The upgrade to `libf2c' as of 1998-06-18 should fix a variety of
+ 29. The upgrade to `libf2c' as of 1998-06-18 should fix a variety of
problems, including those involving some uses of the `T' format
specifier, and perhaps some build (porting) problems as well.
In `EGCS' 1.1 versus `g77' 0.5.23:
==================================
- 29. Fix a code-generation bug that afflicted Intel x86 targets when
+ 30. Fix a code-generation bug that afflicted Intel x86 targets when
`-O2' was specified compiling, for example, an old version of the
`DNRM2' routine.
The x87 coprocessor stack was being mismanaged in cases involving
assigned `GOTO' and `ASSIGN'.
- 30. `g77' no longer produces incorrect code and initial values for
+ 31. `g77' no longer produces incorrect code and initial values for
`EQUIVALENCE' and `COMMON' aggregates that, due to "unnatural"
ordering of members vis-a-vis their types, require initial padding.
- 31. Fix `g77' crash compiling code containing the construct
+ 32. Fix `g77' crash compiling code containing the construct
`CMPLX(0.)' or similar.
- 32. `g77' no longer crashes when compiling code containing
+ 33. `g77' no longer crashes when compiling code containing
specification statements such as `INTEGER(KIND=7) PTR'.
- 33. `g77' no longer crashes when compiling code such as `J = SIGNAL(1,
+ 34. `g77' no longer crashes when compiling code such as `J = SIGNAL(1,
2)'.
* `g77' now treats `%LOC(EXPR)' and `LOC(EXPR)' as "ordinary"
@@ -356,7 +359,7 @@ In `EGCS' 1.1 versus `g77' 0.5.23:
Previously, `g77' treated these expressions as denoting special
"pointer" arguments for the purposes of filewide analysis.
- 34. Fix `g77' crash (or apparently infinite run-time) when compiling
+ 35. Fix `g77' crash (or apparently infinite run-time) when compiling
certain complicated expressions involving `COMPLEX' arithmetic
(especially multiplication).
@@ -386,9 +389,9 @@ In `EGCS' 1.1 versus `g77' 0.5.23:
* The F90 `System_Clock' intrinsic allows the optional arguments
(except for the `Count' argument) to be omitted.
- 35. Upgrade to `libf2c' as of 1998-06-18.
+ 36. Upgrade to `libf2c' as of 1998-06-18.
- 36. Improve documentation and indexing.
+ 37. Improve documentation and indexing.
In previous versions:
=====================
diff --git a/gnu/egcs/gcc/f/bugs.texi b/gnu/egcs/gcc/f/bugs.texi
index 643a221c98c..a08a0a17155 100644
--- a/gnu/egcs/gcc/f/bugs.texi
+++ b/gnu/egcs/gcc/f/bugs.texi
@@ -9,7 +9,7 @@
@c in the standalone derivations of this file (e.g. BUGS).
@set copyrights-bugs 1995-1999
-@set last-update-bugs 1999-05-06
+@set last-update-bugs 1999-06-25
@include root.texi
@@ -98,6 +98,17 @@ The following information was last updated on @value{last-update-bugs}:
@itemize @bullet
@item
+Input to a @code{NAMELIST} read involving a repeat count,
+such as @samp{K(5)=10*3},
+is not properly handled by @code{libf2c}.
+The first item is written to @samp{K(5)},
+but the remaining nine are written elsewhere (still within the array),
+not necessarily starting at @samp{K(6)}.
+
+A fix is pending, certainly for @code{gcc} 3.0,
+perhaps for 2.96 if such a release is made.
+
+@item
@code{g77} fails to warn about
use of a ``live'' iterative-DO variable
as an implied-DO variable
diff --git a/gnu/egcs/gcc/f/com.c b/gnu/egcs/gcc/f/com.c
index 9500956cc22..c326fedaae7 100644
--- a/gnu/egcs/gcc/f/com.c
+++ b/gnu/egcs/gcc/f/com.c
@@ -13068,7 +13068,10 @@ ffecom_prepare_expr_ (ffebld expr, ffebld dest UNUSED)
s = ffebld_symter (ffebld_left (expr));
if (ffesymbol_where (s) == FFEINFO_whereCONSTANT
- || ! ffesymbol_is_f2c (s))
+ || (ffesymbol_where (s) != FFEINFO_whereINTRINSIC
+ && ! ffesymbol_is_f2c (s))
+ || (ffesymbol_where (s) == FFEINFO_whereINTRINSIC
+ && ! ffe_is_f2c_library ()))
break;
}
else if (ffebld_op (expr) == FFEBLD_opPOWER)
diff --git a/gnu/egcs/gcc/f/g77.texi b/gnu/egcs/gcc/f/g77.texi
index 0d7a213575a..eaab2543e6b 100644
--- a/gnu/egcs/gcc/f/g77.texi
+++ b/gnu/egcs/gcc/f/g77.texi
@@ -10921,7 +10921,7 @@ How to cope with such problems is well beyond the scope
of this manual.
However, users of Linux-based systems (such as GNU/Linux)
-should review @uref{http://www.bitwizard.nl/sig11}, a source
+should review @uref{http://www.bitwizard.nl/sig11/}, a source
of detailed information on diagnosing hardware problems,
by recognizing their common symptoms.
@@ -11335,13 +11335,13 @@ Goldberg, `What Every Computer Scientist Should Know About
Floating-Point Arithmetic', Computing Surveys, 23, March 1991, pp.@:
5-48.
An online version is available at
-@uref{http://docs.sun.com},
+@uref{http://docs.sun.com/},
and there is a supplemented version, in PostScript form, at
@uref{http://www.validgh.com/goldberg/paper.ps}.
Information related to the IEEE 754
floating-point standard by a leading light can be found at
-@uref{http://http.cs.berkeley.edu/%7Ewkahan/ieee754status};
+@uref{http://http.cs.berkeley.edu/%7Ewkahan/ieee754status/};
see also slides from the short course referenced from
@uref{http://http.cs.berkeley.edu/%7Efateman/}.
@uref{http://www.linuxsupportline.com/%7Ebillm/} has a brief
diff --git a/gnu/egcs/gcc/f/news.texi b/gnu/egcs/gcc/f/news.texi
index ea0a1312f03..9f20e65bf43 100644
--- a/gnu/egcs/gcc/f/news.texi
+++ b/gnu/egcs/gcc/f/news.texi
@@ -9,7 +9,7 @@
@c in the standalone derivations of this file (e.g. NEWS).
@set copyrights-news 1995-1999
-@set last-update-news 1999-06-04
+@set last-update-news 1999-06-16
@include root.texi
@@ -186,6 +186,13 @@ in cases where such partial overlap is deemed possible.
@ifclear USERVISONLY
@item
+@code{libg2c} (@code{libf2c}) no longer loses track
+of the file being worked on
+during a @code{BACKSPACE} operation.
+@end ifclear
+
+@ifclear USERVISONLY
+@item
@c Tim Prince reported this, regarding the TEST_FPU benchmark.
Automatic arrays now seem to be working on HP-UX systems.
@end ifclear
diff --git a/gnu/egcs/gcc/f/version.c b/gnu/egcs/gcc/f/version.c
index 9b211b1074b..cba4229e05d 100644
--- a/gnu/egcs/gcc/f/version.c
+++ b/gnu/egcs/gcc/f/version.c
@@ -1 +1 @@
-const char *ffe_version_string = "0.5.25 19990526 (prerelease)";
+const char *ffe_version_string = "0.5.25 19990628 (prerelease)";
diff --git a/gnu/egcs/gcc/final.c b/gnu/egcs/gcc/final.c
index 4695590dc5e..a9ae2804dbd 100644
--- a/gnu/egcs/gcc/final.c
+++ b/gnu/egcs/gcc/final.c
@@ -999,7 +999,9 @@ shorten_branches (first)
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
{
rtx old = insn;
- insn = try_split (PATTERN (old), old, 1);
+ /* Don't split the insn if it has been deleted. */
+ if (! INSN_DELETED_P (old))
+ insn = try_split (PATTERN (old), old, 1);
/* When not optimizing, the old insn will be still left around
with only the 'deleted' bit set. Transform it into a note
to avoid confusion of subsequent processing. */
diff --git a/gnu/egcs/gcc/fixinc/Makefile.in b/gnu/egcs/gcc/fixinc/Makefile.in
index 8976c783e72..9182337c76a 100644
--- a/gnu/egcs/gcc/fixinc/Makefile.in
+++ b/gnu/egcs/gcc/fixinc/Makefile.in
@@ -82,7 +82,7 @@ fixincl: $(OBJ)
gnu-regex.o: gnu-regex.c
-$(CC) $(CFLAGS) $(FIXINC_DEFS) $(INCLUDES) -DREGEX_MALLOC \
- -DSTDC_HEADERS=1 -c $(srcdir)/gnu-regex.c
+ -c $(srcdir)/gnu-regex.c
fixincl.o : fixincl.x fixincl.c
server.o : server.c server.h
diff --git a/gnu/egcs/gcc/fixinc/fixinc.svr4 b/gnu/egcs/gcc/fixinc/fixinc.svr4
index dedf4eb7e44..30aa6796549 100644
--- a/gnu/egcs/gcc/fixinc/fixinc.svr4
+++ b/gnu/egcs/gcc/fixinc/fixinc.svr4
@@ -1572,7 +1572,7 @@ fi
echo 'Removing unneeded directories:'
cd $LIB
-files=`find . -type d -print | sort -r`
+files=`find . -type d \! -name '.' -print | sort -r`
for file in $files; do
rmdir $LIB/$file > /dev/null 2>&1
done
diff --git a/gnu/egcs/gcc/fixinc/fixinc.winnt b/gnu/egcs/gcc/fixinc/fixinc.winnt
index cb7e72f3bf5..2e5750c5138 100644
--- a/gnu/egcs/gcc/fixinc/fixinc.winnt
+++ b/gnu/egcs/gcc/fixinc/fixinc.winnt
@@ -224,7 +224,7 @@ fi
echo 'Removing unneeded directories:'
cd $LIB
-files=`find . -type d -print | sort -r`
+files=`find . -type d \! -name '.' -print | sort -r`
for file in $files; do
rmdir $LIB/$file > NUL 2>&1
done
diff --git a/gnu/egcs/gcc/fixinc/fixincl.sh b/gnu/egcs/gcc/fixinc/fixincl.sh
index f6517187ab5..73bb35e17b4 100644
--- a/gnu/egcs/gcc/fixinc/fixincl.sh
+++ b/gnu/egcs/gcc/fixinc/fixincl.sh
@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
-# This script contains 104 fixup scripts.
+# This script contains 103 fixup scripts.
#
# See README-fixinc for more information.
#
@@ -393,7 +393,7 @@ find . -name DONE -exec rm -f '{}' ';'
echo 'Removing unneeded directories:'
cd $LIB
-all_dirs=`find . -type d -print | sort -r`
+all_dirs=`find . -type d \! -name '.' -print | sort -r`
for file in $all_dirs; do
rmdir $LIB/$file > /dev/null 2>&1
done
diff --git a/gnu/egcs/gcc/fixinc/fixincl.x b/gnu/egcs/gcc/fixinc/fixincl.x
index 9b8ddec0ddf..aacc190f327 100644
--- a/gnu/egcs/gcc/fixinc/fixincl.x
+++ b/gnu/egcs/gcc/fixinc/fixincl.x
@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
- * This file contains 104 fixup descriptions.
+ * This file contains 103 fixup descriptions.
*
* See README-fixinc for more information.
*
@@ -421,17 +421,9 @@ tSCC zBad_LvalList[] =
* Machine/OS name selection pattern
*/
#define apzBad_LvalMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zBad_LvalSelect0[] =
- "^[ \t]*#[ \t]*pragma[ \t]extern_prefix";
-
-#define BAD_LVAL_TEST_CT 1
-#define BAD_LVAL_RE_CT 1
-tTestDesc aBad_LvalTests[] = {
- { TT_EGREP, zBad_LvalSelect0, (regex_t*)NULL }, };
+#define BAD_LVAL_TEST_CT 0
+#define BAD_LVAL_RE_CT 0
+#define aBad_LvalTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Bad_Lval
@@ -614,7 +606,7 @@ tSCC zNo_Double_SlashSelect0[] =
* perform the 'test' shell command - do fix on success
*/
tSCC zNo_Double_SlashTest0[] =
- "-z `echo ${file} | egrep '(CC|cxx|\\+\\+)/' `";
+ " -z \"`echo ${file} | egrep '(CC|cxx|\\+\\+)/'`\"";
#define NO_DOUBLE_SLASH_TEST_CT 2
#define NO_DOUBLE_SLASH_RE_CT 1
@@ -694,86 +686,49 @@ extern \"C\"\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 20 - Else_Label fix
- */
-tSCC zElse_LabelName[] =
- "Else_Label";
-/*
- * File name selection pattern
- */
-#define zElse_LabelList (char*)NULL
-/*
- * Machine/OS name selection pattern
- */
-#define apzElse_LabelMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zElse_LabelSelect0[] =
- "^[ \t]*#[ \t]*else[ \t]+[!-.0-~]";
-
-#define ELSE_LABEL_TEST_CT 1
-#define ELSE_LABEL_RE_CT 1
-tTestDesc aElse_LabelTests[] = {
- { TT_EGREP, zElse_LabelSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Else_Label
- */
-const char* apzElse_LabelPatch[] = { "sed",
- "-e", ":loop\n\
-/\\\\$/N\n\
-s/\\\\$/\\\\+++fixinc_eol+++/\n\
-/\\\\$/b loop\n\
-s/\\\\+++fixinc_eol+++/\\\\/g\n\
-s%^\\([ \t]*#[ \t]*else\\)[ \t]*/[^*].*%\\1%\n\
-s%^\\([ \t]*#[ \t]*else\\)[ \t]*[^/ \t].*%\\1%",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description 21 - Endif_Label fix
+ * Description 20 - End_Else_Label fix
*/
-tSCC zEndif_LabelName[] =
- "Endif_Label";
+tSCC zEnd_Else_LabelName[] =
+ "End_Else_Label";
/*
* File name selection pattern
*/
-#define zEndif_LabelList (char*)NULL
+#define zEnd_Else_LabelList (char*)NULL
/*
* Machine/OS name selection pattern
*/
-#define apzEndif_LabelMachs (const char**)NULL
+#define apzEnd_Else_LabelMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
-tSCC zEndif_LabelSelect0[] =
- "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z{|}~]";
+tSCC zEnd_Else_LabelSelect0[] =
+ "^[ \t]*#[ \t]*(else|endif)[ \t]+([!-.0-z\\{\\|\\}\\~]|/[^\\*])";
-#define ENDIF_LABEL_TEST_CT 1
-#define ENDIF_LABEL_RE_CT 1
-tTestDesc aEndif_LabelTests[] = {
- { TT_EGREP, zEndif_LabelSelect0, (regex_t*)NULL }, };
+#define END_ELSE_LABEL_TEST_CT 1
+#define END_ELSE_LABEL_RE_CT 1
+tTestDesc aEnd_Else_LabelTests[] = {
+ { TT_EGREP, zEnd_Else_LabelSelect0, (regex_t*)NULL }, };
/*
- * Fix Command Arguments for Endif_Label
+ * Fix Command Arguments for End_Else_Label
*/
-const char* apzEndif_LabelPatch[] = { "sed",
+const char* apzEnd_Else_LabelPatch[] = { "sed",
"-e", ":loop\n\
/\\\\$/N\n\
s/\\\\$/\\\\+++fixinc_eol+++/\n\
/\\\\$/b loop\n\
s/\\\\+++fixinc_eol+++/\\\\/g\n\
-s%^\\([ \t]*#[ \t]*endif\\)[ \t]*/[^*].*%\\1%\n\
-s%^\\([ \t]*#[ \t]*endif\\)[ \t]*\\*[^/].*%\\1%\n\
-s%^\\([ \t]*#[ \t]*endif\\)[ \t]*[^/* \t].*%\\1%",
+s%^\\([ \t]*#[ \t]*else\\)[ \t][ \t]*/[^*].*%\\1%\n\
+s%^\\([ \t]*#[ \t]*else\\)[ \t][ \t]*[^/ \t].*%\\1%\n\
+s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*/[^*].*%\\1%\n\
+s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]**[^/].*%\\1%\n\
+s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*[^/* \t].*%\\1%",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 22 - Hp_Inline fix
+ * Description 21 - Hp_Inline fix
*/
tSCC zHp_InlineName[] =
"Hp_Inline";
@@ -808,7 +763,7 @@ const char* apzHp_InlinePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 23 - Hp_Sysfile fix
+ * Description 22 - Hp_Sysfile fix
*/
tSCC zHp_SysfileName[] =
"Hp_Sysfile";
@@ -842,7 +797,7 @@ const char* apzHp_SysfilePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 24 - Cxx_Unready fix
+ * Description 23 - Cxx_Unready fix
*/
tSCC zCxx_UnreadyName[] =
"Cxx_Unready";
@@ -884,7 +839,7 @@ extern \"C\" {\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 25 - Hpux_Maxint fix
+ * Description 24 - Hpux_Maxint fix
*/
tSCC zHpux_MaxintName[] =
"Hpux_Maxint";
@@ -913,7 +868,7 @@ const char* apzHpux_MaxintPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 26 - Hpux_Systime fix
+ * Description 25 - Hpux_Systime fix
*/
tSCC zHpux_SystimeName[] =
"Hpux_Systime";
@@ -947,7 +902,7 @@ const char* apzHpux_SystimePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 27 - Interactv_Add1 fix
+ * Description 26 - Interactv_Add1 fix
*/
tSCC zInteractv_Add1Name[] =
"Interactv_Add1";
@@ -984,7 +939,7 @@ const char* apzInteractv_Add1Patch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 28 - Interactv_Add2 fix
+ * Description 27 - Interactv_Add2 fix
*/
tSCC zInteractv_Add2Name[] =
"Interactv_Add2";
@@ -1021,7 +976,7 @@ const char* apzInteractv_Add2Patch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 29 - Interactv_Add3 fix
+ * Description 28 - Interactv_Add3 fix
*/
tSCC zInteractv_Add3Name[] =
"Interactv_Add3";
@@ -1059,7 +1014,7 @@ const char* apzInteractv_Add3Patch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 30 - Io_Def_Quotes fix
+ * Description 29 - Io_Def_Quotes fix
*/
tSCC zIo_Def_QuotesName[] =
"Io_Def_Quotes";
@@ -1095,7 +1050,7 @@ const char* apzIo_Def_QuotesPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 31 - Ioctl_Fix_Ctrl fix
+ * Description 30 - Ioctl_Fix_Ctrl fix
*/
tSCC zIoctl_Fix_CtrlName[] =
"Ioctl_Fix_Ctrl";
@@ -1112,7 +1067,7 @@ tSCC zIoctl_Fix_CtrlName[] =
* content selection pattern - do fix if pattern found
*/
tSCC zIoctl_Fix_CtrlSelect0[] =
- "CTRL[ \t]";
+ "CTRL[ \t]*\\(";
#define IOCTL_FIX_CTRL_TEST_CT 1
#define IOCTL_FIX_CTRL_RE_CT 1
@@ -1128,11 +1083,12 @@ const char* apzIoctl_Fix_CtrlPatch[] = { "sed",
"-e", "/#[ \t]*define[ \t]*[ \t]CTRL/s/'\\([cgx]\\)'/\\1/g",
"-e", "/#[ \t]*define[ \t]*[ \t]_CTRL/s/'\\([cgx]\\)'/\\1/g",
"-e", "/#[ \t]*define[ \t]*[ \t]BSD43_CTRL/s/'\\([cgx]\\)'/\\1/g",
+ "-e", "/#[ \t]*define[ \t]*[ \t]_*ISCTRL/s/'\\([cgx]\\)'/\\1/g",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 32 - Ip_Missing_Semi fix
+ * Description 31 - Ip_Missing_Semi fix
*/
tSCC zIp_Missing_SemiName[] =
"Ip_Missing_Semi";
@@ -1158,7 +1114,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 33 - Irix_Multiline_Cmnt fix
+ * Description 32 - Irix_Multiline_Cmnt fix
*/
tSCC zIrix_Multiline_CmntName[] =
"Irix_Multiline_Cmnt";
@@ -1185,7 +1141,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 34 - Irix_Sockaddr fix
+ * Description 33 - Irix_Sockaddr fix
*/
tSCC zIrix_SockaddrName[] =
"Irix_Sockaddr";
@@ -1220,7 +1176,7 @@ struct sockaddr;\n",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 35 - Irix_Struct__File fix
+ * Description 34 - Irix_Struct__File fix
*/
tSCC zIrix_Struct__FileName[] =
"Irix_Struct__File";
@@ -1247,7 +1203,7 @@ struct __file_s;\n",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 36 - Isc_Fmod fix
+ * Description 35 - Isc_Fmod fix
*/
tSCC zIsc_FmodName[] =
"Isc_Fmod";
@@ -1281,7 +1237,7 @@ const char* apzIsc_FmodPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 37 - Motorola_Nested fix
+ * Description 36 - Motorola_Nested fix
*/
tSCC zMotorola_NestedName[] =
"Motorola_Nested";
@@ -1310,7 +1266,7 @@ const char* apzMotorola_NestedPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 38 - Isc_Sys_Limits fix
+ * Description 37 - Isc_Sys_Limits fix
*/
tSCC zIsc_Sys_LimitsName[] =
"Isc_Sys_Limits";
@@ -1345,7 +1301,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 39 - Kandr_Concat fix
+ * Description 38 - Kandr_Concat fix
*/
tSCC zKandr_ConcatName[] =
"Kandr_Concat";
@@ -1379,7 +1335,7 @@ const char* apzKandr_ConcatPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 40 - Limits_Ifndefs fix
+ * Description 39 - Limits_Ifndefs fix
*/
tSCC zLimits_IfndefsName[] =
"Limits_Ifndefs";
@@ -1437,7 +1393,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 41 - Lynx_Void_Int fix
+ * Description 40 - Lynx_Void_Int fix
*/
tSCC zLynx_Void_IntName[] =
"Lynx_Void_Int";
@@ -1471,7 +1427,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 42 - Lynxos_Fcntl_Proto fix
+ * Description 41 - Lynxos_Fcntl_Proto fix
*/
tSCC zLynxos_Fcntl_ProtoName[] =
"Lynxos_Fcntl_Proto";
@@ -1505,7 +1461,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 43 - M88k_Bad_Hypot_Opt fix
+ * Description 42 - M88k_Bad_Hypot_Opt fix
*/
tSCC zM88k_Bad_Hypot_OptName[] =
"M88k_Bad_Hypot_Opt";
@@ -1546,7 +1502,7 @@ static __inline__ double fake_hypot (x, y)\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 44 - M88k_Bad_S_If fix
+ * Description 43 - M88k_Bad_S_If fix
*/
tSCC zM88k_Bad_S_IfName[] =
"M88k_Bad_S_If";
@@ -1583,7 +1539,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 45 - M88k_Multi_Incl fix
+ * Description 44 - M88k_Multi_Incl fix
*/
tSCC zM88k_Multi_InclName[] =
"M88k_Multi_Incl";
@@ -1624,7 +1580,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 46 - Machine_Name fix
+ * Description 45 - Machine_Name fix
*/
tSCC zMachine_NameName[] =
"Machine_Name";
@@ -1693,7 +1649,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 47 - Math_Exception fix
+ * Description 46 - Math_Exception fix
*/
tSCC zMath_ExceptionName[] =
"Math_Exception";
@@ -1742,7 +1698,7 @@ const char* apzMath_ExceptionPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 48 - Math_Gcc_Ifndefs fix
+ * Description 47 - Math_Gcc_Ifndefs fix
*/
tSCC zMath_Gcc_IfndefsName[] =
"Math_Gcc_Ifndefs";
@@ -1780,7 +1736,7 @@ const char* apzMath_Gcc_IfndefsPatch[] = { "sh", "-c",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 49 - Nested_Comment fix
+ * Description 48 - Nested_Comment fix
*/
tSCC zNested_CommentName[] =
"Nested_Comment";
@@ -1806,7 +1762,7 @@ const char* apzNested_CommentPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 50 - News_Os_Recursion fix
+ * Description 49 - News_Os_Recursion fix
*/
tSCC zNews_Os_RecursionName[] =
"News_Os_Recursion";
@@ -1843,7 +1799,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 51 - Next_Math_Prefix fix
+ * Description 50 - Next_Math_Prefix fix
*/
tSCC zNext_Math_PrefixName[] =
"Next_Math_Prefix";
@@ -1881,7 +1837,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 52 - Next_Template fix
+ * Description 51 - Next_Template fix
*/
tSCC zNext_TemplateName[] =
"Next_Template";
@@ -1916,7 +1872,7 @@ const char* apzNext_TemplatePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 53 - Next_Volitile fix
+ * Description 52 - Next_Volitile fix
*/
tSCC zNext_VolitileName[] =
"Next_Volitile";
@@ -1951,7 +1907,7 @@ const char* apzNext_VolitilePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 54 - Next_Wait_Union fix
+ * Description 53 - Next_Wait_Union fix
*/
tSCC zNext_Wait_UnionName[] =
"Next_Wait_Union";
@@ -1985,7 +1941,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 55 - Nodeent_Syntax fix
+ * Description 54 - Nodeent_Syntax fix
*/
tSCC zNodeent_SyntaxName[] =
"Nodeent_Syntax";
@@ -2011,7 +1967,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 56 - Osf_Namespace_A fix
+ * Description 55 - Osf_Namespace_A fix
*/
tSCC zOsf_Namespace_AName[] =
"Osf_Namespace_A";
@@ -2056,7 +2012,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 57 - Osf_Namespace_B fix
+ * Description 56 - Osf_Namespace_B fix
*/
tSCC zOsf_Namespace_BName[] =
"Osf_Namespace_B";
@@ -2102,7 +2058,7 @@ typedef __regmatch_t\tregmatch_t;\n",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 58 - Pthread_Page_Size fix
+ * Description 57 - Pthread_Page_Size fix
*/
tSCC zPthread_Page_SizeName[] =
"Pthread_Page_Size";
@@ -2136,7 +2092,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 59 - Rs6000_Double fix
+ * Description 58 - Rs6000_Double fix
*/
tSCC zRs6000_DoubleName[] =
"Rs6000_Double";
@@ -2173,7 +2129,7 @@ const char* apzRs6000_DoublePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 60 - Rs6000_Fchmod fix
+ * Description 59 - Rs6000_Fchmod fix
*/
tSCC zRs6000_FchmodName[] =
"Rs6000_Fchmod";
@@ -2207,7 +2163,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 61 - Rs6000_Param fix
+ * Description 60 - Rs6000_Param fix
*/
tSCC zRs6000_ParamName[] =
"Rs6000_Param";
@@ -2233,7 +2189,7 @@ const char* apzRs6000_ParamPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 62 - Sony_Include fix
+ * Description 61 - Sony_Include fix
*/
tSCC zSony_IncludeName[] =
"Sony_Include";
@@ -2267,7 +2223,7 @@ const char* apzSony_IncludePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 63 - Statsswtch fix
+ * Description 62 - Statsswtch fix
*/
tSCC zStatsswtchName[] =
"Statsswtch";
@@ -2301,7 +2257,7 @@ const char* apzStatsswtchPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 64 - Stdio_Va_List fix
+ * Description 63 - Stdio_Va_List fix
*/
tSCC zStdio_Va_ListName[] =
"Stdio_Va_List";
@@ -2344,7 +2300,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 65 - Sun_Bogus_Ifdef fix
+ * Description 64 - Sun_Bogus_Ifdef fix
*/
tSCC zSun_Bogus_IfdefName[] =
"Sun_Bogus_Ifdef";
@@ -2378,7 +2334,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 66 - Sun_Bogus_Ifdef_Sun4c fix
+ * Description 65 - Sun_Bogus_Ifdef_Sun4c fix
*/
tSCC zSun_Bogus_Ifdef_Sun4cName[] =
"Sun_Bogus_Ifdef_Sun4c";
@@ -2412,7 +2368,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 67 - Sun_Catmacro fix
+ * Description 66 - Sun_Catmacro fix
*/
tSCC zSun_CatmacroName[] =
"Sun_Catmacro";
@@ -2430,7 +2386,7 @@ tSCC zSun_CatmacroList[] =
* content selection pattern - do fix if pattern found
*/
tSCC zSun_CatmacroSelect0[] =
- "^#define[ \t]+CAT(a,b)";
+ "^#define[ \t]+CAT\\(a,b\\)";
#define SUN_CATMACRO_TEST_CT 1
#define SUN_CATMACRO_RE_CT 1
@@ -2451,7 +2407,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 68 - Sun_Malloc fix
+ * Description 67 - Sun_Malloc fix
*/
tSCC zSun_MallocName[] =
"Sun_Malloc";
@@ -2480,7 +2436,7 @@ const char* apzSun_MallocPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 69 - Sun_Memcpy fix
+ * Description 68 - Sun_Memcpy fix
*/
tSCC zSun_MemcpyName[] =
"Sun_Memcpy";
@@ -2534,7 +2490,7 @@ extern int memcmp();\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 70 - Sun_Rusers_Semi fix
+ * Description 69 - Sun_Rusers_Semi fix
*/
tSCC zSun_Rusers_SemiName[] =
"Sun_Rusers_Semi";
@@ -2568,7 +2524,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 71 - Sun_Signal fix
+ * Description 70 - Sun_Signal fix
*/
tSCC zSun_SignalName[] =
"Sun_Signal";
@@ -2607,7 +2563,7 @@ void\t(*signal(...))(...);\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 72 - Sun_Auth_Proto fix
+ * Description 71 - Sun_Auth_Proto fix
*/
tSCC zSun_Auth_ProtoName[] =
"Sun_Auth_Proto";
@@ -2627,16 +2583,9 @@ tSCC zSun_Auth_ProtoList[] =
tSCC zSun_Auth_ProtoSelect0[] =
"\\(\\*[a-z][a-z_]*\\)\\(\\)";
-/*
- * content bypass pattern - skip fix if pattern found
- */
-tSCC zSun_Auth_ProtoBypass0[] =
- "\\(\\*[a-z][a-z_]*\\)\\([ \t]*[a-zA-Z.].*\\)";
-
-#define SUN_AUTH_PROTO_TEST_CT 2
-#define SUN_AUTH_PROTO_RE_CT 2
+#define SUN_AUTH_PROTO_TEST_CT 1
+#define SUN_AUTH_PROTO_RE_CT 1
tTestDesc aSun_Auth_ProtoTests[] = {
- { TT_NEGREP, zSun_Auth_ProtoBypass0, (regex_t*)NULL },
{ TT_EGREP, zSun_Auth_ProtoSelect0, (regex_t*)NULL }, };
/*
@@ -2653,7 +2602,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 73 - Sunos_Matherr_Decl fix
+ * Description 72 - Sunos_Matherr_Decl fix
*/
tSCC zSunos_Matherr_DeclName[] =
"Sunos_Matherr_Decl";
@@ -2681,7 +2630,7 @@ struct exception;\n",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 74 - Sunos_Strlen fix
+ * Description 73 - Sunos_Strlen fix
*/
tSCC zSunos_StrlenName[] =
"Sunos_Strlen";
@@ -2707,7 +2656,7 @@ const char* apzSunos_StrlenPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 75 - Systypes fix
+ * Description 74 - Systypes fix
*/
tSCC zSystypesName[] =
"Systypes";
@@ -2765,7 +2714,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 76 - Systypes_For_Aix fix
+ * Description 75 - Systypes_For_Aix fix
*/
tSCC zSystypes_For_AixName[] =
"Systypes_For_Aix";
@@ -2810,7 +2759,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 77 - Sysv68_String fix
+ * Description 76 - Sysv68_String fix
*/
tSCC zSysv68_StringName[] =
"Sysv68_String";
@@ -2846,7 +2795,7 @@ extern unsigned int\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 78 - Sysz_Stdlib_For_Sun fix
+ * Description 77 - Sysz_Stdlib_For_Sun fix
*/
tSCC zSysz_Stdlib_For_SunName[] =
"Sysz_Stdlib_For_Sun";
@@ -2882,7 +2831,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 79 - Sysz_Stdtypes_For_Sun fix
+ * Description 78 - Sysz_Stdtypes_For_Sun fix
*/
tSCC zSysz_Stdtypes_For_SunName[] =
"Sysz_Stdtypes_For_Sun";
@@ -2922,7 +2871,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 80 - Tinfo_Cplusplus fix
+ * Description 79 - Tinfo_Cplusplus fix
*/
tSCC zTinfo_CplusplusName[] =
"Tinfo_Cplusplus";
@@ -2948,7 +2897,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 81 - Ultrix_Ansi_Compat fix
+ * Description 80 - Ultrix_Ansi_Compat fix
*/
tSCC zUltrix_Ansi_CompatName[] =
"Ultrix_Ansi_Compat";
@@ -2984,7 +2933,7 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 82 - Ultrix_Fix_Fixproto fix
+ * Description 81 - Ultrix_Fix_Fixproto fix
*/
tSCC zUltrix_Fix_FixprotoName[] =
"Ultrix_Fix_Fixproto";
@@ -3019,7 +2968,7 @@ struct utsname;\n",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 83 - Ultrix_Atof_Param fix
+ * Description 82 - Ultrix_Atof_Param fix
*/
tSCC zUltrix_Atof_ParamName[] =
"Ultrix_Atof_Param";
@@ -3049,7 +2998,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 84 - Ultrix_Const fix
+ * Description 83 - Ultrix_Const fix
*/
tSCC zUltrix_ConstName[] =
"Ultrix_Const";
@@ -3083,7 +3032,7 @@ const char* apzUltrix_ConstPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 85 - Ultrix_Ifdef fix
+ * Description 84 - Ultrix_Ifdef fix
*/
tSCC zUltrix_IfdefName[] =
"Ultrix_Ifdef";
@@ -3117,7 +3066,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 86 - Ultrix_Nested_Cmnt fix
+ * Description 85 - Ultrix_Nested_Cmnt fix
*/
tSCC zUltrix_Nested_CmntName[] =
"Ultrix_Nested_Cmnt";
@@ -3143,7 +3092,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 87 - Ultrix_Static fix
+ * Description 86 - Ultrix_Static fix
*/
tSCC zUltrix_StaticName[] =
"Ultrix_Static";
@@ -3179,7 +3128,7 @@ const char* apzUltrix_StaticPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 88 - Undefine_Null fix
+ * Description 87 - Undefine_Null fix
*/
tSCC zUndefine_NullName[] =
"Undefine_Null";
@@ -3220,7 +3169,7 @@ const char* apzUndefine_NullPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 89 - Va_I960_Macro fix
+ * Description 88 - Va_I960_Macro fix
*/
tSCC zVa_I960_MacroName[] =
"Va_I960_Macro";
@@ -3257,7 +3206,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 90 - Void_Null fix
+ * Description 89 - Void_Null fix
*/
tSCC zVoid_NullName[] =
"Void_Null";
@@ -3291,7 +3240,7 @@ const char* apzVoid_NullPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 91 - Vxworks_Gcc_Problem fix
+ * Description 90 - Vxworks_Gcc_Problem fix
*/
tSCC zVxworks_Gcc_ProblemName[] =
"Vxworks_Gcc_Problem";
@@ -3340,7 +3289,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 92 - Vxworks_Needs_Vxtypes fix
+ * Description 91 - Vxworks_Needs_Vxtypes fix
*/
tSCC zVxworks_Needs_VxtypesName[] =
"Vxworks_Needs_Vxtypes";
@@ -3374,7 +3323,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 93 - Vxworks_Needs_Vxworks fix
+ * Description 92 - Vxworks_Needs_Vxworks fix
*/
tSCC zVxworks_Needs_VxworksName[] =
"Vxworks_Needs_Vxworks";
@@ -3422,7 +3371,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 94 - Vxworks_Time fix
+ * Description 93 - Vxworks_Time fix
*/
tSCC zVxworks_TimeName[] =
"Vxworks_Time";
@@ -3472,7 +3421,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 95 - X11_Class fix
+ * Description 94 - X11_Class fix
*/
tSCC zX11_ClassName[] =
"X11_Class";
@@ -3511,7 +3460,7 @@ const char* apzX11_ClassPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 96 - X11_Class_Usage fix
+ * Description 95 - X11_Class_Usage fix
*/
tSCC zX11_Class_UsageName[] =
"X11_Class_Usage";
@@ -3545,7 +3494,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 97 - X11_New fix
+ * Description 96 - X11_New fix
*/
tSCC zX11_NewName[] =
"X11_New";
@@ -3585,7 +3534,7 @@ const char* apzX11_NewPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 98 - X11_Sprintf fix
+ * Description 97 - X11_Sprintf fix
*/
tSCC zX11_SprintfName[] =
"X11_Sprintf";
@@ -3613,7 +3562,7 @@ extern char *\tsprintf();\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 99 - Zzz_Ki_Iface fix
+ * Description 98 - Zzz_Ki_Iface fix
*/
tSCC zZzz_Ki_IfaceName[] =
"Zzz_Ki_Iface";
@@ -3649,7 +3598,7 @@ cat > /dev/null",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 100 - Zzz_Ki fix
+ * Description 99 - Zzz_Ki fix
*/
tSCC zZzz_KiName[] =
"Zzz_Ki";
@@ -3685,7 +3634,7 @@ cat > /dev/null",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 101 - Zzz_Ki_Calls fix
+ * Description 100 - Zzz_Ki_Calls fix
*/
tSCC zZzz_Ki_CallsName[] =
"Zzz_Ki_Calls";
@@ -3721,7 +3670,7 @@ cat > /dev/null",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 102 - Zzz_Ki_Defs fix
+ * Description 101 - Zzz_Ki_Defs fix
*/
tSCC zZzz_Ki_DefsName[] =
"Zzz_Ki_Defs";
@@ -3757,7 +3706,7 @@ cat > /dev/null",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 103 - Zzz_Bad_Fixes fix
+ * Description 102 - Zzz_Bad_Fixes fix
*/
tSCC zZzz_Bad_FixesName[] =
"Zzz_Bad_Fixes";
@@ -3785,7 +3734,7 @@ cat > /dev/null",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description 104 - Zzz_Time fix
+ * Description 103 - Zzz_Time fix
*/
tSCC zZzz_TimeName[] =
"Zzz_Time";
@@ -3823,8 +3772,8 @@ cat > /dev/null",
*
* List of all fixes
*/
-#define REGEX_COUNT 76
-#define FIX_COUNT 104
+#define REGEX_COUNT 73
+#define FIX_COUNT 103
tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAix_SyswaitName, zAix_SyswaitList,
apzAix_SyswaitMachs, (regex_t*)NULL,
@@ -3921,15 +3870,10 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SCO5_STAT_WRAPPERS_TEST_CT, FD_MACH_ONLY,
aSco5_Stat_WrappersTests, apzSco5_Stat_WrappersPatch },
- { zElse_LabelName, zElse_LabelList,
- apzElse_LabelMachs, (regex_t*)NULL,
- ELSE_LABEL_TEST_CT, FD_MACH_ONLY,
- aElse_LabelTests, apzElse_LabelPatch },
-
- { zEndif_LabelName, zEndif_LabelList,
- apzEndif_LabelMachs, (regex_t*)NULL,
- ENDIF_LABEL_TEST_CT, FD_MACH_ONLY,
- aEndif_LabelTests, apzEndif_LabelPatch },
+ { zEnd_Else_LabelName, zEnd_Else_LabelList,
+ apzEnd_Else_LabelMachs, (regex_t*)NULL,
+ END_ELSE_LABEL_TEST_CT, FD_MACH_ONLY,
+ aEnd_Else_LabelTests, apzEnd_Else_LabelPatch },
{ zHp_InlineName, zHp_InlineList,
apzHp_InlineMachs, (regex_t*)NULL,
diff --git a/gnu/egcs/gcc/fixinc/inclhack.def b/gnu/egcs/gcc/fixinc/inclhack.def
index 0695368e232..7a9e305adb1 100644
--- a/gnu/egcs/gcc/fixinc/inclhack.def
+++ b/gnu/egcs/gcc/fixinc/inclhack.def
@@ -185,7 +185,6 @@ fix = {
*/
fix = {
hackname = bad_lval;
- select = "^[ \t]*#[ \t]*pragma[ \t]extern_prefix";
files = libgen.h;
files = dirent.h;
files = ftw.h;
@@ -351,7 +350,7 @@ fix = {
* Also, only accept double slashes that are not part of URL's
* and are not the end of a quoted string.
*/
- test = '-z `echo ${file} | egrep \'(CC|cxx|\+\+)/\' `';
+ test = ' -z "`echo ${file} | egrep \'(CC|cxx|\+\+)/\'`"';
select = '(^|[^:])//[^"*]';
sed = 's,^//.*$,,';
sed = 's,[^:]//[^"].*$,,';
@@ -392,43 +391,32 @@ fix = {
/*
- * Fix else directives that contain non-commentary text
- *
- * The fixinc_eol stuff is to work around a bug in the sed
+ * Fix else and endif directives that contain non-commentary text
*/
fix = {
- hackname = else_label;
- select = "^[ \t]*#[ \t]*else[ \t]+[!-.0-~]";
- sed = ":loop\n"
- '/\\\\$/' "N\n"
- 's/\\\\$/\\\\+++fixinc_eol+++/' "\n"
- '/\\\\$/' "b loop\n"
- 's/\\\\+++fixinc_eol+++/\\\\/g' "\n"
-
- "s%^\\([ \t]*#[ \t]*else\\)[ \t]*/[^*].*%\\1%\n"
- "s%^\\([ \t]*#[ \t]*else\\)[ \t]*[^/ \t].*%\\1%";
-};
+ hackname = end_else_label;
-
-/*
- * Fix endif directives that contain non-commentary text
- */
-fix = {
- hackname = endif_label;
/*
- * Select files that contain '#endif' directives with
+ * Select files that contain '#endif' or '#else' directives with
* some sort of following junk. (Between the ascii '.'
* and '0' lies the character '/'. This will *NOT*
* match '#endif / * foo * /', but it also wont match
* '#endif / done' either.
*
- * We use the pattern [!-.0-z{|}~] instead of [^/ \t] to match a noncomment
- * following #else or #endif because some buggy egreps think [^/] matches
- * newline, and they thus think `#else ' matches
+ * We have a second regexp in the selector to detect
+ * #endif followed by a / followed by anything other
+ * than a *. For example "#endif / * foo * /" or
+ * "#endif /% blah %/ which appear on OSF4.0A and AIX4.2
+ * repsectively.
+ *
+ * We use the pattern [!-.0-z{|}~] instead of [^/ \t] to match a
+ * noncomment following #else or #endif because some buggy egreps
+ * think [^/] matches newline, and they thus think `#else ' matches
* `#e[ndiflse]*[ \t]+[^/ \t]'.
* [!-.0-~] does not work properly on AIX 4.1.
*/
- select = "^[ \t]*#[ \t]*endif[ \t]+[!-.0-z\{\|\}\~]";
+ select = "^[ \t]*#[ \t]*(else|endif)[ \t]+"
+ "(" '[!-.0-z\{\|\}\~]' "|" '/[^\*]' ")";
/*
* First, join the continued input lines.
@@ -446,9 +434,11 @@ fix = {
'/\\\\$/' "b loop\n"
's/\\\\+++fixinc_eol+++/\\\\/g' "\n"
- "s%^\\([ \t]*#[ \t]*endif\\)[ \t]*/[^*].*%\\1%\n"
- "s%^\\([ \t]*#[ \t]*endif\\)[ \t]*\\*[^/].*%\\1%\n"
- "s%^\\([ \t]*#[ \t]*endif\\)[ \t]*[^/* \t].*%\\1%";
+ "s%^\\([ \t]*#[ \t]*else\\)[ \t][ \t]*/[^*].*%\\1%\n"
+ "s%^\\([ \t]*#[ \t]*else\\)[ \t][ \t]*[^/ \t].*%\\1%\n"
+ "s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*/[^*].*%\\1%\n"
+ "s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*\*[^/].*%\\1%\n"
+ "s%^\\([ \t]*#[ \t]*endif\\)[ \t][ \t]*[^/* \t].*%\\1%";
};
@@ -588,10 +578,20 @@ fix = {
/*
* Fix CTRL macros
+ *
+ * Basically, what is supposed to be happening is that every
+ * _invocation_ of the "_CTRL()" or "CTRL()" macros is supposed to have
+ * its argument inserted into single quotes. We _must_ do this because
+ * ANSI macro substitution rules prohibit looking inside quoted strings
+ * for the substitution names. A side effect is that the quotes are
+ * inserted in the definitions of those macros as well. So, the last
+ * three sed expressions are supposed to clean up the definitions, as
+ * long as those definitions are using "c", "g" or "x" as the macro
+ * argument :). Yuck.
*/
fix = {
hackname = ioctl_fix_ctrl;
- select = "CTRL[ \t]";
+ select = "CTRL[ \t]*\\(";
sed = "/[^A-Z0-9_]CTRL[ \t]*(/"
"s/\\([^']\\))/'\\1')/";
@@ -607,6 +607,9 @@ fix = {
sed = "/#[ \t]*define[ \t]*[ \t]BSD43_CTRL/"
"s/'\\([cgx]\\)'/\\1/g";
+
+ sed = "/#[ \t]*define[ \t]*[ \t]_*ISCTRL/"
+ "s/'\\([cgx]\\)'/\\1/g";
};
@@ -1404,7 +1407,7 @@ fix = {
fix = {
hackname = sun_catmacro;
files = pixrect/memvar.h;
- select = "^#define[ \t]+CAT(a,b)";
+ select = "^#define[ \t]+CAT\\(a,b\\)";
sed = "/^#define[ \t]CAT(a,b)/ i\\\n"
"#ifdef __STDC__ \\\n"
"#define CAT(a,b) a##b\\\n"
@@ -1508,12 +1511,9 @@ fix = {
files = rpc/svc.h;
files = rpc/xdr.h;
/*
- * Select those files containing '(*name)()' but *not*
- * containing '(*name)(junk)'. The change would be innocuous
- * but there is no point bothering if the fix is not needed.
+ * Select those files containing '(*name)()'.
*/
select = '\(\*[a-z][a-z_]*\)\(\)';
- bypass = '\(\*[a-z][a-z_]*\)\(' "[ \t]*[a-zA-Z.].*" '\)';
sed = 's'
'/^\(.*(\*[a-z][a-z_]*)(\)' '\();.*\)'
"/\\\n"
diff --git a/gnu/egcs/gcc/fixinc/inclhack.sh b/gnu/egcs/gcc/fixinc/inclhack.sh
index fda21b63820..6be26e98b8d 100644
--- a/gnu/egcs/gcc/fixinc/inclhack.sh
+++ b/gnu/egcs/gcc/fixinc/inclhack.sh
@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
-# This script contains 104 fixup scripts.
+# This script contains 103 fixup scripts.
#
# See README-fixinc for more information.
#
@@ -638,8 +638,6 @@ struct rusage;
./stropts.h | \
./time.h | \
./unistd.h )
- if ( test -n "`egrep '^[ ]*#[ ]*pragma[ ]extern_prefix' ${file}`"
- ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
bad_lval"
if [ ! -r ${DESTFILE} ]
@@ -650,7 +648,6 @@ struct rusage;
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
- fi # end of selection 'if'
;; # case end for file name test
esac
@@ -751,7 +748,7 @@ struct rusage;
# Fix 17: No_Double_Slash
#
if ( test -n "`egrep '(^|[^:])//[^\"*]' ${file}`" -a \
- '(' -z `echo ${file} | egrep '(CC|cxx|\+\+)/' ` ')'
+ '(' -z "`echo ${file} | egrep '(CC|cxx|\+\+)/'`" ')'
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
no_double_slash"
@@ -818,36 +815,12 @@ extern "C"\
#
- # Fix 20: Else_Label
- #
- if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' ${file}`"
- ) > /dev/null 2>&1 ; then
- fixlist="${fixlist}
- else_label"
- if [ ! -r ${DESTFILE} ]
- then infile=${file}
- else infile=${DESTFILE} ; fi
-
- sed -e ':loop
-/\\$/N
-s/\\$/\\+++fixinc_eol+++/
-/\\$/b loop
-s/\\+++fixinc_eol+++/\\/g
-s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1%
-s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \
- < $infile > ${DESTDIR}/fixinc.tmp
- rm -f ${DESTFILE}
- mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
- fi # end of selection 'if'
-
-
- #
- # Fix 21: Endif_Label
+ # Fix 20: End_Else_Label
#
- if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-z{|}~]' ${file}`"
+ if ( test -n "`egrep '^[ ]*#[ ]*(else|endif)[ ]+([!-.0-z\\{\\|\\}\\~]|/[^\\*])' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
- endif_label"
+ end_else_label"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
@@ -857,9 +830,11 @@ s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \
s/\\$/\\+++fixinc_eol+++/
/\\$/b loop
s/\\+++fixinc_eol+++/\\/g
-s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1%
-s%^\([ ]*#[ ]*endif\)[ ]*\*[^/].*%\1%
-s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
+s%^\([ ]*#[ ]*else\)[ ][ ]*/[^*].*%\1%
+s%^\([ ]*#[ ]*else\)[ ][ ]*[^/ ].*%\1%
+s%^\([ ]*#[ ]*endif\)[ ][ ]*/[^*].*%\1%
+s%^\([ ]*#[ ]*endif\)[ ][ ]**[^/].*%\1%
+s%^\([ ]*#[ ]*endif\)[ ][ ]*[^/* ].*%\1%' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
@@ -867,7 +842,7 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
#
- # Fix 22: Hp_Inline
+ # Fix 21: Hp_Inline
#
case "${file}" in ./sys/spinlock.h )
if ( test -n "`egrep 'include.*\"\\.\\./machine/' ${file}`"
@@ -889,7 +864,7 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
#
- # Fix 23: Hp_Sysfile
+ # Fix 22: Hp_Sysfile
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep 'HPUX_SOURCE' ${file}`"
@@ -910,7 +885,7 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
#
- # Fix 24: Cxx_Unready
+ # Fix 23: Cxx_Unready
#
case "${file}" in ./sys/mman.h | \
./rpc/types.h )
@@ -942,7 +917,7 @@ extern "C" {\
#
- # Fix 25: Hpux_Maxint
+ # Fix 24: Hpux_Maxint
#
case "${file}" in ./sys/param.h )
fixlist="${fixlist}
@@ -965,7 +940,7 @@ extern "C" {\
#
- # Fix 26: Hpux_Systime
+ # Fix 25: Hpux_Systime
#
case "${file}" in ./sys/time.h )
if ( test -n "`egrep '^extern struct sigevent;' ${file}`"
@@ -986,7 +961,7 @@ extern "C" {\
#
- # Fix 27: Interactv_Add1
+ # Fix 26: Interactv_Add1
#
case "${file}" in ./stdio.h | \
./math.h | \
@@ -1013,7 +988,7 @@ extern "C" {\
#
- # Fix 28: Interactv_Add2
+ # Fix 27: Interactv_Add2
#
case "${file}" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
@@ -1035,7 +1010,7 @@ extern "C" {\
#
- # Fix 29: Interactv_Add3
+ # Fix 28: Interactv_Add3
#
case "${file}" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
@@ -1058,7 +1033,7 @@ extern "C" {\
#
- # Fix 30: Io_Def_Quotes
+ # Fix 29: Io_Def_Quotes
#
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then
@@ -1079,9 +1054,9 @@ extern "C" {\
#
- # Fix 31: Ioctl_Fix_Ctrl
+ # Fix 30: Ioctl_Fix_Ctrl
#
- if ( test -n "`egrep 'CTRL[ ]' ${file}`"
+ if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
ioctl_fix_ctrl"
@@ -1094,6 +1069,7 @@ extern "C" {\
-e '/#[ ]*define[ ]*[ ]CTRL/s/'\''\([cgx]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' \
+ -e '/#[ ]*define[ ]*[ ]_*ISCTRL/s/'\''\([cgx]\)'\''/\1/g' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
@@ -1101,7 +1077,7 @@ extern "C" {\
#
- # Fix 32: Ip_Missing_Semi
+ # Fix 31: Ip_Missing_Semi
#
case "${file}" in ./netinet/ip.h )
fixlist="${fixlist}
@@ -1119,7 +1095,7 @@ extern "C" {\
#
- # Fix 33: Irix_Multiline_Cmnt
+ # Fix 32: Irix_Multiline_Cmnt
#
case "${file}" in ./sys/types.h )
fixlist="${fixlist}
@@ -1138,7 +1114,7 @@ extern "C" {\
#
- # Fix 34: Irix_Sockaddr
+ # Fix 33: Irix_Sockaddr
#
case "${file}" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
@@ -1161,7 +1137,7 @@ struct sockaddr;
#
- # Fix 35: Irix_Struct__File
+ # Fix 34: Irix_Struct__File
#
case "${file}" in ./rpc/xdr.h )
fixlist="${fixlist}
@@ -1181,7 +1157,7 @@ struct __file_s;
#
- # Fix 36: Isc_Fmod
+ # Fix 35: Isc_Fmod
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
@@ -1202,7 +1178,7 @@ struct __file_s;
#
- # Fix 37: Motorola_Nested
+ # Fix 36: Motorola_Nested
#
case "${file}" in ./limits.h | \
./sys/limits.h )
@@ -1225,7 +1201,7 @@ struct __file_s;
#
- # Fix 38: Isc_Sys_Limits
+ # Fix 37: Isc_Sys_Limits
#
case "${file}" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' ${file}`"
@@ -1247,7 +1223,7 @@ struct __file_s;
#
- # Fix 39: Kandr_Concat
+ # Fix 38: Kandr_Concat
#
case "${file}" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \
@@ -1285,7 +1261,7 @@ struct __file_s;
#
- # Fix 40: Limits_Ifndefs
+ # Fix 39: Limits_Ifndefs
#
case "${file}" in ./limits.h | \
./sys/limits.h )
@@ -1343,7 +1319,7 @@ struct __file_s;
#
- # Fix 41: Lynx_Void_Int
+ # Fix 40: Lynx_Void_Int
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`"
@@ -1364,7 +1340,7 @@ struct __file_s;
#
- # Fix 42: Lynxos_Fcntl_Proto
+ # Fix 41: Lynxos_Fcntl_Proto
#
case "${file}" in ./fcntl.h )
if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
@@ -1385,7 +1361,7 @@ struct __file_s;
#
- # Fix 43: M88k_Bad_Hypot_Opt
+ # Fix 42: M88k_Bad_Hypot_Opt
#
case "${file}" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
@@ -1420,7 +1396,7 @@ static __inline__ double fake_hypot (x, y)\
#
- # Fix 44: M88k_Bad_S_If
+ # Fix 43: M88k_Bad_S_If
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* )
@@ -1445,7 +1421,7 @@ static __inline__ double fake_hypot (x, y)\
#
- # Fix 45: M88k_Multi_Incl
+ # Fix 44: M88k_Multi_Incl
#
case "${file}" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* )
@@ -1478,7 +1454,7 @@ static __inline__ double fake_hypot (x, y)\
#
- # Fix 46: Machine_Name
+ # Fix 45: Machine_Name
#
if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' ${file}`"
) > /dev/null 2>&1 ; then
@@ -1530,7 +1506,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 47: Math_Exception
+ # Fix 46: Math_Exception
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'struct exception' ${file}`"
@@ -1570,7 +1546,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 48: Math_Gcc_Ifndefs
+ # Fix 47: Math_Gcc_Ifndefs
#
case "${file}" in ./math.h )
fixlist="${fixlist}
@@ -1604,7 +1580,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 49: Nested_Comment
+ # Fix 48: Nested_Comment
#
case "${file}" in ./rpc/rpc.h )
fixlist="${fixlist}
@@ -1622,7 +1598,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 50: News_Os_Recursion
+ # Fix 49: News_Os_Recursion
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
@@ -1648,7 +1624,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 51: Next_Math_Prefix
+ # Fix 50: Next_Math_Prefix
#
case "${file}" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
@@ -1673,7 +1649,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 52: Next_Template
+ # Fix 51: Next_Template
#
case "${file}" in ./bsd/libc.h )
if ( test -n "`egrep 'template' ${file}`"
@@ -1695,7 +1671,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 53: Next_Volitile
+ # Fix 52: Next_Volitile
#
case "${file}" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' ${file}`"
@@ -1717,7 +1693,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 54: Next_Wait_Union
+ # Fix 53: Next_Wait_Union
#
case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' ${file}`"
@@ -1738,7 +1714,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 55: Nodeent_Syntax
+ # Fix 54: Nodeent_Syntax
#
case "${file}" in ./netdnet/dnetdb.h )
fixlist="${fixlist}
@@ -1756,7 +1732,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 56: Osf_Namespace_A
+ # Fix 55: Osf_Namespace_A
#
case "${file}" in ./reg_types.h | \
./sys/lc_core.h )
@@ -1783,7 +1759,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 57: Osf_Namespace_B
+ # Fix 56: Osf_Namespace_B
#
case "${file}" in ./regex.h )
if ( test '(' -r reg_types.h ')' -a \
@@ -1811,7 +1787,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 58: Pthread_Page_Size
+ # Fix 57: Pthread_Page_Size
#
case "${file}" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' ${file}`"
@@ -1832,7 +1808,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 59: Rs6000_Double
+ # Fix 58: Rs6000_Double
#
case "${file}" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
@@ -1858,7 +1834,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 60: Rs6000_Fchmod
+ # Fix 59: Rs6000_Fchmod
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' ${file}`"
@@ -1879,7 +1855,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 61: Rs6000_Param
+ # Fix 60: Rs6000_Param
#
case "${file}" in ./stdio.h | \
./unistd.h )
@@ -1898,7 +1874,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 62: Sony_Include
+ # Fix 61: Sony_Include
#
case "${file}" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`"
@@ -1919,7 +1895,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 63: Statsswtch
+ # Fix 62: Statsswtch
#
case "${file}" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' ${file}`"
@@ -1940,7 +1916,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 64: Stdio_Va_List
+ # Fix 63: Stdio_Va_List
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
@@ -1979,7 +1955,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 65: Sun_Bogus_Ifdef
+ # Fix 64: Sun_Bogus_Ifdef
#
case "${file}" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h )
@@ -2001,7 +1977,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 66: Sun_Bogus_Ifdef_Sun4c
+ # Fix 65: Sun_Bogus_Ifdef_Sun4c
#
case "${file}" in ./hsfs/hsnode.h )
if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`"
@@ -2022,10 +1998,10 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 67: Sun_Catmacro
+ # Fix 66: Sun_Catmacro
#
case "${file}" in ./pixrect/memvar.h )
- if ( test -n "`egrep '^#define[ ]+CAT(a,b)' ${file}`"
+ if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
sun_catmacro"
@@ -2050,7 +2026,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 68: Sun_Malloc
+ # Fix 67: Sun_Malloc
#
case "${file}" in ./malloc.h )
fixlist="${fixlist}
@@ -2071,7 +2047,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 69: Sun_Memcpy
+ # Fix 68: Sun_Memcpy
#
case "${file}" in ./memory.h )
if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' ${file}`"
@@ -2113,7 +2089,7 @@ extern int memcmp();\
#
- # Fix 70: Sun_Rusers_Semi
+ # Fix 69: Sun_Rusers_Semi
#
case "${file}" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' ${file}`"
@@ -2134,7 +2110,7 @@ extern int memcmp();\
#
- # Fix 71: Sun_Signal
+ # Fix 70: Sun_Signal
#
case "${file}" in ./sys/signal.h | \
./signal.h )
@@ -2163,14 +2139,13 @@ void (*signal(...))(...);\
#
- # Fix 72: Sun_Auth_Proto
+ # Fix 71: Sun_Auth_Proto
#
case "${file}" in ./rpc/auth.h | \
./rpc/clnt.h | \
./rpc/svc.h | \
./rpc/xdr.h )
- if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' ${file}`" -a \
- -z "`egrep '\\(\\*[a-z][a-z_]*\\)\\([ ]*[a-zA-Z.].*\\)' ${file}`"
+ if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
sun_auth_proto"
@@ -2193,7 +2168,7 @@ void (*signal(...))(...);\
#
- # Fix 73: Sunos_Matherr_Decl
+ # Fix 72: Sunos_Matherr_Decl
#
case "${file}" in ./math.h )
fixlist="${fixlist}
@@ -2214,7 +2189,7 @@ struct exception;
#
- # Fix 74: Sunos_Strlen
+ # Fix 73: Sunos_Strlen
#
case "${file}" in ./strings.h )
fixlist="${fixlist}
@@ -2232,7 +2207,7 @@ struct exception;
#
- # Fix 75: Systypes
+ # Fix 74: Systypes
#
case "${file}" in ./sys/types.h | \
./stdlib.h | \
@@ -2286,7 +2261,7 @@ typedef __SIZE_TYPE__ size_t;\
#
- # Fix 76: Systypes_For_Aix
+ # Fix 75: Systypes_For_Aix
#
case "${file}" in ./sys/types.h )
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`" -a \
@@ -2314,7 +2289,7 @@ typedef __SIZE_TYPE__ size_t;\
#
- # Fix 77: Sysv68_String
+ # Fix 76: Sysv68_String
#
case "${file}" in ./string.h )
fixlist="${fixlist}
@@ -2342,7 +2317,7 @@ extern unsigned int\
#
- # Fix 78: Sysz_Stdlib_For_Sun
+ # Fix 77: Sysz_Stdlib_For_Sun
#
case "${file}" in ./stdlib.h )
fixlist="${fixlist}
@@ -2372,7 +2347,7 @@ extern unsigned int\
#
- # Fix 79: Sysz_Stdtypes_For_Sun
+ # Fix 78: Sysz_Stdtypes_For_Sun
#
case "${file}" in ./sys/stdtypes.h )
fixlist="${fixlist}
@@ -2410,7 +2385,7 @@ extern unsigned int\
#
- # Fix 80: Tinfo_Cplusplus
+ # Fix 79: Tinfo_Cplusplus
#
case "${file}" in ./tinfo.h )
fixlist="${fixlist}
@@ -2428,7 +2403,7 @@ extern unsigned int\
#
- # Fix 81: Ultrix_Ansi_Compat
+ # Fix 80: Ultrix_Ansi_Compat
#
case "${file}" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
@@ -2452,7 +2427,7 @@ extern unsigned int\
#
- # Fix 82: Ultrix_Fix_Fixproto
+ # Fix 81: Ultrix_Fix_Fixproto
#
case "${file}" in ./sys/utsname.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
@@ -2475,7 +2450,7 @@ struct utsname;
#
- # Fix 83: Ultrix_Atof_Param
+ # Fix 82: Ultrix_Atof_Param
#
case "${file}" in ./math.h )
fixlist="${fixlist}
@@ -2497,7 +2472,7 @@ struct utsname;
#
- # Fix 84: Ultrix_Const
+ # Fix 83: Ultrix_Const
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
@@ -2523,7 +2498,7 @@ struct utsname;
#
- # Fix 85: Ultrix_Ifdef
+ # Fix 84: Ultrix_Ifdef
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
@@ -2544,7 +2519,7 @@ struct utsname;
#
- # Fix 86: Ultrix_Nested_Cmnt
+ # Fix 85: Ultrix_Nested_Cmnt
#
case "${file}" in ./rpc/svc.h )
fixlist="${fixlist}
@@ -2562,7 +2537,7 @@ struct utsname;
#
- # Fix 87: Ultrix_Static
+ # Fix 86: Ultrix_Static
#
case "${file}" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
@@ -2585,7 +2560,7 @@ struct utsname;
#
- # Fix 88: Undefine_Null
+ # Fix 87: Undefine_Null
#
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`" -a \
-z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`"
@@ -2606,7 +2581,7 @@ struct utsname;
#
- # Fix 89: Va_I960_Macro
+ # Fix 88: Va_I960_Macro
#
case "${file}" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`"
@@ -2630,7 +2605,7 @@ struct utsname;
#
- # Fix 90: Void_Null
+ # Fix 89: Void_Null
#
case "${file}" in ./curses.h | \
./dbm.h | \
@@ -2661,7 +2636,7 @@ struct utsname;
#
- # Fix 91: Vxworks_Gcc_Problem
+ # Fix 90: Vxworks_Gcc_Problem
#
case "${file}" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`"
@@ -2703,7 +2678,7 @@ struct utsname;
#
- # Fix 92: Vxworks_Needs_Vxtypes
+ # Fix 91: Vxworks_Needs_Vxtypes
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`"
@@ -2724,7 +2699,7 @@ struct utsname;
#
- # Fix 93: Vxworks_Needs_Vxworks
+ # Fix 92: Vxworks_Needs_Vxworks
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`" -a \
@@ -2750,7 +2725,7 @@ struct utsname;
#
- # Fix 94: Vxworks_Time
+ # Fix 93: Vxworks_Time
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`" -a \
@@ -2782,7 +2757,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 95: X11_Class
+ # Fix 94: X11_Class
#
case "${file}" in ./X11/ShellP.h )
if ( test -z "`egrep '__cplusplus' ${file}`"
@@ -2810,7 +2785,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 96: X11_Class_Usage
+ # Fix 95: X11_Class_Usage
#
case "${file}" in ./Xm/BaseClassI.h )
if ( test -z "`egrep '__cplusplus' ${file}`"
@@ -2831,7 +2806,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 97: X11_New
+ # Fix 96: X11_New
#
case "${file}" in ./Xm/Traversal.h )
if ( test -z "`egrep '__cplusplus' ${file}`"
@@ -2860,7 +2835,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 98: X11_Sprintf
+ # Fix 97: X11_Sprintf
#
case "${file}" in ./X11*/Xmu.h )
fixlist="${fixlist}
@@ -2880,7 +2855,7 @@ extern char * sprintf();\
#
- # Fix 99: Zzz_Ki_Iface
+ # Fix 98: Zzz_Ki_Iface
#
case "${file}" in ./sys/ki_iface.h )
if ( test -n "`egrep 'These definitions are for HP Internal developers' ${file}`"
@@ -2907,7 +2882,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 100: Zzz_Ki
+ # Fix 99: Zzz_Ki
#
case "${file}" in ./sys/ki.h )
if ( test -n "`egrep '11.00 HP-UX LP64' ${file}`"
@@ -2934,7 +2909,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 101: Zzz_Ki_Calls
+ # Fix 100: Zzz_Ki_Calls
#
case "${file}" in ./sys/ki_calls.h )
if ( test -n "`egrep 'kthread_create_caller_t' ${file}`"
@@ -2961,7 +2936,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 102: Zzz_Ki_Defs
+ # Fix 101: Zzz_Ki_Defs
#
case "${file}" in ./sys/ki_defs.h )
if ( test -n "`egrep 'Kernel Instrumentation Definitions' ${file}`"
@@ -2988,7 +2963,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 103: Zzz_Bad_Fixes
+ # Fix 102: Zzz_Bad_Fixes
#
case "${file}" in ./sundev/ipi_error.h )
fixlist="${fixlist}
@@ -3012,7 +2987,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 104: Zzz_Time
+ # Fix 103: Zzz_Time
#
case "${file}" in ./sys/time.h )
if ( test -n "`egrep '11.0 and later representation of ki time' ${file}`"
@@ -3105,7 +3080,7 @@ find . -name DONE -exec rm -f '{}' ';'
echo 'Removing unneeded directories:'
cd $LIB
-all_dirs=`find . -type d -print | sort -r`
+all_dirs=`find . -type d \! -name '.' -print | sort -r`
for file in $all_dirs; do
rmdir $LIB/$file > /dev/null 2>&1
done
diff --git a/gnu/egcs/gcc/fixinc/inclhack.tpl b/gnu/egcs/gcc/fixinc/inclhack.tpl
index f5153bf0892..44f37981864 100644
--- a/gnu/egcs/gcc/fixinc/inclhack.tpl
+++ b/gnu/egcs/gcc/fixinc/inclhack.tpl
@@ -403,7 +403,7 @@ find . -name DONE -exec rm -f '{}' ';'
echo 'Removing unneeded directories:'
cd $LIB
-all_dirs=`find . -type d -print | sort -r`
+all_dirs=`find . -type d \! -name '.' -print | sort -r`
for file in $all_dirs; do
rmdir $LIB/$file > /dev/null 2>&1
done
diff --git a/gnu/egcs/gcc/fixincludes b/gnu/egcs/gcc/fixincludes
index c9a65218555..ea031833016 100644
--- a/gnu/egcs/gcc/fixincludes
+++ b/gnu/egcs/gcc/fixincludes
@@ -338,6 +338,7 @@ while [ $# != 0 ]; do
/#[ ]*define[ ]*[ ]CTRL/ s/'\''\([cgx]\)'\''/\1/g
/#[ ]*define[ ]*[ ]_CTRL/ s/'\''\([cgx]\)'\''/\1/g
/#[ ]*define.BSD43_CTRL/ s/'\''\([cgx]\)'\''/\1/g
+ /#[ ]*define[ ]*[ ][_]*ISCTRL/ s/'\''\([cgx]\)'\''/\1/g
/#[ ]*[el]*if/{
s/[a-zA-Z0-9_][a-zA-Z0-9_]*/ & /g
@@ -3242,7 +3243,7 @@ find . -name DONE -exec rm -f '{}' ';'
echo 'Removing unneeded directories:'
cd $LIB
-files=`find . -type d -print | sort -r`
+files=`find . -type d \! -name '.' -print | sort -r`
for file in $files; do
rmdir $LIB/$file > /dev/null 2>&1
done
diff --git a/gnu/egcs/gcc/haifa-sched.c b/gnu/egcs/gcc/haifa-sched.c
index 41a61c459cd..d4d2121a9d5 100644
--- a/gnu/egcs/gcc/haifa-sched.c
+++ b/gnu/egcs/gcc/haifa-sched.c
@@ -3952,16 +3952,11 @@ sched_analyze (head, tail)
{
for (u = reg_last_uses[i]; u; u = XEXP (u, 1))
add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
- reg_last_uses[i] = 0;
for (u = reg_last_sets[i]; u; u = XEXP (u, 1))
add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
- if (global_regs[i])
- for (u = reg_last_clobbers[i]; u; u = XEXP (u, 1))
- add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI);
-
- SET_REGNO_REG_SET (reg_pending_sets, i);
+ SET_REGNO_REG_SET (reg_pending_clobbers, i);
}
}
diff --git a/gnu/egcs/gcc/java/ChangeLog b/gnu/egcs/gcc/java/ChangeLog
index c396a8003ec..b2e151f2c30 100644
--- a/gnu/egcs/gcc/java/ChangeLog
+++ b/gnu/egcs/gcc/java/ChangeLog
@@ -1,3 +1,86 @@
+1999-06-29 Tom Tromey <tromey@cygnus.com>
+
+ * jvspec.c (lang_specific_driver): Recognize --help.
+
+Fri Jun 25 13:35:19 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.c: Rebuilt.
+
+ * parse.y (resolve_package): Fixed bogus return statement.
+ (patch_method_invocation): Resolve method invocation beginning with
+ a package name qualifier.
+
+ * parse.y (java_complete_lhs): When doing cross referencing, don't
+ try to keep file location on a WFL expanded as a CALL_EXPR.
+
+ * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
+ compiling to class file a void method with an empty method body.
+ As a side effect, the bytecode backend will generate the
+ appropriate `return' instruction.
+
+ * parse.y (lookup_package_type_and_set_next): New function prototype.
+ (resolve_package): Search current and imported packages.
+ (lookup_package_type_and_set_next): New function.
+
+1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Make-lang.in (java.stage1): Depend on stage1-start.
+ (java.stage2): Likewise for stage2-start.
+ (java.stage3): Likewise for stage3-start.
+ (java.stage4): Likewise for stage4-start.
+
+1999-06-22 Andrew Haley <aph@cygnus.com>
+
+ * verify.c (verify_jvm_instructions): Check for pending blocks
+ before invalid PC test and opcode switch, not after.
+
+1999-06-21 Andrew Haley <aph@cygnus.com>
+
+ * except.c (find_handler_in_range): The upper limit for exception
+ ranges is exclusive, not inclusive: (start <= pc < end).
+ (link_handler): find child pointer which points to outer by
+ searching sibling list: previous code incorrectly assumed that
+ outer->outer->first_child must point to outer.
+ * verify.c (verify_jvm_instructions): FIXME added to code for
+ `athrow'.
+ (verify_jvm_instructions): Do not assume that the last block
+ processed in a subroutine is a block which ends with a `ret'
+ instruction. With some control flows it is possible that the last
+ block ends with an `athrow'.
+
+Mon Jun 14 13:13:39 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (qualify_ambiguous_name): Reorganized the post
+ evaluation of non WFL leading expression nodes.
+
+Fri Jun 11 21:37:18 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
+ CONVERT_EXPR.
+
+Thu Jun 10 22:26:17 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (qualify_ambiguous_name): Handle qualified expression
+ beginning with a STRING_CST.
+
+Thu Jun 10 20:27:25 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (register_fields): Set DECL_INITIAL on both
+ pre-initialized static and public fields.
+ (resolve_field_access): Static field access expressions to always
+ use pointer types.
+ (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
+ qualification. CONVERT_EXPR to be resolved as an expression name.
+ (java_complete_lhs): Identify and access qualified final
+ initialized field in switch statement case expression.
+ (fold_constant_for_init): Pre-initialized field decl constant to
+ be folded.
+
+Mon Jun 7 16:09:51 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * parse.y (note_possible_classname): Mark returned node with
+ QUALIFIED_P only if the original class name contained a '/'.
+
Sat Jun 5 11:46:59 1999 Anthony Green <green@cygnus.com>
* Make-lang.in (gcjh): More parallel build fixes.
diff --git a/gnu/egcs/gcc/java/Make-lang.in b/gnu/egcs/gcc/java/Make-lang.in
index 5c9bf1349c2..39397f267fc 100644
--- a/gnu/egcs/gcc/java/Make-lang.in
+++ b/gnu/egcs/gcc/java/Make-lang.in
@@ -187,13 +187,13 @@ java.maintainer-clean:
# Stage hooks:
# The main makefile has already created stage?/java.
-java.stage1:
+java.stage1: stage1-start
-mv java/*$(objext) stage1/java
-java.stage2:
+java.stage2: stage2-start
-mv java/*$(objext) stage2/java
-java.stage3:
+java.stage3: stage3-start
-mv java/*$(objext) stage3/java
-java.stage4:
+java.stage4: stage4-start
-mv java/*$(objext) stage4/java
#
# Maintenance hooks:
diff --git a/gnu/egcs/gcc/java/except.c b/gnu/egcs/gcc/java/except.c
index 0e6eb398f8f..920f81a3a42 100644
--- a/gnu/egcs/gcc/java/except.c
+++ b/gnu/egcs/gcc/java/except.c
@@ -72,7 +72,7 @@ find_handler_in_range (pc, range, child)
{
if (pc < child->start_pc)
break;
- if (pc <= child->end_pc)
+ if (pc < child->end_pc)
return find_handler_in_range (pc, child, child->first_child);
}
cache_range = range;
@@ -129,7 +129,12 @@ link_handler (range, outer)
range->outer = outer->outer;
range->next_sibling = NULL;
range->first_child = outer;
- outer->outer->first_child = range;
+ {
+ struct eh_range **pr = &(outer->outer->first_child);
+ while (*pr != outer)
+ pr = &(*pr)->next_sibling;
+ *pr = range;
+ }
outer->outer = range;
return;
}
diff --git a/gnu/egcs/gcc/java/jvspec.c b/gnu/egcs/gcc/java/jvspec.c
index 815ff3fd8bc..eba801cb32a 100644
--- a/gnu/egcs/gcc/java/jvspec.c
+++ b/gnu/egcs/gcc/java/jvspec.c
@@ -223,6 +223,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
main_class_name = argv[i] + 7;
added--;
}
+ else if (strcmp (argv[i], "-fhelp") == 0)
+ will_link = 0;
else if (strcmp (argv[i], "-v") == 0)
{
saw_verbose_flag = 1;
diff --git a/gnu/egcs/gcc/java/parse.c b/gnu/egcs/gcc/java/parse.c
index 53fc6dc4963..69c8789236e 100644
--- a/gnu/egcs/gcc/java/parse.c
+++ b/gnu/egcs/gcc/java/parse.c
@@ -1,6 +1,6 @@
/* A Bison parser, made from ./parse.y
- by GNU Bison version 1.25
+ by GNU Bison version 1.27
*/
#define YYBISON 1 /* Identify Bison output. */
@@ -12,113 +12,113 @@
#define yychar java_char
#define yydebug java_debug
#define yynerrs java_nerrs
-#define PLUS_TK 258
-#define MINUS_TK 259
-#define MULT_TK 260
-#define DIV_TK 261
-#define REM_TK 262
-#define LS_TK 263
-#define SRS_TK 264
-#define ZRS_TK 265
-#define AND_TK 266
-#define XOR_TK 267
-#define OR_TK 268
-#define BOOL_AND_TK 269
-#define BOOL_OR_TK 270
-#define EQ_TK 271
-#define NEQ_TK 272
-#define GT_TK 273
-#define GTE_TK 274
-#define LT_TK 275
-#define LTE_TK 276
-#define PLUS_ASSIGN_TK 277
-#define MINUS_ASSIGN_TK 278
-#define MULT_ASSIGN_TK 279
-#define DIV_ASSIGN_TK 280
-#define REM_ASSIGN_TK 281
-#define LS_ASSIGN_TK 282
-#define SRS_ASSIGN_TK 283
-#define ZRS_ASSIGN_TK 284
-#define AND_ASSIGN_TK 285
-#define XOR_ASSIGN_TK 286
-#define OR_ASSIGN_TK 287
-#define PUBLIC_TK 288
-#define PRIVATE_TK 289
-#define PROTECTED_TK 290
-#define STATIC_TK 291
-#define FINAL_TK 292
-#define SYNCHRONIZED_TK 293
-#define VOLATILE_TK 294
-#define TRANSIENT_TK 295
-#define NATIVE_TK 296
-#define PAD_TK 297
-#define ABSTRACT_TK 298
-#define MODIFIER_TK 299
-#define DECR_TK 300
-#define INCR_TK 301
-#define DEFAULT_TK 302
-#define IF_TK 303
-#define THROW_TK 304
-#define BOOLEAN_TK 305
-#define DO_TK 306
-#define IMPLEMENTS_TK 307
-#define THROWS_TK 308
-#define BREAK_TK 309
-#define IMPORT_TK 310
-#define ELSE_TK 311
-#define INSTANCEOF_TK 312
-#define RETURN_TK 313
-#define VOID_TK 314
-#define CATCH_TK 315
-#define INTERFACE_TK 316
-#define CASE_TK 317
-#define EXTENDS_TK 318
-#define FINALLY_TK 319
-#define SUPER_TK 320
-#define WHILE_TK 321
-#define CLASS_TK 322
-#define SWITCH_TK 323
-#define CONST_TK 324
-#define TRY_TK 325
-#define FOR_TK 326
-#define NEW_TK 327
-#define CONTINUE_TK 328
-#define GOTO_TK 329
-#define PACKAGE_TK 330
-#define THIS_TK 331
-#define BYTE_TK 332
-#define SHORT_TK 333
-#define INT_TK 334
-#define LONG_TK 335
-#define CHAR_TK 336
-#define INTEGRAL_TK 337
-#define FLOAT_TK 338
-#define DOUBLE_TK 339
-#define FP_TK 340
-#define ID_TK 341
-#define REL_QM_TK 342
-#define REL_CL_TK 343
-#define NOT_TK 344
-#define NEG_TK 345
-#define ASSIGN_ANY_TK 346
-#define ASSIGN_TK 347
-#define OP_TK 348
-#define CP_TK 349
-#define OCB_TK 350
-#define CCB_TK 351
-#define OSB_TK 352
-#define CSB_TK 353
-#define SC_TK 354
-#define C_TK 355
-#define DOT_TK 356
-#define STRING_LIT_TK 357
-#define CHAR_LIT_TK 358
-#define INT_LIT_TK 359
-#define FP_LIT_TK 360
-#define TRUE_TK 361
-#define FALSE_TK 362
-#define BOOL_LIT_TK 363
-#define NULL_TK 364
+#define PLUS_TK 257
+#define MINUS_TK 258
+#define MULT_TK 259
+#define DIV_TK 260
+#define REM_TK 261
+#define LS_TK 262
+#define SRS_TK 263
+#define ZRS_TK 264
+#define AND_TK 265
+#define XOR_TK 266
+#define OR_TK 267
+#define BOOL_AND_TK 268
+#define BOOL_OR_TK 269
+#define EQ_TK 270
+#define NEQ_TK 271
+#define GT_TK 272
+#define GTE_TK 273
+#define LT_TK 274
+#define LTE_TK 275
+#define PLUS_ASSIGN_TK 276
+#define MINUS_ASSIGN_TK 277
+#define MULT_ASSIGN_TK 278
+#define DIV_ASSIGN_TK 279
+#define REM_ASSIGN_TK 280
+#define LS_ASSIGN_TK 281
+#define SRS_ASSIGN_TK 282
+#define ZRS_ASSIGN_TK 283
+#define AND_ASSIGN_TK 284
+#define XOR_ASSIGN_TK 285
+#define OR_ASSIGN_TK 286
+#define PUBLIC_TK 287
+#define PRIVATE_TK 288
+#define PROTECTED_TK 289
+#define STATIC_TK 290
+#define FINAL_TK 291
+#define SYNCHRONIZED_TK 292
+#define VOLATILE_TK 293
+#define TRANSIENT_TK 294
+#define NATIVE_TK 295
+#define PAD_TK 296
+#define ABSTRACT_TK 297
+#define MODIFIER_TK 298
+#define DECR_TK 299
+#define INCR_TK 300
+#define DEFAULT_TK 301
+#define IF_TK 302
+#define THROW_TK 303
+#define BOOLEAN_TK 304
+#define DO_TK 305
+#define IMPLEMENTS_TK 306
+#define THROWS_TK 307
+#define BREAK_TK 308
+#define IMPORT_TK 309
+#define ELSE_TK 310
+#define INSTANCEOF_TK 311
+#define RETURN_TK 312
+#define VOID_TK 313
+#define CATCH_TK 314
+#define INTERFACE_TK 315
+#define CASE_TK 316
+#define EXTENDS_TK 317
+#define FINALLY_TK 318
+#define SUPER_TK 319
+#define WHILE_TK 320
+#define CLASS_TK 321
+#define SWITCH_TK 322
+#define CONST_TK 323
+#define TRY_TK 324
+#define FOR_TK 325
+#define NEW_TK 326
+#define CONTINUE_TK 327
+#define GOTO_TK 328
+#define PACKAGE_TK 329
+#define THIS_TK 330
+#define BYTE_TK 331
+#define SHORT_TK 332
+#define INT_TK 333
+#define LONG_TK 334
+#define CHAR_TK 335
+#define INTEGRAL_TK 336
+#define FLOAT_TK 337
+#define DOUBLE_TK 338
+#define FP_TK 339
+#define ID_TK 340
+#define REL_QM_TK 341
+#define REL_CL_TK 342
+#define NOT_TK 343
+#define NEG_TK 344
+#define ASSIGN_ANY_TK 345
+#define ASSIGN_TK 346
+#define OP_TK 347
+#define CP_TK 348
+#define OCB_TK 349
+#define CCB_TK 350
+#define OSB_TK 351
+#define CSB_TK 352
+#define SC_TK 353
+#define C_TK 354
+#define DOT_TK 355
+#define STRING_LIT_TK 356
+#define CHAR_LIT_TK 357
+#define INT_LIT_TK 358
+#define FP_LIT_TK 359
+#define TRUE_TK 360
+#define FALSE_TK 361
+#define BOOL_LIT_TK 362
+#define NULL_TK 363
#line 48 "./parse.y"
@@ -176,6 +176,7 @@ static int find_in_imports PROTO ((tree));
static int check_pkg_class_access PROTO ((tree, tree));
static tree resolve_package PROTO ((tree, tree *));
static tree lookup_package_type PROTO ((char *, int));
+static tree lookup_package_type_and_set_next PROTO ((char *, int, tree *));
static tree resolve_class PROTO ((tree, tree, tree));
static void declare_local_variables PROTO ((int, tree, tree));
static void source_start_java_method PROTO ((tree));
@@ -375,7 +376,7 @@ static tree java_lang_cloneable = NULL_TREE;
static tree current_static_block = NULL_TREE;
-#line 303 "./parse.y"
+#line 304 "./parse.y"
typedef union {
tree node;
int sub_token;
@@ -385,7 +386,7 @@ typedef union {
} operator;
int value;
} YYSTYPE;
-#line 313 "./parse.y"
+#line 314 "./parse.y"
#include "lex.c"
#ifndef YYDEBUG
@@ -406,7 +407,7 @@ typedef union {
#define YYFLAG -32768
#define YYNTBASE 110
-#define YYTRANSLATE(x) ((unsigned)(x) <= 364 ? yytranslate[x] : 266)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 363 ? yytranslate[x] : 266)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -434,18 +435,18 @@ static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
- 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
- 106, 107, 108, 109
+ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109
};
#if YYDEBUG != 0
@@ -683,57 +684,57 @@ static const short yyrhs[] = { 123,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
- 457, 463, 465, 466, 467, 468, 469, 473, 475, 478,
- 480, 481, 484, 486, 489, 493, 497, 501, 507, 509,
- 511, 513, 518, 520, 523, 527, 532, 537, 539, 540,
- 541, 542, 543, 544, 545, 548, 553, 559, 561, 564,
- 567, 569, 573, 575, 578, 605, 607, 611, 624, 626,
- 630, 637, 642, 644, 654, 659, 674, 678, 681, 684,
- 687, 689, 691, 696, 700, 702, 704, 706, 710, 712,
- 714, 721, 727, 732, 736, 745, 755, 757, 760, 762,
- 763, 764, 768, 770, 772, 773, 775, 780, 783, 793,
- 796, 798, 802, 805, 812, 818, 826, 828, 830, 832,
- 834, 838, 840, 844, 851, 852, 856, 859, 861, 863,
- 865, 867, 869, 871, 873, 880, 883, 885, 894, 896,
- 900, 905, 910, 914, 919, 924, 926, 933, 935, 937,
- 941, 944, 946, 950, 952, 953, 958, 964, 971, 979,
- 986, 989, 992, 996, 999, 1003, 1012, 1014, 1016, 1020,
- 1022, 1025, 1032, 1040, 1042, 1046, 1053, 1063, 1067, 1070,
- 1073, 1076, 1079, 1082, 1085, 1088, 1090, 1094, 1100, 1105,
- 1107, 1111, 1114, 1118, 1120, 1123, 1125, 1126, 1128, 1132,
- 1136, 1142, 1147, 1150, 1152, 1156, 1162, 1166, 1171, 1180,
- 1184, 1189, 1201, 1203, 1206, 1208, 1210, 1214, 1218, 1221,
- 1225, 1227, 1228, 1229, 1230, 1231, 1235, 1237, 1238, 1239,
- 1240, 1244, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253,
- 1254, 1255, 1258, 1263, 1274, 1277, 1281, 1288, 1298, 1304,
- 1310, 1316, 1318, 1324, 1326, 1332, 1334, 1336, 1338, 1340,
- 1344, 1346, 1347, 1348, 1349, 1350, 1351, 1354, 1360, 1362,
- 1364, 1368, 1373, 1378, 1384, 1394, 1400, 1402, 1404, 1411,
- 1414, 1416, 1418, 1422, 1424, 1427, 1431, 1433, 1436, 1443,
- 1449, 1451, 1453, 1457, 1465, 1468, 1470, 1472, 1476, 1481,
- 1490, 1495, 1498, 1505, 1507, 1509, 1513, 1516, 1525, 1532,
- 1534, 1538, 1551, 1553, 1559, 1565, 1569, 1571, 1575, 1578,
- 1580, 1584, 1587, 1589, 1591, 1595, 1598, 1600, 1602, 1606,
- 1609, 1611, 1613, 1617, 1623, 1625, 1629, 1636, 1638, 1640,
- 1642, 1646, 1654, 1657, 1659, 1664, 1668, 1670, 1677, 1685,
- 1702, 1704, 1706, 1710, 1713, 1718, 1720, 1723, 1725, 1727,
- 1729, 1730, 1731, 1732, 1736, 1738, 1740, 1745, 1747, 1749,
- 1751, 1753, 1757, 1760, 1765, 1767, 1772, 1773, 1774, 1775,
- 1776, 1778, 1780, 1782, 1784, 1786, 1790, 1792, 1795, 1801,
- 1806, 1810, 1813, 1815, 1817, 1821, 1823, 1825, 1827, 1831,
- 1834, 1838, 1844, 1846, 1854, 1881, 1883, 1887, 1892, 1899,
- 1903, 1906, 1908, 1919, 1930, 1935, 1944, 1946, 1950, 1953,
- 1955, 1960, 1965, 1970, 1977, 1979, 1980, 1981, 1984, 1989,
- 1994, 1996, 1997, 1999, 2001, 2002, 2004, 2008, 2011, 2015,
- 2018, 2022, 2024, 2026, 2028, 2029, 2031, 2035, 2044, 2046,
- 2048, 2061, 2063, 2069, 2071, 2073, 2077, 2079, 2084, 2089,
- 2094, 2096, 2098, 2102, 2104, 2109, 2114, 2116, 2120, 2122,
- 2127, 2132, 2137, 2139, 2141, 2145, 2147, 2152, 2157, 2162,
- 2167, 2169, 2171, 2173, 2175, 2177, 2181, 2183, 2188, 2193,
- 2195, 2199, 2201, 2206, 2210, 2212, 2217, 2221, 2223, 2228,
- 2232, 2234, 2239, 2243, 2245, 2250, 2254, 2256, 2261, 2267,
- 2269, 2273, 2275, 2278, 2281, 2289, 2291, 2292, 2295, 2297,
- 2300, 2304
+ 458, 464, 466, 467, 468, 469, 470, 474, 476, 479,
+ 481, 482, 485, 487, 490, 494, 498, 502, 508, 510,
+ 512, 514, 519, 521, 524, 528, 533, 538, 540, 541,
+ 542, 543, 544, 545, 546, 549, 554, 560, 562, 565,
+ 568, 570, 574, 576, 579, 606, 608, 612, 625, 627,
+ 631, 638, 643, 645, 655, 660, 675, 679, 682, 685,
+ 688, 690, 692, 697, 701, 703, 705, 707, 711, 713,
+ 715, 722, 728, 733, 737, 746, 756, 758, 761, 763,
+ 764, 765, 769, 771, 773, 774, 776, 781, 784, 794,
+ 797, 799, 803, 806, 813, 819, 827, 829, 831, 833,
+ 835, 839, 841, 845, 852, 853, 857, 860, 862, 864,
+ 866, 868, 870, 872, 874, 881, 884, 886, 895, 897,
+ 901, 906, 911, 915, 920, 925, 927, 934, 936, 938,
+ 942, 945, 947, 951, 953, 954, 959, 965, 972, 980,
+ 987, 990, 993, 997, 1000, 1004, 1013, 1015, 1017, 1021,
+ 1023, 1026, 1033, 1041, 1043, 1047, 1054, 1064, 1068, 1071,
+ 1074, 1077, 1080, 1083, 1086, 1089, 1091, 1095, 1101, 1106,
+ 1108, 1112, 1115, 1119, 1121, 1124, 1126, 1127, 1129, 1133,
+ 1137, 1143, 1148, 1151, 1153, 1157, 1163, 1167, 1172, 1181,
+ 1185, 1190, 1202, 1204, 1207, 1209, 1211, 1215, 1219, 1222,
+ 1226, 1228, 1229, 1230, 1231, 1232, 1236, 1238, 1239, 1240,
+ 1241, 1245, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254,
+ 1255, 1256, 1259, 1264, 1275, 1278, 1282, 1289, 1299, 1305,
+ 1311, 1317, 1319, 1325, 1327, 1333, 1335, 1337, 1339, 1341,
+ 1345, 1347, 1348, 1349, 1350, 1351, 1352, 1355, 1361, 1363,
+ 1365, 1369, 1374, 1379, 1385, 1395, 1401, 1403, 1405, 1412,
+ 1415, 1417, 1419, 1423, 1425, 1428, 1432, 1434, 1437, 1444,
+ 1450, 1452, 1454, 1458, 1466, 1469, 1471, 1473, 1477, 1482,
+ 1491, 1496, 1499, 1506, 1508, 1510, 1514, 1517, 1526, 1533,
+ 1535, 1539, 1552, 1554, 1560, 1566, 1570, 1572, 1576, 1579,
+ 1581, 1585, 1588, 1590, 1592, 1596, 1599, 1601, 1603, 1607,
+ 1610, 1612, 1614, 1618, 1624, 1626, 1630, 1637, 1639, 1641,
+ 1643, 1647, 1655, 1658, 1660, 1665, 1669, 1671, 1678, 1686,
+ 1703, 1705, 1707, 1711, 1714, 1719, 1721, 1724, 1726, 1728,
+ 1730, 1731, 1732, 1733, 1737, 1739, 1741, 1746, 1748, 1750,
+ 1752, 1754, 1758, 1761, 1766, 1768, 1773, 1774, 1775, 1776,
+ 1777, 1779, 1781, 1783, 1785, 1787, 1791, 1793, 1796, 1802,
+ 1807, 1811, 1814, 1816, 1818, 1822, 1824, 1826, 1828, 1832,
+ 1835, 1839, 1845, 1847, 1855, 1882, 1884, 1888, 1893, 1900,
+ 1904, 1907, 1909, 1920, 1931, 1936, 1945, 1947, 1951, 1954,
+ 1956, 1961, 1966, 1971, 1978, 1980, 1981, 1982, 1985, 1990,
+ 1995, 1997, 1998, 2000, 2002, 2003, 2005, 2009, 2012, 2016,
+ 2019, 2023, 2025, 2027, 2029, 2030, 2032, 2036, 2045, 2047,
+ 2049, 2062, 2064, 2070, 2072, 2074, 2078, 2080, 2085, 2090,
+ 2095, 2097, 2099, 2103, 2105, 2110, 2115, 2117, 2121, 2123,
+ 2128, 2133, 2138, 2140, 2142, 2146, 2148, 2153, 2158, 2163,
+ 2168, 2170, 2172, 2174, 2176, 2178, 2182, 2184, 2189, 2194,
+ 2196, 2200, 2202, 2207, 2211, 2213, 2218, 2222, 2224, 2229,
+ 2233, 2235, 2240, 2244, 2246, 2251, 2255, 2257, 2262, 2268,
+ 2270, 2274, 2276, 2279, 2282, 2290, 2292, 2293, 2296, 2298,
+ 2301, 2305
};
#endif
@@ -2211,7 +2212,8 @@ static const short yycheck[] = { 3,
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/cygnus/gnupro-98r2/share/bison.simple"
+#line 3 "/usr/lib/bison.simple"
+/* This file comes from bison-1.27. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -2228,46 +2230,66 @@ static const short yycheck[] = { 3,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
-#ifndef alloca
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
-#if defined (MSDOS) && !defined (__TURBOC__)
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
#include <malloc.h>
+#endif
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
-#include <malloc.h>
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
#pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
-#ifdef __hpux
-#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
-};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
#endif /* __hpux */
+#endif
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc. */
-#endif /* not GNU C. */
-#endif /* alloca not defined. */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
@@ -2277,8 +2299,8 @@ void *alloca ();
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
-#define YYACCEPT return(0)
-#define YYABORT return(1)
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
@@ -2359,12 +2381,12 @@ int yydebug; /* nonzero means print parse trace */
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-int yyparse (void);
-#endif
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
@@ -2376,7 +2398,7 @@ static void
__yy_memcpy (to, from, count)
char *to;
char *from;
- int count;
+ unsigned int count;
{
register char *f = from;
register char *t = to;
@@ -2391,10 +2413,10 @@ __yy_memcpy (to, from, count)
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
-__yy_memcpy (char *to, char *from, int count)
+__yy_memcpy (char *to, char *from, unsigned int count)
{
- register char *f = from;
register char *t = to;
+ register char *f = from;
register int i = count;
while (i-- > 0)
@@ -2404,7 +2426,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/cygnus/gnupro-98r2/share/bison.simple"
+#line 216 "/usr/lib/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -2425,6 +2447,15 @@ __yy_memcpy (char *to, char *from, int count)
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
int
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
@@ -2453,6 +2484,7 @@ yyparse(YYPARSE_PARAM_ARG)
#endif
int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
#ifdef YYPURE
int yychar;
@@ -2537,18 +2569,32 @@ yynewstate:
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
@@ -2709,66 +2755,66 @@ yyreduce:
switch (yyn) {
case 1:
-#line 459 "./parse.y"
+#line 460 "./parse.y"
{;
break;}
case 18:
-#line 503 "./parse.y"
+#line 504 "./parse.y"
{
yyval.node = build_java_array_type (yyvsp[-2].node, -1);
CLASS_LOADED_P (yyval.node) = 1;
;
break;}
case 19:
-#line 508 "./parse.y"
+#line 509 "./parse.y"
{ yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;
break;}
case 20:
-#line 510 "./parse.y"
+#line 511 "./parse.y"
{ yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;
break;}
case 21:
-#line 512 "./parse.y"
+#line 513 "./parse.y"
{RULE ("']' expected"); RECOVER;;
break;}
case 22:
-#line 514 "./parse.y"
+#line 515 "./parse.y"
{RULE ("']' expected"); RECOVER;;
break;}
case 26:
-#line 529 "./parse.y"
+#line 530 "./parse.y"
{ yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ;
break;}
case 28:
-#line 538 "./parse.y"
+#line 539 "./parse.y"
{yyval.node = NULL;;
break;}
case 36:
-#line 550 "./parse.y"
+#line 551 "./parse.y"
{
yyval.node = NULL;
;
break;}
case 37:
-#line 554 "./parse.y"
+#line 555 "./parse.y"
{
yyval.node = NULL;
;
break;}
case 40:
-#line 566 "./parse.y"
+#line 567 "./parse.y"
{ ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); ;
break;}
case 41:
-#line 568 "./parse.y"
+#line 569 "./parse.y"
{yyerror ("Missing name"); RECOVER;;
break;}
case 42:
-#line 570 "./parse.y"
+#line 571 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 45:
-#line 580 "./parse.y"
+#line 581 "./parse.y"
{
tree name = EXPR_WFL_NODE (yyvsp[-1].node), node, last_name;
int i = IDENTIFIER_LENGTH (name)-1;
@@ -2796,15 +2842,15 @@ case 45:
;
break;}
case 46:
-#line 606 "./parse.y"
+#line 607 "./parse.y"
{yyerror ("Missing name"); RECOVER;;
break;}
case 47:
-#line 608 "./parse.y"
+#line 609 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 48:
-#line 613 "./parse.y"
+#line 614 "./parse.y"
{
tree name = EXPR_WFL_NODE (yyvsp[-3].node);
/* Don't import java.lang.* twice. */
@@ -2818,15 +2864,15 @@ case 48:
;
break;}
case 49:
-#line 625 "./parse.y"
+#line 626 "./parse.y"
{yyerror ("'*' expected"); RECOVER;;
break;}
case 50:
-#line 627 "./parse.y"
+#line 628 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 51:
-#line 632 "./parse.y"
+#line 633 "./parse.y"
{
maybe_generate_finit ();
maybe_generate_clinit ();
@@ -2834,31 +2880,31 @@ case 51:
;
break;}
case 52:
-#line 638 "./parse.y"
+#line 639 "./parse.y"
{
maybe_generate_clinit ();
yyval.node = yyvsp[0].node;
;
break;}
case 53:
-#line 643 "./parse.y"
+#line 644 "./parse.y"
{ yyval.node = NULL; ;
break;}
case 54:
-#line 645 "./parse.y"
+#line 646 "./parse.y"
{
YYERROR_NOW;
yyerror ("Class or interface declaration expected");
;
break;}
case 55:
-#line 656 "./parse.y"
+#line 657 "./parse.y"
{
yyval.value = (1 << yyvsp[0].value);
;
break;}
case 56:
-#line 660 "./parse.y"
+#line 661 "./parse.y"
{
int acc = (1 << yyvsp[0].value);
if (yyval.value & acc)
@@ -2872,95 +2918,95 @@ case 56:
;
break;}
case 57:
-#line 676 "./parse.y"
+#line 677 "./parse.y"
{ create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 58:
-#line 678 "./parse.y"
+#line 679 "./parse.y"
{
yyval.node = yyvsp[0].node;
;
break;}
case 59:
-#line 682 "./parse.y"
+#line 683 "./parse.y"
{ create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 60:
-#line 684 "./parse.y"
+#line 685 "./parse.y"
{
yyval.node = yyvsp[0].node;
;
break;}
case 61:
-#line 688 "./parse.y"
+#line 689 "./parse.y"
{yyerror ("Missing class name"); RECOVER;;
break;}
case 62:
-#line 690 "./parse.y"
+#line 691 "./parse.y"
{yyerror ("Missing class name"); RECOVER;;
break;}
case 63:
-#line 692 "./parse.y"
+#line 693 "./parse.y"
{
if (!ctxp->class_err) yyerror ("'{' expected");
DRECOVER(class1);
;
break;}
case 64:
-#line 697 "./parse.y"
+#line 698 "./parse.y"
{if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;;
break;}
case 65:
-#line 701 "./parse.y"
+#line 702 "./parse.y"
{ yyval.node = NULL; ;
break;}
case 66:
-#line 703 "./parse.y"
+#line 704 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 67:
-#line 705 "./parse.y"
+#line 706 "./parse.y"
{yyerror ("'{' expected"); ctxp->class_err=1;;
break;}
case 68:
-#line 707 "./parse.y"
+#line 708 "./parse.y"
{yyerror ("Missing super class name"); ctxp->class_err=1;;
break;}
case 69:
-#line 711 "./parse.y"
+#line 712 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 70:
-#line 713 "./parse.y"
+#line 714 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 71:
-#line 715 "./parse.y"
+#line 716 "./parse.y"
{
ctxp->class_err=1;
yyerror ("Missing interface name");
;
break;}
case 72:
-#line 723 "./parse.y"
+#line 724 "./parse.y"
{
ctxp->interface_number = 1;
yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE);
;
break;}
case 73:
-#line 728 "./parse.y"
+#line 729 "./parse.y"
{
ctxp->interface_number++;
yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE));
;
break;}
case 74:
-#line 733 "./parse.y"
+#line 734 "./parse.y"
{yyerror ("Missing interface name"); RECOVER;;
break;}
case 75:
-#line 738 "./parse.y"
+#line 739 "./parse.y"
{
/* Store the location of the `}' when doing xrefs */
if (flag_emit_xref)
@@ -2970,7 +3016,7 @@ case 75:
;
break;}
case 76:
-#line 746 "./parse.y"
+#line 747 "./parse.y"
{
/* Store the location of the `}' when doing xrefs */
if (flag_emit_xref)
@@ -2980,27 +3026,27 @@ case 76:
;
break;}
case 82:
-#line 765 "./parse.y"
+#line 766 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("instance initializer"); ;
break;}
case 84:
-#line 771 "./parse.y"
+#line 772 "./parse.y"
{ yyval.node = yyvsp[-1].node; ;
break;}
case 86:
-#line 774 "./parse.y"
+#line 775 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner classe declaration"); ;
break;}
case 87:
-#line 776 "./parse.y"
+#line 777 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner interface declaration"); ;
break;}
case 88:
-#line 782 "./parse.y"
+#line 783 "./parse.y"
{ register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ;
break;}
case 89:
-#line 784 "./parse.y"
+#line 785 "./parse.y"
{
check_modifiers
("Illegal modifier `%s' for field declaration",
@@ -3010,19 +3056,19 @@ case 89:
;
break;}
case 91:
-#line 797 "./parse.y"
+#line 798 "./parse.y"
{ yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 92:
-#line 799 "./parse.y"
+#line 800 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 93:
-#line 804 "./parse.y"
+#line 805 "./parse.y"
{ yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ;
break;}
case 94:
-#line 806 "./parse.y"
+#line 807 "./parse.y"
{
if (java_error_count)
yyvsp[0].node = NULL_TREE;
@@ -3031,7 +3077,7 @@ case 94:
;
break;}
case 95:
-#line 813 "./parse.y"
+#line 814 "./parse.y"
{
yyerror ("Missing variable initializer");
yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE);
@@ -3039,7 +3085,7 @@ case 95:
;
break;}
case 96:
-#line 819 "./parse.y"
+#line 820 "./parse.y"
{
yyerror ("';' expected");
yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE);
@@ -3047,85 +3093,85 @@ case 96:
;
break;}
case 98:
-#line 829 "./parse.y"
+#line 830 "./parse.y"
{ yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;
break;}
case 99:
-#line 831 "./parse.y"
+#line 832 "./parse.y"
{yyerror ("Invalid declaration"); DRECOVER(vdi);;
break;}
case 100:
-#line 833 "./parse.y"
+#line 834 "./parse.y"
{yyerror ("']' expected"); DRECOVER(vdi);;
break;}
case 101:
-#line 835 "./parse.y"
+#line 836 "./parse.y"
{yyerror ("Unbalanced ']'"); DRECOVER(vdi);;
break;}
case 104:
-#line 846 "./parse.y"
+#line 847 "./parse.y"
{
current_function_decl = yyvsp[0].node;
source_start_java_method (current_function_decl);
;
break;}
case 105:
-#line 851 "./parse.y"
+#line 852 "./parse.y"
{ finish_method_declaration (yyvsp[0].node); ;
break;}
case 106:
-#line 853 "./parse.y"
+#line 854 "./parse.y"
{YYNOT_TWICE yyerror ("'{' expected"); RECOVER;;
break;}
case 107:
-#line 858 "./parse.y"
+#line 859 "./parse.y"
{ yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 108:
-#line 860 "./parse.y"
+#line 861 "./parse.y"
{ yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 109:
-#line 862 "./parse.y"
+#line 863 "./parse.y"
{ yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 110:
-#line 864 "./parse.y"
+#line 865 "./parse.y"
{ yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 111:
-#line 866 "./parse.y"
+#line 867 "./parse.y"
{RECOVER;;
break;}
case 112:
-#line 868 "./parse.y"
+#line 869 "./parse.y"
{RECOVER;;
break;}
case 113:
-#line 870 "./parse.y"
+#line 871 "./parse.y"
{yyerror ("Identifier expected"); RECOVER;;
break;}
case 114:
-#line 872 "./parse.y"
+#line 873 "./parse.y"
{yyerror ("Identifier expected"); RECOVER;;
break;}
case 115:
-#line 874 "./parse.y"
+#line 875 "./parse.y"
{
yyerror ("Invalid method declaration, return type required");
RECOVER;
;
break;}
case 116:
-#line 882 "./parse.y"
+#line 883 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ;
break;}
case 117:
-#line 884 "./parse.y"
+#line 885 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 118:
-#line 886 "./parse.y"
+#line 887 "./parse.y"
{
EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location;
TREE_PURPOSE (yyvsp[-2].node) =
@@ -3136,150 +3182,150 @@ case 118:
;
break;}
case 119:
-#line 895 "./parse.y"
+#line 896 "./parse.y"
{yyerror ("')' expected"); DRECOVER(method_declarator);;
break;}
case 120:
-#line 897 "./parse.y"
+#line 898 "./parse.y"
{yyerror ("']' expected"); RECOVER;;
break;}
case 121:
-#line 902 "./parse.y"
+#line 903 "./parse.y"
{
ctxp->formal_parameter_number = 1;
;
break;}
case 122:
-#line 906 "./parse.y"
+#line 907 "./parse.y"
{
ctxp->formal_parameter_number += 1;
yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 123:
-#line 911 "./parse.y"
+#line 912 "./parse.y"
{yyerror ("Missing formal parameter term"); RECOVER;;
break;}
case 124:
-#line 916 "./parse.y"
+#line 917 "./parse.y"
{
yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node);
;
break;}
case 125:
-#line 920 "./parse.y"
+#line 921 "./parse.y"
{
parse_jdk1_1_error ("final parameters");
yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node);
;
break;}
case 126:
-#line 925 "./parse.y"
+#line 926 "./parse.y"
{yyerror ("Missing identifier"); RECOVER;;
break;}
case 127:
-#line 927 "./parse.y"
+#line 928 "./parse.y"
{
SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[-2].value));
yyerror ("Missing identifier"); RECOVER;
;
break;}
case 128:
-#line 934 "./parse.y"
+#line 935 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 129:
-#line 936 "./parse.y"
+#line 937 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 130:
-#line 938 "./parse.y"
+#line 939 "./parse.y"
{yyerror ("Missing class type term"); RECOVER;;
break;}
case 131:
-#line 943 "./parse.y"
+#line 944 "./parse.y"
{ yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ;
break;}
case 132:
-#line 945 "./parse.y"
+#line 946 "./parse.y"
{ yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ;
break;}
case 133:
-#line 947 "./parse.y"
+#line 948 "./parse.y"
{yyerror ("Missing class type term"); RECOVER;;
break;}
case 136:
-#line 954 "./parse.y"
+#line 955 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 137:
-#line 960 "./parse.y"
+#line 961 "./parse.y"
{
TREE_CHAIN (yyvsp[0].node) = ctxp->static_initialized;
ctxp->static_initialized = yyvsp[0].node;
;
break;}
case 138:
-#line 965 "./parse.y"
+#line 966 "./parse.y"
{
TREE_CHAIN (yyvsp[-1].node) = ctxp->static_initialized;
ctxp->static_initialized = yyvsp[-1].node;
;
break;}
case 139:
-#line 973 "./parse.y"
+#line 974 "./parse.y"
{
SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value));
;
break;}
case 140:
-#line 981 "./parse.y"
+#line 982 "./parse.y"
{
current_function_decl = yyvsp[0].node;
source_start_java_method (current_function_decl);
;
break;}
case 141:
-#line 986 "./parse.y"
+#line 987 "./parse.y"
{ finish_method_declaration (yyvsp[0].node); ;
break;}
case 142:
-#line 991 "./parse.y"
+#line 992 "./parse.y"
{ yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 143:
-#line 993 "./parse.y"
+#line 994 "./parse.y"
{ yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 144:
-#line 998 "./parse.y"
+#line 999 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ;
break;}
case 145:
-#line 1000 "./parse.y"
+#line 1001 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 146:
-#line 1008 "./parse.y"
+#line 1009 "./parse.y"
{
BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node;
yyval.node = yyvsp[0].node;
;
break;}
case 147:
-#line 1013 "./parse.y"
+#line 1014 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 148:
-#line 1015 "./parse.y"
+#line 1016 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 149:
-#line 1017 "./parse.y"
+#line 1018 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 152:
-#line 1027 "./parse.y"
+#line 1028 "./parse.y"
{
yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE);
yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node);
@@ -3287,7 +3333,7 @@ case 152:
;
break;}
case 153:
-#line 1033 "./parse.y"
+#line 1034 "./parse.y"
{
yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node);
yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node);
@@ -3295,15 +3341,15 @@ case 153:
;
break;}
case 154:
-#line 1041 "./parse.y"
+#line 1042 "./parse.y"
{yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ;
break;}
case 155:
-#line 1043 "./parse.y"
+#line 1044 "./parse.y"
{yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ;
break;}
case 156:
-#line 1048 "./parse.y"
+#line 1049 "./parse.y"
{
tree wfl = build_wfl_node (this_identifier_node);
EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location;
@@ -3311,7 +3357,7 @@ case 156:
;
break;}
case 157:
-#line 1054 "./parse.y"
+#line 1055 "./parse.y"
{
tree wfl = build_wfl_node (super_identifier_node);
EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location;
@@ -3319,133 +3365,133 @@ case 157:
;
break;}
case 158:
-#line 1065 "./parse.y"
+#line 1066 "./parse.y"
{ create_interface (0, yyvsp[0].node, NULL_TREE); ;
break;}
case 159:
-#line 1067 "./parse.y"
+#line 1068 "./parse.y"
{
yyval.node = yyvsp[0].node;
;
break;}
case 160:
-#line 1071 "./parse.y"
+#line 1072 "./parse.y"
{ create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ;
break;}
case 161:
-#line 1073 "./parse.y"
+#line 1074 "./parse.y"
{
yyval.node = yyvsp[0].node;
;
break;}
case 162:
-#line 1077 "./parse.y"
+#line 1078 "./parse.y"
{ create_interface (0, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 163:
-#line 1079 "./parse.y"
+#line 1080 "./parse.y"
{
yyval.node = yyvsp[0].node;
;
break;}
case 164:
-#line 1083 "./parse.y"
+#line 1084 "./parse.y"
{ create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 165:
-#line 1085 "./parse.y"
+#line 1086 "./parse.y"
{
yyval.node = yyvsp[0].node;
;
break;}
case 166:
-#line 1089 "./parse.y"
+#line 1090 "./parse.y"
{yyerror ("'{' expected"); RECOVER;;
break;}
case 167:
-#line 1091 "./parse.y"
+#line 1092 "./parse.y"
{yyerror ("'{' expected"); RECOVER;;
break;}
case 168:
-#line 1096 "./parse.y"
+#line 1097 "./parse.y"
{
ctxp->interface_number = 1;
yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE);
;
break;}
case 169:
-#line 1101 "./parse.y"
+#line 1102 "./parse.y"
{
ctxp->interface_number++;
yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE));
;
break;}
case 170:
-#line 1106 "./parse.y"
+#line 1107 "./parse.y"
{yyerror ("Invalid interface type"); RECOVER;;
break;}
case 171:
-#line 1108 "./parse.y"
+#line 1109 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 172:
-#line 1113 "./parse.y"
+#line 1114 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 173:
-#line 1115 "./parse.y"
+#line 1116 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 178:
-#line 1127 "./parse.y"
+#line 1128 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner class declaration"); ;
break;}
case 179:
-#line 1129 "./parse.y"
+#line 1130 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner interface declaration"); ;
break;}
case 181:
-#line 1138 "./parse.y"
+#line 1139 "./parse.y"
{
check_abstract_method_header (yyvsp[-1].node);
current_function_decl = NULL_TREE; /* FIXME ? */
;
break;}
case 182:
-#line 1143 "./parse.y"
+#line 1144 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 183:
-#line 1149 "./parse.y"
+#line 1150 "./parse.y"
{ yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ;
break;}
case 184:
-#line 1151 "./parse.y"
+#line 1152 "./parse.y"
{ yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ;
break;}
case 185:
-#line 1153 "./parse.y"
+#line 1154 "./parse.y"
{ yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ;
break;}
case 186:
-#line 1158 "./parse.y"
+#line 1159 "./parse.y"
{
yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node),
yyvsp[0].node, NULL_TREE);
;
break;}
case 187:
-#line 1163 "./parse.y"
+#line 1164 "./parse.y"
{
yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node);
;
break;}
case 188:
-#line 1167 "./parse.y"
+#line 1168 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 189:
-#line 1173 "./parse.y"
+#line 1174 "./parse.y"
{
/* Store the location of the `}' when doing xrefs */
if (current_function_decl && flag_emit_xref)
@@ -3455,15 +3501,15 @@ case 189:
;
break;}
case 190:
-#line 1181 "./parse.y"
+#line 1182 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 191:
-#line 1186 "./parse.y"
+#line 1187 "./parse.y"
{ enter_block (); ;
break;}
case 192:
-#line 1191 "./parse.y"
+#line 1192 "./parse.y"
{
maybe_absorb_scoping_blocks ();
/* Store the location of the `}' when doing xrefs */
@@ -3474,35 +3520,35 @@ case 192:
;
break;}
case 196:
-#line 1209 "./parse.y"
+#line 1210 "./parse.y"
{ java_method_add_stmt (current_function_decl, yyvsp[0].node); ;
break;}
case 197:
-#line 1211 "./parse.y"
+#line 1212 "./parse.y"
{ parse_jdk1_1_error ("inner class declaration"); ;
break;}
case 199:
-#line 1220 "./parse.y"
+#line 1221 "./parse.y"
{ declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 200:
-#line 1222 "./parse.y"
+#line 1223 "./parse.y"
{ declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 206:
-#line 1232 "./parse.y"
+#line 1233 "./parse.y"
{ yyval.node = exit_block (); ;
break;}
case 211:
-#line 1241 "./parse.y"
+#line 1242 "./parse.y"
{ yyval.node = exit_block (); ;
break;}
case 223:
-#line 1260 "./parse.y"
+#line 1261 "./parse.y"
{ yyval.node = empty_stmt_node; ;
break;}
case 224:
-#line 1265 "./parse.y"
+#line 1266 "./parse.y"
{
yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node),
EXPR_WFL_NODE (yyvsp[-1].node));
@@ -3512,19 +3558,19 @@ case 224:
;
break;}
case 225:
-#line 1276 "./parse.y"
+#line 1277 "./parse.y"
{ yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 226:
-#line 1278 "./parse.y"
+#line 1279 "./parse.y"
{yyerror ("':' expected"); RECOVER;;
break;}
case 227:
-#line 1283 "./parse.y"
+#line 1284 "./parse.y"
{ yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 228:
-#line 1290 "./parse.y"
+#line 1291 "./parse.y"
{
/* We have a statement. Generate a WFL around it so
we can debug it */
@@ -3535,7 +3581,7 @@ case 228:
;
break;}
case 229:
-#line 1299 "./parse.y"
+#line 1300 "./parse.y"
{
if (ctxp->prevent_ese != lineno)
yyerror ("Invalid expression statement");
@@ -3543,7 +3589,7 @@ case 229:
;
break;}
case 230:
-#line 1305 "./parse.y"
+#line 1306 "./parse.y"
{
if (ctxp->prevent_ese != lineno)
yyerror ("Invalid expression statement");
@@ -3551,7 +3597,7 @@ case 230:
;
break;}
case 231:
-#line 1311 "./parse.y"
+#line 1312 "./parse.y"
{
if (ctxp->prevent_ese != lineno)
yyerror ("Invalid expression statement");
@@ -3559,11 +3605,11 @@ case 231:
;
break;}
case 232:
-#line 1317 "./parse.y"
+#line 1318 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 233:
-#line 1319 "./parse.y"
+#line 1320 "./parse.y"
{
yyerror ("Constructor invocation must be first "
"thing in a constructor");
@@ -3571,11 +3617,11 @@ case 233:
;
break;}
case 234:
-#line 1325 "./parse.y"
+#line 1326 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 235:
-#line 1327 "./parse.y"
+#line 1328 "./parse.y"
{
yyerror ("Constructor invocation must be first "
"thing in a constructor");
@@ -3583,60 +3629,60 @@ case 235:
;
break;}
case 236:
-#line 1333 "./parse.y"
+#line 1334 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 237:
-#line 1335 "./parse.y"
+#line 1336 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 238:
-#line 1337 "./parse.y"
+#line 1338 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 239:
-#line 1339 "./parse.y"
+#line 1340 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 240:
-#line 1341 "./parse.y"
+#line 1342 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 248:
-#line 1356 "./parse.y"
+#line 1357 "./parse.y"
{
yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node,
yyvsp[0].node, NULL_TREE);
;
break;}
case 249:
-#line 1361 "./parse.y"
+#line 1362 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 250:
-#line 1363 "./parse.y"
+#line 1364 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 251:
-#line 1365 "./parse.y"
+#line 1366 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 252:
-#line 1370 "./parse.y"
+#line 1371 "./parse.y"
{ yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 253:
-#line 1375 "./parse.y"
+#line 1376 "./parse.y"
{ yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 254:
-#line 1380 "./parse.y"
+#line 1381 "./parse.y"
{
enter_block ();
;
break;}
case 255:
-#line 1384 "./parse.y"
+#line 1385 "./parse.y"
{
/* Make into "proper list" of COMPOUND_EXPRs.
I.e. make the last statment also have its own
@@ -3647,42 +3693,42 @@ case 255:
;
break;}
case 256:
-#line 1396 "./parse.y"
+#line 1397 "./parse.y"
{
yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE);
EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location;
;
break;}
case 257:
-#line 1401 "./parse.y"
+#line 1402 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 258:
-#line 1403 "./parse.y"
+#line 1404 "./parse.y"
{yyerror ("Missing term or ')'"); DRECOVER(switch_statement);;
break;}
case 259:
-#line 1405 "./parse.y"
+#line 1406 "./parse.y"
{yyerror ("'{' expected"); RECOVER;;
break;}
case 260:
-#line 1413 "./parse.y"
+#line 1414 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 261:
-#line 1415 "./parse.y"
+#line 1416 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 262:
-#line 1417 "./parse.y"
+#line 1418 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 263:
-#line 1419 "./parse.y"
+#line 1420 "./parse.y"
{ yyval.node = NULL_TREE; ;
break;}
case 269:
-#line 1438 "./parse.y"
+#line 1439 "./parse.y"
{
tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node);
EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location;
@@ -3690,7 +3736,7 @@ case 269:
;
break;}
case 270:
-#line 1444 "./parse.y"
+#line 1445 "./parse.y"
{
tree lab = build1 (DEFAULT_EXPR, NULL_TREE, NULL_TREE);
EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location;
@@ -3698,61 +3744,61 @@ case 270:
;
break;}
case 271:
-#line 1450 "./parse.y"
+#line 1451 "./parse.y"
{yyerror ("Missing or invalid constant expression"); RECOVER;;
break;}
case 272:
-#line 1452 "./parse.y"
+#line 1453 "./parse.y"
{yyerror ("':' expected"); RECOVER;;
break;}
case 273:
-#line 1454 "./parse.y"
+#line 1455 "./parse.y"
{yyerror ("':' expected"); RECOVER;;
break;}
case 274:
-#line 1459 "./parse.y"
+#line 1460 "./parse.y"
{
tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0);
yyval.node = build_new_loop (body);
;
break;}
case 275:
-#line 1467 "./parse.y"
+#line 1468 "./parse.y"
{ yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ;
break;}
case 276:
-#line 1469 "./parse.y"
+#line 1470 "./parse.y"
{YYERROR_NOW; yyerror ("'(' expected"); RECOVER;;
break;}
case 277:
-#line 1471 "./parse.y"
+#line 1472 "./parse.y"
{yyerror ("Missing term and ')' expected"); RECOVER;;
break;}
case 278:
-#line 1473 "./parse.y"
+#line 1474 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 279:
-#line 1478 "./parse.y"
+#line 1479 "./parse.y"
{ yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ;
break;}
case 280:
-#line 1483 "./parse.y"
+#line 1484 "./parse.y"
{
tree body = build_loop_body (0, NULL_TREE, 1);
yyval.node = build_new_loop (body);
;
break;}
case 281:
-#line 1492 "./parse.y"
+#line 1493 "./parse.y"
{ yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ;
break;}
case 282:
-#line 1497 "./parse.y"
+#line 1498 "./parse.y"
{ yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 283:
-#line 1499 "./parse.y"
+#line 1500 "./parse.y"
{
yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node);
/* We have not condition, so we get rid of the EXIT_EXPR */
@@ -3761,23 +3807,23 @@ case 283:
;
break;}
case 284:
-#line 1506 "./parse.y"
+#line 1507 "./parse.y"
{yyerror ("Invalid control expression"); RECOVER;;
break;}
case 285:
-#line 1508 "./parse.y"
+#line 1509 "./parse.y"
{yyerror ("Invalid update expression"); RECOVER;;
break;}
case 286:
-#line 1510 "./parse.y"
+#line 1511 "./parse.y"
{yyerror ("Invalid update expression"); RECOVER;;
break;}
case 287:
-#line 1515 "./parse.y"
+#line 1516 "./parse.y"
{ yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);;
break;}
case 288:
-#line 1517 "./parse.y"
+#line 1518 "./parse.y"
{
yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node);
/* We have not condition, so we get rid of the EXIT_EXPR */
@@ -3786,7 +3832,7 @@ case 288:
;
break;}
case 289:
-#line 1527 "./parse.y"
+#line 1528 "./parse.y"
{
/* This scope defined for local variable that may be
defined within the scope of the for loop */
@@ -3794,15 +3840,15 @@ case 289:
;
break;}
case 290:
-#line 1533 "./parse.y"
+#line 1534 "./parse.y"
{yyerror ("'(' expected"); DRECOVER(for_1);;
break;}
case 291:
-#line 1535 "./parse.y"
+#line 1536 "./parse.y"
{yyerror ("Invalid init statement"); RECOVER;;
break;}
case 292:
-#line 1540 "./parse.y"
+#line 1541 "./parse.y"
{
/* We now declare the loop body. The loop is
declared as a for loop. */
@@ -3815,11 +3861,11 @@ case 292:
;
break;}
case 293:
-#line 1552 "./parse.y"
+#line 1553 "./parse.y"
{ yyval.node = empty_stmt_node; ;
break;}
case 294:
-#line 1554 "./parse.y"
+#line 1555 "./parse.y"
{
/* Init statement recorded within the previously
defined block scope */
@@ -3827,7 +3873,7 @@ case 294:
;
break;}
case 295:
-#line 1560 "./parse.y"
+#line 1561 "./parse.y"
{
/* Local variable are recorded within the previously
defined block scope */
@@ -3835,94 +3881,94 @@ case 295:
;
break;}
case 296:
-#line 1566 "./parse.y"
+#line 1567 "./parse.y"
{yyerror ("';' expected"); DRECOVER(for_init_1);;
break;}
case 297:
-#line 1570 "./parse.y"
+#line 1571 "./parse.y"
{yyval.node = empty_stmt_node;;
break;}
case 298:
-#line 1572 "./parse.y"
+#line 1573 "./parse.y"
{ yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ;
break;}
case 299:
-#line 1577 "./parse.y"
+#line 1578 "./parse.y"
{ yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ;
break;}
case 300:
-#line 1579 "./parse.y"
+#line 1580 "./parse.y"
{ yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ;
break;}
case 301:
-#line 1581 "./parse.y"
+#line 1582 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 302:
-#line 1586 "./parse.y"
+#line 1587 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ;
break;}
case 303:
-#line 1588 "./parse.y"
+#line 1589 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ;
break;}
case 304:
-#line 1590 "./parse.y"
+#line 1591 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 305:
-#line 1592 "./parse.y"
+#line 1593 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 306:
-#line 1597 "./parse.y"
+#line 1598 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ;
break;}
case 307:
-#line 1599 "./parse.y"
+#line 1600 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ;
break;}
case 308:
-#line 1601 "./parse.y"
+#line 1602 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 309:
-#line 1603 "./parse.y"
+#line 1604 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 310:
-#line 1608 "./parse.y"
+#line 1609 "./parse.y"
{ yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ;
break;}
case 311:
-#line 1610 "./parse.y"
+#line 1611 "./parse.y"
{ yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ;
break;}
case 312:
-#line 1612 "./parse.y"
+#line 1613 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 313:
-#line 1614 "./parse.y"
+#line 1615 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 314:
-#line 1619 "./parse.y"
+#line 1620 "./parse.y"
{
yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node);
EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location;
;
break;}
case 315:
-#line 1624 "./parse.y"
+#line 1625 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 316:
-#line 1626 "./parse.y"
+#line 1627 "./parse.y"
{yyerror ("';' expected"); RECOVER;;
break;}
case 317:
-#line 1631 "./parse.y"
+#line 1632 "./parse.y"
{
yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node);
EXPR_WFL_LINECOL (yyval.node) =
@@ -3930,56 +3976,56 @@ case 317:
;
break;}
case 318:
-#line 1637 "./parse.y"
+#line 1638 "./parse.y"
{yyerror ("'{' expected"); RECOVER;;
break;}
case 319:
-#line 1639 "./parse.y"
+#line 1640 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 320:
-#line 1641 "./parse.y"
+#line 1642 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 321:
-#line 1643 "./parse.y"
+#line 1644 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 322:
-#line 1648 "./parse.y"
+#line 1649 "./parse.y"
{
if ((1 << yyvsp[0].value) != ACC_SYNCHRONIZED)
fatal ("synchronized was '%d' - yyparse", (1 << yyvsp[0].value));
;
break;}
case 323:
-#line 1656 "./parse.y"
+#line 1657 "./parse.y"
{ yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 324:
-#line 1658 "./parse.y"
+#line 1659 "./parse.y"
{ yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ;
break;}
case 325:
-#line 1660 "./parse.y"
+#line 1661 "./parse.y"
{ yyval.node = build_try_finally_statement
(yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location,
yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node);
;
break;}
case 326:
-#line 1665 "./parse.y"
+#line 1666 "./parse.y"
{yyerror ("'{' expected"); DRECOVER (try_statement);;
break;}
case 328:
-#line 1671 "./parse.y"
+#line 1672 "./parse.y"
{
TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node;
yyval.node = yyvsp[0].node;
;
break;}
case 329:
-#line 1679 "./parse.y"
+#line 1680 "./parse.y"
{
java_method_add_stmt (current_function_decl, yyvsp[0].node);
exit_block ();
@@ -3987,7 +4033,7 @@ case 329:
;
break;}
case 330:
-#line 1687 "./parse.y"
+#line 1688 "./parse.y"
{
/* We add a block to define a scope for
formal_parameter (CCBP). The formal parameter is
@@ -4005,176 +4051,176 @@ case 330:
;
break;}
case 331:
-#line 1703 "./parse.y"
+#line 1704 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 332:
-#line 1705 "./parse.y"
+#line 1706 "./parse.y"
{yyerror ("Missing term or ')' expected"); DRECOVER (2);;
break;}
case 333:
-#line 1707 "./parse.y"
+#line 1708 "./parse.y"
{yyerror ("')' expected"); DRECOVER (1);;
break;}
case 334:
-#line 1712 "./parse.y"
+#line 1713 "./parse.y"
{ yyval.node = yyvsp[0].node; ;
break;}
case 335:
-#line 1714 "./parse.y"
+#line 1715 "./parse.y"
{yyerror ("'{' expected"); RECOVER; ;
break;}
case 339:
-#line 1726 "./parse.y"
+#line 1727 "./parse.y"
{ yyval.node = build_this (yyvsp[0].operator.location); ;
break;}
case 340:
-#line 1728 "./parse.y"
+#line 1729 "./parse.y"
{yyval.node = yyvsp[-1].node;;
break;}
case 345:
-#line 1737 "./parse.y"
+#line 1738 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("named class literals"); ;
break;}
case 346:
-#line 1739 "./parse.y"
+#line 1740 "./parse.y"
{ yyval.node = build_class_ref (yyvsp[-2].node); ;
break;}
case 347:
-#line 1741 "./parse.y"
+#line 1742 "./parse.y"
{ yyval.node = build_class_ref (void_type_node); ;
break;}
case 348:
-#line 1746 "./parse.y"
+#line 1747 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("class literals"); ;
break;}
case 349:
-#line 1748 "./parse.y"
+#line 1749 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 350:
-#line 1750 "./parse.y"
+#line 1751 "./parse.y"
{yyerror ("'class' or 'this' expected" ); RECOVER;;
break;}
case 351:
-#line 1752 "./parse.y"
+#line 1753 "./parse.y"
{yyerror ("'class' expected" ); RECOVER;;
break;}
case 352:
-#line 1754 "./parse.y"
+#line 1755 "./parse.y"
{yyerror ("'class' expected" ); RECOVER;;
break;}
case 353:
-#line 1759 "./parse.y"
+#line 1760 "./parse.y"
{ yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 354:
-#line 1761 "./parse.y"
+#line 1762 "./parse.y"
{ yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ;
break;}
case 355:
-#line 1766 "./parse.y"
+#line 1767 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner class instance creation"); ;
break;}
case 356:
-#line 1768 "./parse.y"
+#line 1769 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner class instance creation"); ;
break;}
case 361:
-#line 1777 "./parse.y"
+#line 1778 "./parse.y"
{yyerror ("'(' expected"); DRECOVER(new_1);;
break;}
case 362:
-#line 1779 "./parse.y"
+#line 1780 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 363:
-#line 1781 "./parse.y"
+#line 1782 "./parse.y"
{yyerror ("')' or term expected"); RECOVER;;
break;}
case 364:
-#line 1783 "./parse.y"
+#line 1784 "./parse.y"
{yyerror ("')' expected"); RECOVER;;
break;}
case 365:
-#line 1785 "./parse.y"
+#line 1786 "./parse.y"
{YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;;
break;}
case 366:
-#line 1787 "./parse.y"
+#line 1788 "./parse.y"
{yyerror ("'(' expected"); RECOVER;;
break;}
case 369:
-#line 1797 "./parse.y"
+#line 1798 "./parse.y"
{
yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE);
ctxp->formal_parameter_number = 1;
;
break;}
case 370:
-#line 1802 "./parse.y"
+#line 1803 "./parse.y"
{
ctxp->formal_parameter_number += 1;
yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node);
;
break;}
case 371:
-#line 1807 "./parse.y"
+#line 1808 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 372:
-#line 1812 "./parse.y"
+#line 1813 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ;
break;}
case 373:
-#line 1814 "./parse.y"
+#line 1815 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ;
break;}
case 374:
-#line 1816 "./parse.y"
+#line 1817 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, CURRENT_OSB (ctxp));;
break;}
case 375:
-#line 1818 "./parse.y"
+#line 1819 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, CURRENT_OSB (ctxp));;
break;}
case 376:
-#line 1822 "./parse.y"
+#line 1823 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("anonymous array"); ;
break;}
case 377:
-#line 1824 "./parse.y"
+#line 1825 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("anonymous array"); ;
break;}
case 378:
-#line 1826 "./parse.y"
+#line 1827 "./parse.y"
{yyerror ("'[' expected"); DRECOVER ("]");;
break;}
case 379:
-#line 1828 "./parse.y"
+#line 1829 "./parse.y"
{yyerror ("']' expected"); RECOVER;;
break;}
case 380:
-#line 1833 "./parse.y"
+#line 1834 "./parse.y"
{ yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ;
break;}
case 381:
-#line 1835 "./parse.y"
+#line 1836 "./parse.y"
{ yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ;
break;}
case 382:
-#line 1840 "./parse.y"
+#line 1841 "./parse.y"
{
EXPR_WFL_LINECOL (yyvsp[-1].node) = yyvsp[-2].operator.location;
yyval.node = yyvsp[-1].node;
;
break;}
case 383:
-#line 1845 "./parse.y"
+#line 1846 "./parse.y"
{yyerror ("']' expected"); RECOVER;;
break;}
case 384:
-#line 1847 "./parse.y"
+#line 1848 "./parse.y"
{
yyerror ("Missing term");
yyerror ("']' expected");
@@ -4182,7 +4228,7 @@ case 384:
;
break;}
case 385:
-#line 1856 "./parse.y"
+#line 1857 "./parse.y"
{
int allocate = 0;
/* If not initialized, allocate memory for the osb
@@ -4210,19 +4256,19 @@ case 385:
;
break;}
case 386:
-#line 1882 "./parse.y"
+#line 1883 "./parse.y"
{ CURRENT_OSB (ctxp)++; ;
break;}
case 387:
-#line 1884 "./parse.y"
+#line 1885 "./parse.y"
{ yyerror ("']' expected"); RECOVER;;
break;}
case 388:
-#line 1889 "./parse.y"
+#line 1890 "./parse.y"
{ yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ;
break;}
case 389:
-#line 1893 "./parse.y"
+#line 1894 "./parse.y"
{
tree super_wfl =
build_wfl_node (super_identifier_node);
@@ -4231,19 +4277,19 @@ case 389:
;
break;}
case 390:
-#line 1900 "./parse.y"
+#line 1901 "./parse.y"
{yyerror ("Field expected"); DRECOVER (super_field_acces);;
break;}
case 391:
-#line 1905 "./parse.y"
+#line 1906 "./parse.y"
{ yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ;
break;}
case 392:
-#line 1907 "./parse.y"
+#line 1908 "./parse.y"
{ yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 393:
-#line 1909 "./parse.y"
+#line 1910 "./parse.y"
{
if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR)
yyval.node = build_this_super_qualified_invocation
@@ -4256,7 +4302,7 @@ case 393:
;
break;}
case 394:
-#line 1920 "./parse.y"
+#line 1921 "./parse.y"
{
if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR)
yyval.node = build_this_super_qualified_invocation
@@ -4269,121 +4315,121 @@ case 394:
;
break;}
case 395:
-#line 1931 "./parse.y"
+#line 1932 "./parse.y"
{
yyval.node = build_this_super_qualified_invocation
(0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location);
;
break;}
case 396:
-#line 1936 "./parse.y"
+#line 1937 "./parse.y"
{
yyval.node = build_this_super_qualified_invocation
(0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location);
;
break;}
case 397:
-#line 1945 "./parse.y"
+#line 1946 "./parse.y"
{ yyerror ("'(' expected"); DRECOVER (method_invocation); ;
break;}
case 398:
-#line 1947 "./parse.y"
+#line 1948 "./parse.y"
{ yyerror ("'(' expected"); DRECOVER (method_invocation); ;
break;}
case 399:
-#line 1952 "./parse.y"
+#line 1953 "./parse.y"
{ yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 400:
-#line 1954 "./parse.y"
+#line 1955 "./parse.y"
{ yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 401:
-#line 1956 "./parse.y"
+#line 1957 "./parse.y"
{
yyerror ("Missing term and ']' expected");
DRECOVER(array_access);
;
break;}
case 402:
-#line 1961 "./parse.y"
+#line 1962 "./parse.y"
{
yyerror ("']' expected");
DRECOVER(array_access);
;
break;}
case 403:
-#line 1966 "./parse.y"
+#line 1967 "./parse.y"
{
yyerror ("Missing term and ']' expected");
DRECOVER(array_access);
;
break;}
case 404:
-#line 1971 "./parse.y"
+#line 1972 "./parse.y"
{
yyerror ("']' expected");
DRECOVER(array_access);
;
break;}
case 409:
-#line 1986 "./parse.y"
+#line 1987 "./parse.y"
{ yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ;
break;}
case 410:
-#line 1991 "./parse.y"
+#line 1992 "./parse.y"
{ yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ;
break;}
case 413:
-#line 1998 "./parse.y"
+#line 1999 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;}
case 414:
-#line 2000 "./parse.y"
+#line 2001 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;}
case 416:
-#line 2003 "./parse.y"
+#line 2004 "./parse.y"
{yyerror ("Missing term"); RECOVER;
break;}
case 417:
-#line 2005 "./parse.y"
+#line 2006 "./parse.y"
{yyerror ("Missing term"); RECOVER;
break;}
case 418:
-#line 2010 "./parse.y"
+#line 2011 "./parse.y"
{yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ;
break;}
case 419:
-#line 2012 "./parse.y"
+#line 2013 "./parse.y"
{yyerror ("Missing term"); RECOVER;
break;}
case 420:
-#line 2017 "./parse.y"
+#line 2018 "./parse.y"
{yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ;
break;}
case 421:
-#line 2019 "./parse.y"
+#line 2020 "./parse.y"
{yyerror ("Missing term"); RECOVER;
break;}
case 423:
-#line 2025 "./parse.y"
+#line 2026 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;}
case 424:
-#line 2027 "./parse.y"
+#line 2028 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;}
case 426:
-#line 2030 "./parse.y"
+#line 2031 "./parse.y"
{yyerror ("Missing term"); RECOVER;
break;}
case 427:
-#line 2032 "./parse.y"
+#line 2033 "./parse.y"
{yyerror ("Missing term"); RECOVER;
break;}
case 428:
-#line 2037 "./parse.y"
+#line 2038 "./parse.y"
{
tree type = yyvsp[-3].node;
while (CURRENT_OSB (ctxp)--)
@@ -4393,15 +4439,15 @@ case 428:
;
break;}
case 429:
-#line 2045 "./parse.y"
+#line 2046 "./parse.y"
{ yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 430:
-#line 2047 "./parse.y"
+#line 2048 "./parse.y"
{ yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 431:
-#line 2049 "./parse.y"
+#line 2050 "./parse.y"
{
char *ptr;
while (CURRENT_OSB (ctxp)--)
@@ -4416,11 +4462,11 @@ case 431:
;
break;}
case 432:
-#line 2062 "./parse.y"
+#line 2063 "./parse.y"
{yyerror ("']' expected, invalid type expression");;
break;}
case 433:
-#line 2064 "./parse.y"
+#line 2065 "./parse.y"
{
if (ctxp->prevent_ese != lineno)
yyerror ("Invalid type expression"); RECOVER;
@@ -4428,243 +4474,243 @@ case 433:
;
break;}
case 434:
-#line 2070 "./parse.y"
+#line 2071 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 435:
-#line 2072 "./parse.y"
+#line 2073 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 436:
-#line 2074 "./parse.y"
+#line 2075 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 438:
-#line 2080 "./parse.y"
+#line 2081 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token),
yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 439:
-#line 2085 "./parse.y"
+#line 2086 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 440:
-#line 2090 "./parse.y"
+#line 2091 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 441:
-#line 2095 "./parse.y"
+#line 2096 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 442:
-#line 2097 "./parse.y"
+#line 2098 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 443:
-#line 2099 "./parse.y"
+#line 2100 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 445:
-#line 2105 "./parse.y"
+#line 2106 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 446:
-#line 2110 "./parse.y"
+#line 2111 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 447:
-#line 2115 "./parse.y"
+#line 2116 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 448:
-#line 2117 "./parse.y"
+#line 2118 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 450:
-#line 2123 "./parse.y"
+#line 2124 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 451:
-#line 2128 "./parse.y"
+#line 2129 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 452:
-#line 2133 "./parse.y"
+#line 2134 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 453:
-#line 2138 "./parse.y"
+#line 2139 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 454:
-#line 2140 "./parse.y"
+#line 2141 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 455:
-#line 2142 "./parse.y"
+#line 2143 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 457:
-#line 2148 "./parse.y"
+#line 2149 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 458:
-#line 2153 "./parse.y"
+#line 2154 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 459:
-#line 2158 "./parse.y"
+#line 2159 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 460:
-#line 2163 "./parse.y"
+#line 2164 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 461:
-#line 2168 "./parse.y"
+#line 2169 "./parse.y"
{ yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 462:
-#line 2170 "./parse.y"
+#line 2171 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 463:
-#line 2172 "./parse.y"
+#line 2173 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 464:
-#line 2174 "./parse.y"
+#line 2175 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 465:
-#line 2176 "./parse.y"
+#line 2177 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 466:
-#line 2178 "./parse.y"
+#line 2179 "./parse.y"
{yyerror ("Invalid reference type"); RECOVER;;
break;}
case 468:
-#line 2184 "./parse.y"
+#line 2185 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 469:
-#line 2189 "./parse.y"
+#line 2190 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 470:
-#line 2194 "./parse.y"
+#line 2195 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 471:
-#line 2196 "./parse.y"
+#line 2197 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 473:
-#line 2202 "./parse.y"
+#line 2203 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 474:
-#line 2207 "./parse.y"
+#line 2208 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 476:
-#line 2213 "./parse.y"
+#line 2214 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 477:
-#line 2218 "./parse.y"
+#line 2219 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 479:
-#line 2224 "./parse.y"
+#line 2225 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 480:
-#line 2229 "./parse.y"
+#line 2230 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 482:
-#line 2235 "./parse.y"
+#line 2236 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 483:
-#line 2240 "./parse.y"
+#line 2241 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 485:
-#line 2246 "./parse.y"
+#line 2247 "./parse.y"
{
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node);
;
break;}
case 486:
-#line 2251 "./parse.y"
+#line 2252 "./parse.y"
{yyerror ("Missing term"); RECOVER;;
break;}
case 488:
-#line 2257 "./parse.y"
+#line 2258 "./parse.y"
{
yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);
EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location;
;
break;}
case 489:
-#line 2262 "./parse.y"
+#line 2263 "./parse.y"
{
YYERROR_NOW;
yyerror ("Missing term");
@@ -4672,19 +4718,19 @@ case 489:
;
break;}
case 490:
-#line 2268 "./parse.y"
+#line 2269 "./parse.y"
{yyerror ("Missing term"); DRECOVER (2);;
break;}
case 491:
-#line 2270 "./parse.y"
+#line 2271 "./parse.y"
{yyerror ("Missing term"); DRECOVER (3);;
break;}
case 494:
-#line 2280 "./parse.y"
+#line 2281 "./parse.y"
{ yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;}
case 495:
-#line 2282 "./parse.y"
+#line 2283 "./parse.y"
{
if (ctxp->prevent_ese != lineno)
yyerror ("Missing term");
@@ -4693,7 +4739,7 @@ case 495:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/cygnus/gnupro-98r2/share/bison.simple"
+#line 542 "/usr/lib/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -4888,8 +4934,32 @@ yyerrhandle:
yystate = yyn;
goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
}
-#line 2308 "./parse.y"
+#line 2309 "./parse.y"
@@ -5799,7 +5869,6 @@ register_fields (flags, type, variable_list)
appropriately. */
TREE_CHAIN (init) = ctxp->static_initialized;
ctxp->static_initialized = init;
- DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1);
if (TREE_OPERAND (init, 1)
&& TREE_CODE (TREE_OPERAND (init, 1)) == NEW_ARRAY_INIT)
TREE_STATIC (TREE_OPERAND (init, 1)) = 1;
@@ -5813,6 +5882,7 @@ register_fields (flags, type, variable_list)
ctxp->non_static_initialized = init;
}
MODIFY_EXPR_FROM_INITIALIZATION_P (init) = 1;
+ DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1);
}
}
lineno = saved_lineno;
@@ -6127,6 +6197,12 @@ finish_method_declaration (method_body)
method_body = NULL_TREE;
}
+ if (flag_emit_class_files && method_body
+ && TREE_CODE (method_body) == NOP_EXPR
+ && TREE_TYPE (current_function_decl)
+ && TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node)
+ method_body = build1 (RETURN_EXPR, void_type_node, NULL);
+
BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (current_function_decl)) = method_body;
maybe_absorb_scoping_blocks ();
/* Exit function's body */
@@ -7621,7 +7697,7 @@ note_possible_classname (name, len)
return 0;
node = ident_subst (name, len, "", '/', '.', "");
IS_A_CLASSFILE_NAME (node) = 1; /* Or soon to be */
- QUALIFIED_P (node) = 1; /* As soon as we turn / into . */
+ QUALIFIED_P (node) = strchr (name, '/') ? 1 : 0;
return 1;
}
@@ -7822,6 +7898,7 @@ static tree
resolve_package (pkg, next)
tree pkg, *next;
{
+ tree current;
tree type_name = NULL_TREE;
char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (pkg));
@@ -7841,9 +7918,63 @@ resolve_package (pkg, next)
*next = TREE_CHAIN (TREE_CHAIN (EXPR_WFL_QUALIFICATION (pkg)));
type_name = lookup_package_type (name, 9);
}
- else
- return NULL_TREE; /* FIXME, search all imported packages. */
+ /* If we found something here, return */
+ if (type_name)
+ return type_name;
+
+ *next = EXPR_WFL_QUALIFICATION (pkg);
+
+ /* Try the current package. */
+ if (ctxp->package && !strncmp (name, IDENTIFIER_POINTER (ctxp->package),
+ IDENTIFIER_LENGTH (ctxp->package)))
+ {
+ type_name =
+ lookup_package_type_and_set_next (name,
+ IDENTIFIER_LENGTH (ctxp->package),
+ next );
+ if (type_name)
+ return type_name;
+ }
+
+ /* Search in imported package */
+ for (current = ctxp->import_list; current; current = TREE_CHAIN (current))
+ {
+ tree current_pkg_name = EXPR_WFL_NODE (TREE_PURPOSE (current));
+ int len = IDENTIFIER_LENGTH (current_pkg_name);
+ if (!strncmp (name, IDENTIFIER_POINTER (current_pkg_name), len))
+ {
+ tree left, dummy;
+
+ breakdown_qualified (&left, &dummy, current_pkg_name);
+ len = IDENTIFIER_LENGTH (left);
+ type_name = lookup_package_type_and_set_next (name, len, next);
+ if (type_name)
+ break;
+ }
+ }
+
+ return type_name;
+}
+
+static tree
+lookup_package_type_and_set_next (name, len, next)
+ char *name;
+ int len;
+ tree *next;
+{
+ char *ptr;
+ tree type_name = lookup_package_type (name, len);
+
+ if (!type_name)
+ return NULL;
+
+ ptr = IDENTIFIER_POINTER (type_name);
+ while (ptr && (ptr = strchr (ptr, '.')))
+ {
+ *next = TREE_CHAIN (*next);
+ ptr++;
+ }
return type_name;
}
@@ -8896,6 +9027,8 @@ resolve_field_access (qual_wfl, field_decl, field_type)
&& TREE_CODE (where_found) != RECORD_TYPE)
{
tree type = QUAL_DECL_TYPE (field_ref);
+ if (TREE_CODE (type) == RECORD_TYPE)
+ type = build_pointer_type (type);
field_ref = build (COMPOUND_EXPR, type, where_found, field_ref);
}
}
@@ -9455,18 +9588,36 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl)
as a MethodName. We need to qualify what's before */
qualify_ambiguous_name (wfl);
- /* Package resolution are erroneous */
+ /* Package resolution */
if (RESOLVE_PACKAGE_NAME_P (wfl))
{
- tree remainder;
- breakdown_qualified (&remainder, NULL, EXPR_WFL_NODE (wfl));
- parse_error_context (wfl, "Can't search method `%s' in package "
- "`%s'",IDENTIFIER_POINTER (identifier),
- IDENTIFIER_POINTER (remainder));
- PATCH_METHOD_RETURN_ERROR ();
+ tree next, decl, name = resolve_package (wfl, &next);
+
+ if (!name)
+ {
+ tree remainder;
+ breakdown_qualified (&remainder, NULL, EXPR_WFL_NODE (wfl));
+ parse_error_context (wfl, "Can't search method `%s' in package "
+ "`%s'",IDENTIFIER_POINTER (identifier),
+ IDENTIFIER_POINTER (remainder));
+ PATCH_METHOD_RETURN_ERROR ();
+ }
+ RESOLVE_PACKAGE_NAME_P (wfl) = 0;
+ if ((decl = resolve_no_layout (name, QUAL_WFL (next))))
+ {
+ QUAL_RESOLUTION (EXPR_WFL_QUALIFICATION (wfl)) = decl;
+ RESOLVE_EXPRESSION_NAME_P (wfl) = 0;
+ RESOLVE_TYPE_NAME_P (wfl) = 1;
+ }
+ else
+ {
+ RESOLVE_EXPRESSION_NAME_P (wfl) = 1;
+ RESOLVE_TYPE_NAME_P (wfl) = 0;
+ }
}
+
/* We're resolving a call from a type */
- else if (RESOLVE_TYPE_NAME_P (wfl))
+ if (RESOLVE_TYPE_NAME_P (wfl))
{
tree decl = QUAL_RESOLUTION (EXPR_WFL_QUALIFICATION (wfl));
tree name = DECL_NAME (decl);
@@ -10111,6 +10262,7 @@ qualify_ambiguous_name (id)
{
tree qual, qual_wfl, name, decl, ptr_type, saved_current_class;
int again, super_found = 0, this_found = 0, new_array_found = 0;
+ int code;
/* We first qualify the first element, then derive qualification of
others based on the first one. If the first element is qualified
@@ -10140,7 +10292,7 @@ qualify_ambiguous_name (id)
break;
case NEW_ARRAY_EXPR:
qual = TREE_CHAIN (qual);
- new_array_found = again = 1;
+ new_array_found = 1;
continue;
case NEW_CLASS_EXPR:
case CONVERT_EXPR:
@@ -10150,13 +10302,41 @@ qualify_ambiguous_name (id)
while (TREE_CODE (qual_wfl) == ARRAY_REF)
qual_wfl = TREE_OPERAND (qual_wfl, 0);
break;
+ case STRING_CST:
+ qual = TREE_CHAIN (qual);
+ qual_wfl = QUAL_WFL (qual);
+ break;
default:
/* Fix for -Wall. Just break doing nothing */
break;
}
- name = EXPR_WFL_NODE (qual_wfl);
+
ptr_type = current_class;
again = 0;
+ code = TREE_CODE (qual_wfl);
+
+ /* Pos evaluation: non WFL leading expression nodes */
+ if (code == CONVERT_EXPR
+ && TREE_CODE (TREE_TYPE (qual_wfl)) == EXPR_WITH_FILE_LOCATION)
+ name = EXPR_WFL_NODE (TREE_TYPE (qual_wfl));
+
+ else if (code == ARRAY_REF &&
+ TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION)
+ name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0));
+
+ else if (code == CALL_EXPR &&
+ TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION)
+ name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0));
+
+ else if (code == STRING_CST || code == CONDITIONAL_EXPR)
+ {
+ qual = TREE_CHAIN (qual);
+ qual_wfl = QUAL_WFL (qual);
+ again = 1;
+ }
+ else
+ name = EXPR_WFL_NODE (qual_wfl);
+
/* If we have a THIS (from a primary), we set the context accordingly */
if (name == this_identifier_node)
{
@@ -10184,22 +10364,6 @@ qualify_ambiguous_name (id)
/* Do one more interation to set things up */
super_found = again = 1;
}
- /* Loop one more time if we're dealing with ?: or a string
- constant, or a convert expression */
- if (TREE_CODE (qual_wfl) == CONDITIONAL_EXPR
- || TREE_CODE (qual_wfl) == STRING_CST
- || TREE_CODE (qual_wfl) == CONVERT_EXPR)
- {
- if (TREE_CODE (qual_wfl) == CONVERT_EXPR
- && TREE_CODE (TREE_TYPE (qual_wfl)) == EXPR_WITH_FILE_LOCATION)
- name = EXPR_WFL_NODE (TREE_TYPE (qual_wfl));
- else
- {
- qual = TREE_CHAIN (qual);
- qual_wfl = QUAL_WFL (qual);
- again = 1;
- }
- }
} while (again);
/* If name appears within the scope of a location variable
@@ -10239,7 +10403,8 @@ qualify_ambiguous_name (id)
/* Method call are expression name */
else if (TREE_CODE (QUAL_WFL (qual)) == CALL_EXPR
- || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF)
+ || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF
+ || TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR)
RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
/* Check here that NAME isn't declared by more than one
@@ -10511,8 +10676,15 @@ java_complete_lhs (node)
if (cn == error_mark_node)
return cn;
- /* First, the case expression must be constant */
+ /* First, the case expression must be constant. Values of final
+ fields are accepted. */
cn = fold (cn);
+ if ((TREE_CODE (cn) == COMPOUND_EXPR || TREE_CODE (cn) == COMPONENT_REF)
+ && JDECL_P (TREE_OPERAND (cn, 1))
+ && FIELD_FINAL (TREE_OPERAND (cn, 1))
+ && DECL_INITIAL (TREE_OPERAND (cn, 1)))
+ cn = fold_constant_for_init (DECL_INITIAL (TREE_OPERAND (cn, 1)),
+ TREE_OPERAND (cn, 1));
if (!TREE_CONSTANT (cn) && !flag_emit_xref)
{
@@ -10669,7 +10841,7 @@ java_complete_lhs (node)
return node;
/* Keep line number information somewhere were it doesn't
disrupt the completion process. */
- if (flag_emit_xref)
+ if (flag_emit_xref && TREE_CODE (node) != CALL_EXPR)
{
EXPR_WFL_NODE (wfl) = TREE_OPERAND (node, 1);
TREE_OPERAND (node, 1) = wfl;
@@ -14112,7 +14284,7 @@ fold_constant_for_init (node, context)
if (code == INTEGER_CST || code == REAL_CST)
return convert (TREE_TYPE (context), node);
- if (TREE_TYPE (node) != NULL_TREE && code != VAR_DECL)
+ if (TREE_TYPE (node) != NULL_TREE && code != VAR_DECL && code != FIELD_DECL)
return NULL_TREE;
switch (code)
@@ -14178,7 +14350,8 @@ fold_constant_for_init (node, context)
: TREE_OPERAND (node, 2);
case VAR_DECL:
- if (! FIELD_STATIC (node) || ! FIELD_FINAL (node)
+ case FIELD_DECL:
+ if (! FIELD_FINAL (node)
|| DECL_INITIAL (node) == NULL_TREE)
return NULL_TREE;
val = DECL_INITIAL (node);
@@ -14200,7 +14373,8 @@ fold_constant_for_init (node, context)
else if (! QUALIFIED_P (name))
{
decl = lookup_field_wrapper (DECL_CONTEXT (context), name);
- if (decl == NULL_TREE || ! FIELD_STATIC (decl))
+ if (decl == NULL_TREE
+ || (! FIELD_STATIC (decl) && ! FIELD_FINAL (decl)))
return NULL_TREE;
return fold_constant_for_init (decl, decl);
}
diff --git a/gnu/egcs/gcc/java/parse.y b/gnu/egcs/gcc/java/parse.y
index 5a5c6744bd1..8abd4a7c079 100644
--- a/gnu/egcs/gcc/java/parse.y
+++ b/gnu/egcs/gcc/java/parse.y
@@ -100,6 +100,7 @@ static int find_in_imports PROTO ((tree));
static int check_pkg_class_access PROTO ((tree, tree));
static tree resolve_package PROTO ((tree, tree *));
static tree lookup_package_type PROTO ((char *, int));
+static tree lookup_package_type_and_set_next PROTO ((char *, int, tree *));
static tree resolve_class PROTO ((tree, tree, tree));
static void declare_local_variables PROTO ((int, tree, tree));
static void source_start_java_method PROTO ((tree));
@@ -3214,7 +3215,6 @@ register_fields (flags, type, variable_list)
appropriately. */
TREE_CHAIN (init) = ctxp->static_initialized;
ctxp->static_initialized = init;
- DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1);
if (TREE_OPERAND (init, 1)
&& TREE_CODE (TREE_OPERAND (init, 1)) == NEW_ARRAY_INIT)
TREE_STATIC (TREE_OPERAND (init, 1)) = 1;
@@ -3228,6 +3228,7 @@ register_fields (flags, type, variable_list)
ctxp->non_static_initialized = init;
}
MODIFY_EXPR_FROM_INITIALIZATION_P (init) = 1;
+ DECL_INITIAL (field_decl) = TREE_OPERAND (init, 1);
}
}
lineno = saved_lineno;
@@ -3542,6 +3543,12 @@ finish_method_declaration (method_body)
method_body = NULL_TREE;
}
+ if (flag_emit_class_files && method_body
+ && TREE_CODE (method_body) == NOP_EXPR
+ && TREE_TYPE (current_function_decl)
+ && TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node)
+ method_body = build1 (RETURN_EXPR, void_type_node, NULL);
+
BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (current_function_decl)) = method_body;
maybe_absorb_scoping_blocks ();
/* Exit function's body */
@@ -5036,7 +5043,7 @@ note_possible_classname (name, len)
return 0;
node = ident_subst (name, len, "", '/', '.', "");
IS_A_CLASSFILE_NAME (node) = 1; /* Or soon to be */
- QUALIFIED_P (node) = 1; /* As soon as we turn / into . */
+ QUALIFIED_P (node) = strchr (name, '/') ? 1 : 0;
return 1;
}
@@ -5237,6 +5244,7 @@ static tree
resolve_package (pkg, next)
tree pkg, *next;
{
+ tree current;
tree type_name = NULL_TREE;
char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (pkg));
@@ -5256,13 +5264,67 @@ resolve_package (pkg, next)
*next = TREE_CHAIN (TREE_CHAIN (EXPR_WFL_QUALIFICATION (pkg)));
type_name = lookup_package_type (name, 9);
}
- else
- return NULL_TREE; /* FIXME, search all imported packages. */
+
+ /* If we found something here, return */
+ if (type_name)
+ return type_name;
+
+ *next = EXPR_WFL_QUALIFICATION (pkg);
+
+ /* Try the current package. */
+ if (ctxp->package && !strncmp (name, IDENTIFIER_POINTER (ctxp->package),
+ IDENTIFIER_LENGTH (ctxp->package)))
+ {
+ type_name =
+ lookup_package_type_and_set_next (name,
+ IDENTIFIER_LENGTH (ctxp->package),
+ next );
+ if (type_name)
+ return type_name;
+ }
+
+ /* Search in imported package */
+ for (current = ctxp->import_list; current; current = TREE_CHAIN (current))
+ {
+ tree current_pkg_name = EXPR_WFL_NODE (TREE_PURPOSE (current));
+ int len = IDENTIFIER_LENGTH (current_pkg_name);
+ if (!strncmp (name, IDENTIFIER_POINTER (current_pkg_name), len))
+ {
+ tree left, dummy;
+
+ breakdown_qualified (&left, &dummy, current_pkg_name);
+ len = IDENTIFIER_LENGTH (left);
+ type_name = lookup_package_type_and_set_next (name, len, next);
+ if (type_name)
+ break;
+ }
+ }
return type_name;
}
static tree
+lookup_package_type_and_set_next (name, len, next)
+ char *name;
+ int len;
+ tree *next;
+{
+ char *ptr;
+ tree type_name = lookup_package_type (name, len);
+
+ if (!type_name)
+ return NULL;
+
+ ptr = IDENTIFIER_POINTER (type_name);
+ while (ptr && (ptr = strchr (ptr, '.')))
+ {
+ *next = TREE_CHAIN (*next);
+ ptr++;
+ }
+ return type_name;
+}
+
+static tree
lookup_package_type (name, from)
char *name;
int from;
@@ -6311,6 +6373,8 @@ resolve_field_access (qual_wfl, field_decl, field_type)
&& TREE_CODE (where_found) != RECORD_TYPE)
{
tree type = QUAL_DECL_TYPE (field_ref);
+ if (TREE_CODE (type) == RECORD_TYPE)
+ type = build_pointer_type (type);
field_ref = build (COMPOUND_EXPR, type, where_found, field_ref);
}
}
@@ -6870,18 +6934,36 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl)
as a MethodName. We need to qualify what's before */
qualify_ambiguous_name (wfl);
- /* Package resolution are erroneous */
+ /* Package resolution */
if (RESOLVE_PACKAGE_NAME_P (wfl))
{
- tree remainder;
- breakdown_qualified (&remainder, NULL, EXPR_WFL_NODE (wfl));
- parse_error_context (wfl, "Can't search method `%s' in package "
- "`%s'",IDENTIFIER_POINTER (identifier),
- IDENTIFIER_POINTER (remainder));
- PATCH_METHOD_RETURN_ERROR ();
+ tree next, decl, name = resolve_package (wfl, &next);
+
+ if (!name)
+ {
+ tree remainder;
+ breakdown_qualified (&remainder, NULL, EXPR_WFL_NODE (wfl));
+ parse_error_context (wfl, "Can't search method `%s' in package "
+ "`%s'",IDENTIFIER_POINTER (identifier),
+ IDENTIFIER_POINTER (remainder));
+ PATCH_METHOD_RETURN_ERROR ();
+ }
+ RESOLVE_PACKAGE_NAME_P (wfl) = 0;
+ if ((decl = resolve_no_layout (name, QUAL_WFL (next))))
+ {
+ QUAL_RESOLUTION (EXPR_WFL_QUALIFICATION (wfl)) = decl;
+ RESOLVE_EXPRESSION_NAME_P (wfl) = 0;
+ RESOLVE_TYPE_NAME_P (wfl) = 1;
+ }
+ else
+ {
+ RESOLVE_EXPRESSION_NAME_P (wfl) = 1;
+ RESOLVE_TYPE_NAME_P (wfl) = 0;
+ }
}
+
/* We're resolving a call from a type */
- else if (RESOLVE_TYPE_NAME_P (wfl))
+ if (RESOLVE_TYPE_NAME_P (wfl))
{
tree decl = QUAL_RESOLUTION (EXPR_WFL_QUALIFICATION (wfl));
tree name = DECL_NAME (decl);
@@ -7526,6 +7608,7 @@ qualify_ambiguous_name (id)
{
tree qual, qual_wfl, name, decl, ptr_type, saved_current_class;
int again, super_found = 0, this_found = 0, new_array_found = 0;
+ int code;
/* We first qualify the first element, then derive qualification of
others based on the first one. If the first element is qualified
@@ -7555,7 +7638,7 @@ qualify_ambiguous_name (id)
break;
case NEW_ARRAY_EXPR:
qual = TREE_CHAIN (qual);
- new_array_found = again = 1;
+ new_array_found = 1;
continue;
case NEW_CLASS_EXPR:
case CONVERT_EXPR:
@@ -7565,13 +7648,41 @@ qualify_ambiguous_name (id)
while (TREE_CODE (qual_wfl) == ARRAY_REF)
qual_wfl = TREE_OPERAND (qual_wfl, 0);
break;
+ case STRING_CST:
+ qual = TREE_CHAIN (qual);
+ qual_wfl = QUAL_WFL (qual);
+ break;
default:
/* Fix for -Wall. Just break doing nothing */
break;
}
- name = EXPR_WFL_NODE (qual_wfl);
+
ptr_type = current_class;
again = 0;
+ code = TREE_CODE (qual_wfl);
+
+ /* Pos evaluation: non WFL leading expression nodes */
+ if (code == CONVERT_EXPR
+ && TREE_CODE (TREE_TYPE (qual_wfl)) == EXPR_WITH_FILE_LOCATION)
+ name = EXPR_WFL_NODE (TREE_TYPE (qual_wfl));
+
+ else if (code == ARRAY_REF &&
+ TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION)
+ name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0));
+
+ else if (code == CALL_EXPR &&
+ TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION)
+ name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0));
+
+ else if (code == STRING_CST || code == CONDITIONAL_EXPR)
+ {
+ qual = TREE_CHAIN (qual);
+ qual_wfl = QUAL_WFL (qual);
+ again = 1;
+ }
+ else
+ name = EXPR_WFL_NODE (qual_wfl);
+
/* If we have a THIS (from a primary), we set the context accordingly */
if (name == this_identifier_node)
{
@@ -7599,22 +7710,6 @@ qualify_ambiguous_name (id)
/* Do one more interation to set things up */
super_found = again = 1;
}
- /* Loop one more time if we're dealing with ?: or a string
- constant, or a convert expression */
- if (TREE_CODE (qual_wfl) == CONDITIONAL_EXPR
- || TREE_CODE (qual_wfl) == STRING_CST
- || TREE_CODE (qual_wfl) == CONVERT_EXPR)
- {
- if (TREE_CODE (qual_wfl) == CONVERT_EXPR
- && TREE_CODE (TREE_TYPE (qual_wfl)) == EXPR_WITH_FILE_LOCATION)
- name = EXPR_WFL_NODE (TREE_TYPE (qual_wfl));
- else
- {
- qual = TREE_CHAIN (qual);
- qual_wfl = QUAL_WFL (qual);
- again = 1;
- }
- }
} while (again);
/* If name appears within the scope of a location variable
@@ -7654,7 +7749,8 @@ qualify_ambiguous_name (id)
/* Method call are expression name */
else if (TREE_CODE (QUAL_WFL (qual)) == CALL_EXPR
- || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF)
+ || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF
+ || TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR)
RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
/* Check here that NAME isn't declared by more than one
@@ -7926,8 +8022,15 @@ java_complete_lhs (node)
if (cn == error_mark_node)
return cn;
- /* First, the case expression must be constant */
+ /* First, the case expression must be constant. Values of final
+ fields are accepted. */
cn = fold (cn);
+ if ((TREE_CODE (cn) == COMPOUND_EXPR || TREE_CODE (cn) == COMPONENT_REF)
+ && JDECL_P (TREE_OPERAND (cn, 1))
+ && FIELD_FINAL (TREE_OPERAND (cn, 1))
+ && DECL_INITIAL (TREE_OPERAND (cn, 1)))
+ cn = fold_constant_for_init (DECL_INITIAL (TREE_OPERAND (cn, 1)),
+ TREE_OPERAND (cn, 1));
if (!TREE_CONSTANT (cn) && !flag_emit_xref)
{
@@ -8084,7 +8187,7 @@ java_complete_lhs (node)
return node;
/* Keep line number information somewhere were it doesn't
disrupt the completion process. */
- if (flag_emit_xref)
+ if (flag_emit_xref && TREE_CODE (node) != CALL_EXPR)
{
EXPR_WFL_NODE (wfl) = TREE_OPERAND (node, 1);
TREE_OPERAND (node, 1) = wfl;
@@ -11527,7 +11630,7 @@ fold_constant_for_init (node, context)
if (code == INTEGER_CST || code == REAL_CST)
return convert (TREE_TYPE (context), node);
- if (TREE_TYPE (node) != NULL_TREE && code != VAR_DECL)
+ if (TREE_TYPE (node) != NULL_TREE && code != VAR_DECL && code != FIELD_DECL)
return NULL_TREE;
switch (code)
@@ -11593,7 +11696,8 @@ fold_constant_for_init (node, context)
: TREE_OPERAND (node, 2);
case VAR_DECL:
- if (! FIELD_STATIC (node) || ! FIELD_FINAL (node)
+ case FIELD_DECL:
+ if (! FIELD_FINAL (node)
|| DECL_INITIAL (node) == NULL_TREE)
return NULL_TREE;
val = DECL_INITIAL (node);
@@ -11615,7 +11719,8 @@ fold_constant_for_init (node, context)
else if (! QUALIFIED_P (name))
{
decl = lookup_field_wrapper (DECL_CONTEXT (context), name);
- if (decl == NULL_TREE || ! FIELD_STATIC (decl))
+ if (decl == NULL_TREE
+ || (! FIELD_STATIC (decl) && ! FIELD_FINAL (decl)))
return NULL_TREE;
return fold_constant_for_init (decl, decl);
}
diff --git a/gnu/egcs/gcc/libgcc2.c b/gnu/egcs/gcc/libgcc2.c
index a902dd3be75..6d8fb0b77db 100644
--- a/gnu/egcs/gcc/libgcc2.c
+++ b/gnu/egcs/gcc/libgcc2.c
@@ -2903,17 +2903,26 @@ SYMBOL__MAIN ()
#include "gbl-ctors.h"
/* Provide default definitions for the lists of constructors and
- destructors, so that we don't get linker errors.
-
- The old code sometimes put these into the data segment and sometimes
- into the bss segment. Putting these into the data segment should always
- work and avoids a little bit of complexity. */
+ destructors, so that we don't get linker errors. These symbols are
+ intentionally bss symbols, so that gld and/or collect will provide
+ the right values. */
/* We declare the lists here with two elements each,
- so that they are valid empty lists if no other definition is loaded. */
+ so that they are valid empty lists if no other definition is loaded.
+
+ If we are using the old "set" extensions to have the gnu linker
+ collect ctors and dtors, then we __CTOR_LIST__ and __DTOR_LIST__
+ must be in the bss/common section.
+
+ Long term no port should use those extensions. But many still do. */
#if !defined(INIT_SECTION_ASM_OP) && !defined(CTOR_LISTS_DEFINED_EXTERNALLY)
+#if defined (ASM_OUTPUT_CONSTRUCTOR) || defined (USE_COLLECT2)
func_ptr __CTOR_LIST__[2] = {0, 0};
func_ptr __DTOR_LIST__[2] = {0, 0};
+#else
+func_ptr __CTOR_LIST__[2];
+func_ptr __DTOR_LIST__[2];
+#endif
#endif /* no INIT_SECTION_ASM_OP and not CTOR_LISTS_DEFINED_EXTERNALLY */
#endif /* L_ctors */
diff --git a/gnu/egcs/gcc/real.c b/gnu/egcs/gcc/real.c
index e6a15fed515..2d615757af1 100644
--- a/gnu/egcs/gcc/real.c
+++ b/gnu/egcs/gcc/real.c
@@ -6400,17 +6400,19 @@ ereal_from_double (d)
/* Convert array of HOST_WIDE_INT to equivalent array of 16-bit pieces. */
if (REAL_WORDS_BIG_ENDIAN)
{
+#if HOST_BITS_PER_WIDE_INT == 32
s[0] = (unsigned EMUSHORT) (d[0] >> 16);
s[1] = (unsigned EMUSHORT) d[0];
-#if HOST_BITS_PER_WIDE_INT == 32
s[2] = (unsigned EMUSHORT) (d[1] >> 16);
s[3] = (unsigned EMUSHORT) d[1];
#else
/* In this case the entire target double is contained in the
first array element. The second element of the input is
ignored. */
- s[2] = (unsigned EMUSHORT) (d[0] >> 48);
- s[3] = (unsigned EMUSHORT) (d[0] >> 32);
+ s[0] = (unsigned EMUSHORT) (d[0] >> 48);
+ s[1] = (unsigned EMUSHORT) (d[0] >> 32);
+ s[2] = (unsigned EMUSHORT) (d[0] >> 16);
+ s[3] = (unsigned EMUSHORT) d[0];
#endif
}
else
diff --git a/gnu/egcs/gcc/reg-stack.c b/gnu/egcs/gcc/reg-stack.c
index 787b5a18032..8a27b9563b6 100644
--- a/gnu/egcs/gcc/reg-stack.c
+++ b/gnu/egcs/gcc/reg-stack.c
@@ -1257,7 +1257,7 @@ stack_reg_life_analysis (first, stackentry)
function into the epilogue. */
if (GET_CODE (block_end[blocks-1]) != JUMP_INSN
- || GET_CODE (PATTERN (block_end[blocks-1])) == RETURN)
+ || returnjump_p (block_end[blocks-1]))
mark_regs_pat (retvalue, block_out_reg_set+blocks-1);
}
}
diff --git a/gnu/egcs/gcc/system.h b/gnu/egcs/gcc/system.h
index 3ec73a6cab1..5d1adcd9ad6 100644
--- a/gnu/egcs/gcc/system.h
+++ b/gnu/egcs/gcc/system.h
@@ -249,6 +249,9 @@ extern int errno;
#ifndef WEXITSTATUS
#define WEXITSTATUS(S) (((S) & 0xff00) >> 8)
#endif
+#ifndef WSTOPSIG
+#define WSTOPSIG WEXITSTATUS
+#endif
@@ -330,6 +333,10 @@ extern char *getwd ();
extern char *sbrk ();
#endif
+#ifdef NEED_DECLARATION_STRSTR
+extern char *strstr ();
+#endif
+
#ifdef HAVE_STRERROR
# ifdef NEED_DECLARATION_STRERROR
# ifndef strerror
diff --git a/gnu/egcs/gcc/varasm.c b/gnu/egcs/gcc/varasm.c
index 76f40587943..f463d847d4a 100644
--- a/gnu/egcs/gcc/varasm.c
+++ b/gnu/egcs/gcc/varasm.c
@@ -4388,7 +4388,7 @@ remove_from_pending_weak_list (name)
struct weak_syms *t;
for (t = weak_decls; t; t = t->next)
{
- if (strcmp (name, t->name) == 0)
+ if (t->name && strcmp (name, t->name) == 0)
t->name = NULL;
}
}
diff --git a/gnu/egcs/ltconfig b/gnu/egcs/ltconfig
index ef2c23aa78f..ab304fd3b73 100644
--- a/gnu/egcs/ltconfig
+++ b/gnu/egcs/ltconfig
@@ -1,7 +1,7 @@
#! /bin/sh
# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; you can redistribute it and/or modify it
@@ -31,6 +31,13 @@ echo=echo
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
+elif test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
# Yippee, $echo works!
:
@@ -39,19 +46,45 @@ else
exec "$SHELL" "$0" --no-reexec ${1+"$@"}
fi
+# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != "Xset"; then
+ UNAME=${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) PATH_SEPARATOR=';' ;;
+ *) PATH_SEPARATOR=':' ;;
+ esac
+fi
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
-if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
+if test "X${echo_test_string+set}" != "Xset"; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
+ test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
# The Solaris, AIX, and Digital Unix default echo programs unquote
# backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
#
# So, first we look for a working echo in the user's PATH.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH /usr/ucb; do
- if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
+ if test -f $dir/echo &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
echo="$dir/echo"
break
fi
@@ -60,20 +93,53 @@ if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
# This shell has a builtin print -r that does the trick.
echo='print -r'
elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
# If we have ksh, try running ltconfig again with it.
+ ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
+ export ORIGINAL_CONFIG_SHELL
CONFIG_SHELL=/bin/ksh
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
else
# Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
- # Oops. We lost completely, so just stick with echo.
- echo=echo
+ echo='printf "%s\n"'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
fi
fi
fi
@@ -87,13 +153,18 @@ sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
# The name of this program.
progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
-VERSION=1.2b
+VERSION=1.2f
+TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
rm="rm -f"
@@ -106,6 +177,8 @@ can_build_shared=yes
enable_shared=yes
# All known linkers require a `.a' archive for static linking.
enable_static=yes
+enable_fast_install=yes
+enable_dlopen=unknown
ltmain=
silent=
srcdir=
@@ -117,8 +190,11 @@ ofile="$default_ofile"
verify_host=yes
with_gcc=no
with_gnu_ld=no
+need_locks=yes
+ac_ext=c
objext=o
libext=a
+cache_file=
old_AR="$AR"
old_CC="$CC"
@@ -150,13 +226,16 @@ do
case "$option" in
--help) cat <<EOM
-Usage: $progname [OPTION]... LTMAIN [HOST]
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
Generate a system-specific libtool script.
--debug enable verbose shell tracing
--disable-shared do not build shared libraries
--disable-static do not build static libraries
+ --disable-fast-install do not optimize for fast installation
+ --enable-dlopen enable dlopen support
+ --enable-dlopen-self enable support for dlopening programs
--help display this help and exit
--no-verify do not verify that HOST is a valid host type
-o, --output=FILE specify the output file [default=$default_ofile]
@@ -166,9 +245,11 @@ Generate a system-specific libtool script.
--version output version information and exit
--with-gcc assume that the GNU C compiler will be used
--with-gnu-ld assume that the C compiler uses the GNU linker
+ --disable-lock disable file locking
+ --cache-file=FILE configure cache file
-LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
-functionality.
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
HOST is the canonical host system name [default=guessed].
EOM
@@ -184,6 +265,10 @@ EOM
--disable-static) enable_static=no ;;
+ --disable-fast-install) enable_fast_install=no ;;
+
+ --enable-dlopen) enable_dlopen=yes ;;
+
--quiet | --silent) silent=yes ;;
--srcdir) prev=srcdir ;;
@@ -194,11 +279,15 @@ EOM
--output | -o) prev=ofile ;;
--output=*) ofile="$optarg" ;;
- --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
--with-gcc) with_gcc=yes ;;
--with-gnu-ld) with_gnu_ld=yes ;;
+ --disable-lock) need_locks=no ;;
+
+ --cache-file=*) cache_file="$optarg" ;;
+
-*)
echo "$progname: unrecognized option \`$option'" 1>&2
echo "$help" 1>&2
@@ -269,6 +358,11 @@ exec 5>>./config.log
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test -n "$cache_file" && test -r "$cache_file"; then
+ echo "loading cache $cache_file within ltconfig"
+ . $cache_file
+fi
+
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -282,8 +376,8 @@ else
fi
if test -z "$srcdir"; then
- # Assume the source directory is the same one as the path to ltmain.sh.
- srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
+ # Assume the source directory is the same one as the path to LTMAIN.
+ srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
test "$srcdir" = "$ltmain" && srcdir=.
fi
@@ -374,7 +468,7 @@ if test "${RANLIB+set}" != "set"; then
result=no
echo $ac_n "checking for ranlib... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH; do
test -z "$dir" && dir=.
if test -f $dir/ranlib; then
@@ -389,11 +483,11 @@ if test "${RANLIB+set}" != "set"; then
fi
if test -n "$RANLIB"; then
- old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds"
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
fi
-# Set sane defaults for `DLLTOOL' and `AS', used on cygwin32.
+# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$AS" && AS=as
@@ -402,7 +496,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# If CC is not set, then try to find GCC or a usable CC.
if test -z "$CC"; then
echo $ac_n "checking for gcc... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH; do
IFS="$save_ifs"
test -z "$dir" && dir=.
@@ -423,7 +517,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
if test -z "$CC"; then
echo $ac_n "checking for cc... $ac_c" 1>&6
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
cc_rejected=no
for dir in $PATH; do
test -z "$dir" && dir=.
@@ -467,7 +561,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Now see if the compiler is really GCC.
with_gcc=no
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
- echo "$progname:470: checking whether we are using GNU C" >&5
+ echo "$progname:564: checking whether we are using GNU C" >&5
$rm conftest.c
cat > conftest.c <<EOF
@@ -475,7 +569,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
yes;
#endif
EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:478: \"$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 $progname:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
fi
$rm conftest.c
@@ -489,8 +583,8 @@ compiler="$2"
echo $ac_n "checking for object suffix... $ac_c" 1>&6
$rm conftest*
echo 'int i = 1;' > conftest.c
-echo "$progname:492: checking for object suffix" >& 5
-if { (eval echo $progname:493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
+echo "$progname:586: checking for object suffix" >& 5
+if { (eval echo $progname:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
@@ -518,13 +612,21 @@ no_builtin_flag=
if test "$with_gcc" = yes; then
wl='-Wl,'
link_static_flag='-static'
- no_builtin_flag=' -fno-builtin'
case "$host_os" in
- aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
+ beos* | irix5* | irix6* | osf3* | osf4*)
# PIC is the default for these OSes.
;;
- cygwin32* | mingw32* | os2*)
+ aix*)
+ # Below there is a dirty hack to force normal static linking with -ldl
+ # The problem is because libdl dynamically linked with both libc and
+ # libC (AIX C++ library), which obviously doesn't included in libraries
+ # list by gcc. This cause undefined symbols with -static flags.
+ # This hack allows C programs to be linked with "-static -ldl", but
+ # we not sure about C++ programs.
+ link_static_flag="$link_static_flag ${wl}-lC"
+ ;;
+ cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
amigaos*)
@@ -558,7 +660,7 @@ else
# PIC (with -KPIC) is the default.
;;
- cygwin32* | mingw32* | os2*)
+ cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
@@ -574,7 +676,7 @@ else
special_shlib_compile_flags='-belf'
;;
- solaris2*)
+ solaris*)
pic_flag='-KPIC'
link_static_flag='-Bstatic'
wl='-Wl,'
@@ -586,7 +688,7 @@ else
wl='-Qoption ld '
;;
- sysv4.2uw2*)
+ sysv4.2uw2* | sysv4.3* | sysv5*)
pic_flag='-KPIC'
link_static_flag='-Bstatic'
wl='-Wl,'
@@ -612,33 +714,156 @@ if test -n "$pic_flag"; then
echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC"
- echo "$progname:615: checking if $compiler PIC flag $pic_flag works" >&5
- if { (eval echo $progname:616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ echo "$progname:717: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
+
+ case "$host_os" in
+ hpux9* | hpux10* | hpux11*)
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ can_build_shared=no
+ pic_flag=
+ else
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ fi
+ ;;
+ *)
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ ;;
+ esac
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ can_build_shared=no
+ pic_flag=
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ echo "$ac_t"none 1>&6
+fi
- # On HP-UX, both CC and GCC only warn that PIC is supported... then they
- # create non-PIC objects. So, if there were any warnings, we assume that
- # PIC is not supported.
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm conftest*
+echo "int some_variable = 0;" > conftest.c
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -c -o conftest2.o"
+echo "$progname:760: checking if $compiler supports -c -o file.o" >&5
+if { (eval echo $progname:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
if test -s conftest.err; then
echo "$ac_t"no 1>&6
- can_build_shared=no
- pic_flag=
+ compiler_c_o=no
else
echo "$ac_t"yes 1>&6
- pic_flag=" $pic_flag"
+ compiler_c_o=yes
fi
+else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_c_o=no
+ echo "$ac_t"no 1>&6
+fi
+CFLAGS="$save_CFLAGS"
+$rm conftest*
+
+if test x"$compiler_c_o" = x"yes"; then
+ # Check to see if we can write to a .lo
+ echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -c -o conftest.lo"
+ echo "$progname:788: checking if $compiler supports -c -o file.lo" >&5
+if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_o_lo=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_o_lo=yes
+ fi
else
# Append any errors to the config.log.
cat conftest.err 1>&5
- can_build_shared=no
- pic_flag=
+ compiler_o_lo=no
echo "$ac_t"no 1>&6
fi
CFLAGS="$save_CFLAGS"
$rm conftest*
else
- echo "$ac_t"none 1>&6
+ compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$ac_t$hard_links" 1>&6
+ $rm conftest*
+ if test "$hard_links" = no; then
+ echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+if test "$with_gcc" = yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
+ echo "$progname:840: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_rtti_exceptions=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_rtti_exceptions=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_rtti_exceptions=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+
+ if test "$compiler_rtti_exceptions" = "yes"; then
+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=' -fno-builtin'
+ fi
+
fi
# Check for any special shared library compilation flags.
@@ -656,8 +881,8 @@ $rm conftest*
echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:659: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+echo "$progname:884: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$ac_t$link_static_flag" 1>&6
else
echo "$ac_t"none 1>&6
@@ -689,11 +914,17 @@ if test -z "$LD"; then
if test "$with_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
- echo "$progname:692: checking for ld used by GCC" >&5
+ echo "$progname:917: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
- /* | [A-Za-z]:[/\\]*)
+ /* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
test -z "$LD" && LD="$ac_prog"
;;
"")
@@ -707,14 +938,14 @@ if test -z "$LD"; then
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
- echo "$progname:710: checking for GNU ld" >&5
+ echo "$progname:941: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
- echo "$progname:713: checking for non-GNU ld" >&5
+ echo "$progname:944: checking for non-GNU ld" >&5
fi
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog"; then
@@ -759,107 +990,146 @@ echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c
allow_undefined_flag=
no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
archive_cmds=
+archive_expsym_cmds=
old_archive_from_new_cmds=
export_dynamic_flag_spec=
whole_archive_flag_spec=
+thread_safe_flag_spec=
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
runpath_var=
-fix_srcfile_path=
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms=
case "$host_os" in
-aix3* | aix4*)
- # On AIX, the GNU linker works like the native linker.
- with_gnu_ld=no
+cygwin* | mingw*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$with_gcc" != yes; then
+ with_gnu_ld=no
+ fi
;;
+
+freebsd2* | sunos4*)
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ ;;
+
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
# See if GNU ld supports shared libraries.
case "$host_os" in
+ aix3* | aix4*)
+ # On AIX, the GNU linker is very broken
+ ld_shlibs=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ ;;
+
amigaos*)
- archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
sunos4*)
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
+ wlarc=
hardcode_direct=yes
- # The GNU linker will only hardcode -L options if -rpath is not
- # used, but we will be using -rpath because we set
- # hardcode_libdir_flag_spec below.
- hardcode_minus_L=no
+ hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
- cygwin32* | mingw32*)
- if test "$with_gcc" = yes; then
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- # Very, very bogus.
- echo '
-#include <windows.h>
-
-struct _reent *_impure_ptr;
-extern struct _reent *__imp_reent_data;
-BOOL APIENTRY
-__dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
-{
- _impure_ptr = __imp_reent_data;
-}
-' > libtool.c
- archive_cmds='$CC -c '"`pwd`"'/libtool.c;echo EXPORTS > $soname-def;$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' >> $soname-def;$LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;$rm libtool.$objext $soname-base $soname-exp'
- old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a;$rm $soname-def'
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
else
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- with_gnu_ld=no
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll;linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs'
- fix_srcfile_path='`cygpath -w $srcfile`'
+ ld_shlibs=no
fi
;;
+ cygwin* | mingw*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
+ sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+ (cd $objdir && $CC -c $soname-ltdll.c)~
+ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
+
+ archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
+ _lt_hint=1;
+ for symbol in `cat $export_symbols`; do
+ echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done~
+ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
+
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
+ ;;
+
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
- if test "$ld_shlibs" = yes && test "$with_gnu_ld" = yes; then
+ if test "$ld_shlibs" = yes; then
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
- whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case "$host_os" in
aix3*)
allow_undefined_flag=unsupported
- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
@@ -871,55 +1141,58 @@ else
;;
aix4*)
- allow_undefined_flag=unsupported
- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname'
- hardcode_direct=yes
+ allow_undefined_flag=
+ if test "$with_gcc" = yes; then
+ if strings `${CC} -print-prog-name=collect2` | \
+ grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ fi
+ archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
+ else
+ always_export_symbols=yes
+ archive_expsym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
+ hardcode_direct=yes
+ fi
hardcode_minus_L=yes
- ;;
+ # Though LIBPATH variable hardcodes shlibpath into executable,
+ # it doesn't affect searching for -l* libraries; this confuses
+ # tests in mdemo.
+ hardcode_shlibpath_var=unsupported
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
amigaos*)
- archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
- cygwin32* | mingw32*)
- if test "$with_gcc" = yes; then
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- # Very, very bogus.
- echo '
-#include <windows.h>
-
-struct _reent *_impure_ptr;
-extern struct _reent *__imp_reent_data;
-BOOL APIENTRY
-__dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
-{
- _impure_ptr = __imp_reent_data;
-}
-' > libtool.c
- archive_cmds='$CC -c '"`pwd`"'/libtool.c;echo EXPORTS > $soname-def;$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' >> $soname-def;$LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs;$rm libtool.$objext $soname-base $soname-exp'
- old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a;$rm $soname-def'
- else
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll;linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs'
- fix_srcfile_path='`cygpath -w $srcfile`'
- fi
+ cygwin* | mingw*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+ fix_srcfile_path='`cygpath -w $srcfile`'
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ can_build_shared=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
@@ -927,24 +1200,24 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
- hardcode_minus_L=yes
+ hardcode_minus_L=no # verified on 2.2.6
hardcode_shlibpath_var=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
- # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
- freebsd3*)
- archive_cmds='$CC -shared -o $lib$libobjs'
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_minus_L=no
@@ -952,7 +1225,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
;;
hpux9*)
- archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
+ archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -960,7 +1233,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
;;
hpux10* | hpux11*)
- archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
+ archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -969,23 +1242,27 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
irix5* | irix6*)
if test "$with_gcc" = yes; then
- archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
else
- archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
+ archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
;;
netbsd*)
- # Tested with NetBSD 1.2 ld
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
- hardcode_libdir_flag_spec='-R$libdir'
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
+ fi
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
@@ -995,46 +1272,70 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
;;
osf3* | osf4*)
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+ fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
sco3.2v5*)
- archive_cmds='$LD -G -o $lib$libobjs'
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
hardcode_direct=yes
;;
- solaris2*)
+ solaris*)
no_undefined_flag=' -z text'
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
-
- # Solaris 2 before 2.5 hardcodes -L paths.
- case "$host_os" in
- solaris2.[0-4]*)
- hardcode_minus_L=yes
- ;;
- esac
;;
sunos4*)
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
+ # Why do we need -Bstatic? To avoid inter-library dependencies, maybe...
+ if test "$with_gcc" = yes; then
+ # Use -fPIC here because libgcc is multilibbed
+ archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
+ fi
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
uts4*)
- archive_cmds='$LD -G -h $soname -o $lib$libobjs'
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
hardcode_minus_L=no
@@ -1054,21 +1355,23 @@ if test -z "$NM"; then
case "$NM" in
/* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/nm; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- NM="$ac_dir/nm -B"
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- NM="$ac_dir/nm -p"
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -p"
+ break
else
- NM="$ac_dir/nm"
+ NM=${NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
fi
- break
fi
done
IFS="$ac_save_ifs"
@@ -1085,52 +1388,51 @@ echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
# Character class describing NM global symbol codes.
-symcode='[BCDEGRSTU]'
+symcode='[BCDEGRST]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \1'
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
# Define system-specific variables.
case "$host_os" in
aix*)
- symcode='[BCDTU]'
+ symcode='[BCDT]'
;;
-cygwin32* | mingw32*)
- sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
- symxfrm='_\1 \1'
+cygwin* | mingw*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
;;
irix*)
- # Cannot use undefined symbols on IRIX because inlined functions mess us up.
symcode='[BCDEGRST]'
;;
-solaris2*)
- symcode='[BDTU]'
+solaris*)
+ symcode='[BDT]'
;;
esac
# If we're using GNU nm, then use its standard symbol codes.
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[ABCDGISTUW]'
+ symcode='[ABCDGISTW]'
fi
-case "$host_os" in
-cygwin32* | mingw32*)
- # We do not want undefined symbols on cygwin32. The user must
- # arrange to define them via -l arguments.
- symcode='[ABCDGISTW]'
- ;;
-esac
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
-# Write the raw and C identifiers.
-global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
+ # Write the raw and C identifiers.
+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
-# Check to see that the pipe works correctly.
-pipe_works=no
-$rm conftest*
-cat > conftest.c <<EOF
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+ $rm conftest*
+ cat > conftest.c <<EOF
#ifdef __cplusplus
extern "C" {
#endif
@@ -1142,93 +1444,96 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
-echo "$progname:1145: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:1146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { echo "$progname:1149: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
-
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- wcout=`wc "$nlist" 2>/dev/null`
- count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
- (test "$count" -ge 0) 2>/dev/null || count=-1
- else
- rm -f "$nlist"T
- count=-1
- fi
+ echo "$progname:1447: checking if global_symbol_pipe works" >&5
+ if { (eval echo $progname:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { echo "$progname:1451: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.c
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.c
#ifdef __cplusplus
extern "C" {
#endif
EOF
- # Now generate the symbol file.
- sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
+ # Now generate the symbol file.
+ eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
- cat <<EOF >> conftest.c
+ cat <<EOF >> conftest.c
#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
+# define lt_ptr_t void *
#else
-# define __ptr_t char *
+# define lt_ptr_t char *
+# define const
#endif
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
/* The mapping between symbol names and symbols. */
-struct {
- char *name;
- __ptr_t address;
+const struct {
+ const char *name;
+ lt_ptr_t address;
}
-dld_preloaded_symbols[] =
+lt_preloaded_symbols[] =
{
EOF
- sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
- cat <<\EOF >> conftest.c
- {0, (__ptr_t) 0}
+ sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (lt_ptr_t) 0}
};
#ifdef __cplusplus
}
#endif
EOF
- # Now try linking the two files.
- mv conftest.$objext conftestm.$objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="conftestm.$objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- pipe_works=yes
- else
- echo "$progname: failed program was:" >&5
- cat conftest.c >&5
- fi
- LIBS="$save_LIBS"
+ # Now try linking the two files.
+ mv conftest.$objext conftestm.$objext
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="conftestm.$objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if { (eval echo $progname:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ pipe_works=yes
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ LIBS="$save_LIBS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
else
- echo "cannot find nm_test_func in $nlist" >&5
+ echo "cannot find nm_test_var in $nlist" >&5
fi
else
- echo "cannot find nm_test_var in $nlist" >&5
+ echo "cannot run $global_symbol_pipe" >&5
fi
else
- echo "cannot run $global_symbol_pipe" >&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
fi
-else
- echo "$progname: failed program was:" >&5
- cat conftest.c >&5
-fi
-$rm conftest*
+ $rm conftest*
-# Do not use the global_symbol_pipe unless it works.
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ global_symbol_pipe=
+ fi
+done
echo "$ac_t$pipe_works" 1>&6
-test "$pipe_works" = yes || global_symbol_pipe=
+
+if test -z "$global_symbol_pipe"; then
+ global_symbol_to_cdecl=
+fi
# Check hardcoding attributes.
echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
@@ -1272,12 +1577,27 @@ postuninstall_cmds=
finish_cmds=
finish_eval=
shlibpath_var=
+shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
-
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+file_magic_cmd=
+file_magic_test_file=
+deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
case "$host_os" in
-aix3* | aix4*)
+aix3*)
version_type=linux
library_names_spec='${libname}${release}.so$versuffix $libname.a'
shlibpath_var=LIBPATH
@@ -1286,13 +1606,47 @@ aix3* | aix4*)
soname_spec='${libname}${release}.so$major'
;;
+aix4*)
+ version_type=linux
+ # AIX has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ # We preserve .a as extension for shared libraries though AIX4.2
+ # and later linker supports .so
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
+ shlibpath_var=LIBPATH
+ deplibs_check_method=pass_all
+ ;;
+
amigaos*)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
;;
-cygwin32* | mingw32*)
+beos*)
+ library_names_spec='${libname}.so'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ library_names_spec='${libname}.so$major ${libname}.so'
+ soname_spec='${libname}.so'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='file_magic ELF 32-bit LSB shared object'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw*)
version_type=windows
if test "$with_gcc" = yes; then
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
@@ -1300,13 +1654,36 @@ cygwin32* | mingw32*)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
fi
dynamic_linker='Win32 ld.exe'
+ deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
+ file_magic_cmd='objdump -f'
+ need_lib_prefix=no
+ # FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-freebsd2* | freebsd3*)
- version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix $libname.so'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ case "$version_type" in
+ freebsd-elf*)
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so*`
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ deplibs_check_method=unknown
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ need_version=yes
+ ;;
+ esac
+ finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -1321,6 +1698,8 @@ hpux9* | hpux10* | hpux11*)
# link against other versions.
dynamic_linker="$host_os dld.sl"
version_type=sunos
+ need_lib_prefix=no
+ need_version=no
shlibpath_var=SHLIB_PATH
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
soname_spec='${libname}${release}.sl$major'
@@ -1328,11 +1707,40 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-irix5* | irix6*)
- version_type=osf
+irix5*)
+ version_type=irix
soname_spec='${libname}${release}.so'
- library_names_spec='${libname}${release}.so$versuffix $libname.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all?
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libc.so*`
+ shlibpath_overrides_runpath=no
+ ;;
+
+irix6*)
+ version_type=irix
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ # even though /usr/local/lib is always searched, the man-page says
+ # shared libraries should not be installed there if they use an ABI
+ # different from -32, so we'd better not search for shared libraries
+ # there either
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all?
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib${libsuff}/libc.so*`
;;
# No shared lib support for Linux oldld, aout, or coff.
@@ -1343,10 +1751,16 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
# This must be Linux ELF.
linux-gnu*)
version_type=linux
+ need_lib_prefix=no
+ need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
if test -f /lib/ld.so.1; then
dynamic_linker='GNU ld.so'
@@ -1359,15 +1773,34 @@ linux-gnu*)
fi
;;
-netbsd* | openbsd*)
+netbsd*)
version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix'
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec='${libname}${release}.so$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+openbsd*)
+ version_type=sunos
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ need_version=no
+ fi
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
;;
os2*)
libname_spec='$name'
+ need_lib_prefix=no
library_names_spec='$libname.dll $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
@@ -1376,8 +1809,18 @@ os2*)
osf3* | osf4*)
version_type=osf
soname_spec='${libname}${release}.so'
- library_names_spec='${libname}${release}.so$versuffix $libname.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH
+ # deplibs_check_method='pass_all'
+ # Although pass_all appears to work, it copies symbols from static libraries
+ # into shared ones and exports them. So, when a program is linked with two
+ # or more libraries that have got copies of the same symbols, link fails
+ # This was only tested on osf4:
+ deplibs_check_method='file_magic COFF format alpha shared library'
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/shlib/libc.so
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
sco3.2v5*)
@@ -1387,13 +1830,19 @@ sco3.2v5*)
shlibpath_var=LD_LIBRARY_PATH
;;
-solaris2*)
+solaris*)
version_type=linux
+ need_lib_prefix=no
+ need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
# ldd complains unless libraries are executable
postinstall_cmds='chmod +x $lib'
+ deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=/lib/libc.so
;;
sunos4*)
@@ -1401,13 +1850,23 @@ sunos4*)
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
;;
-sysv4.2uw2*)
+sysv4.2uw2* | sysv4.3* | sysv5*)
version_type=linux
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
+ case "$host_vendor" in
+ ncr)
+ deplibs_check_method='pass_all'
+ ;;
+ esac
;;
uts4*)
@@ -1417,29 +1876,66 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
*)
dynamic_linker=no
;;
esac
-echo "$ac_t$dynamic_linker"
+echo "$ac_t$dynamic_linker" 1>&6
test "$dynamic_linker" = no && can_build_shared=no
# Report the final consequences.
echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
+if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
+ case "$deplibs_check_method" in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ egrep "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+fi
+
echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case "$host_os" in
-aix*)
+aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds;\$RANLIB \$lib"
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
+
+aix4*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
esac
echo "$ac_t$enable_shared" 1>&6
@@ -1449,6 +1945,15 @@ test "$enable_shared" = yes || enable_static=yes
echo "checking whether to build static libraries... $enable_static" 1>&6
+if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
echo $ac_n "checking for objdir... $ac_c" 1>&6
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
@@ -1461,46 +1966,502 @@ fi
rmdir .libs 2>/dev/null
echo "$ac_t$objdir" 1>&6
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
+ lt_cv_dlopen=no lt_cv_dlopen_libs=
+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+echo "$progname:1977: checking for dlopen" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1982 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+dlopen();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_dlopen=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "$progname:2022: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2030 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo $progname:2040: \"$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
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+echo "$progname:2059: checking for dld_link in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2067 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link();
+
+int main() {
+dld_link()
+; return 0; }
+EOF
+if { (eval echo $progname:2077: \"$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
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+echo "$progname:2096: checking for shl_load" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2101 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+shl_load();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shl_load=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="shl_load"
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
+echo "$progname:2141: checking for LoadLibrary" >&5
+if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2146 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char LoadLibrary(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char LoadLibrary();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
+choke me
+#else
+LoadLibrary();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_LoadLibrary=yes"
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_LoadLibrary=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ lt_cv_dlopen="LoadLibrary"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+fi
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ fi
+
+ case "$lt_cv_dlopen" in
+ dlopen)
+for ac_hdr in dlfcn.h; do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "$progname:2210: 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 2215 "ltconfig"
+#include <$ac_hdr>
+int fnord = 0;
+EOF
+ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo $progname:2220: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ if test "x$ac_cv_header_dlfcn_h" = xyes; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ fi
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2248: checking whether a program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self=cross
+ else
+ cat > conftest.c <<EOF
+#line 2256 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) exit(0); } exit(1); }
+
+EOF
+if { (eval echo $progname:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
+
+ if test "$lt_cv_dlopen_self" = yes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2321: checking whether a statically linked program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ lt_cv_dlopen_self_static=cross
+ else
+ cat > conftest.c <<EOF
+#line 2329 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LTDL_GLOBAL DL_GLOBAL
+# else
+# define LTDL_GLOBAL 0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LTDL_LAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LTDL_LAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LTDL_LAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LTDL_LAZY_OR_NOW DL_NOW
+# else
+# define LTDL_LAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+ if(ptr1 || ptr2) exit(0); } exit(1); }
+
+EOF
+if { (eval echo $progname:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ lt_cv_dlopen_self_static=yes
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ lt_cv_dlopen_self_static=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
+fi
+ ;;
+ esac
+
+ case "$lt_cv_dlopen_self" in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case "$lt_cv_dlopen_self_static" in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
# Copy echo and quote the copy, instead of the original, because it is
# used later.
ltecho="$echo"
+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ ltecho="$CONFIG_SHELL \$0 --fallback-echo"
+fi
+LTSHELL="$SHELL"
-# Now quote all the things that may contain metacharacters.
-for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
- old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM DLLTOOL AS reload_flag \
- reload_cmds wl pic_flag link_static_flag no_builtin_flag \
- export_dynamic_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec RANLIB \
- old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
- allow_undefined_flag no_undefined_flag objext libext \
- finish_cmds finish_eval global_symbol_pipe fix_srcfile_path \
- hardcode_libdir_flag_spec hardcode_libdir_separator; do
-
- case "$var" in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
- postinstall_cmds | postuninstall_cmds | finish_cmds)
- # Double-quote double-evaled strings.
- eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
- ;;
- *)
- eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
+LTCONFIG_VERSION="$VERSION"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+ # Now quote all the things that may contain metacharacters.
+ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+ old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
+ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+ hardcode_libdir_flag_spec hardcode_libdir_separator \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+ case "$var" in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case "$ltecho" in
+ *'\$0 --fallback-echo"')
+ ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
-done
-trap "$rm \"$ofile\"; exit 1" 1 2 15
-echo "creating $ofile"
-$rm "$ofile"
-cat <<EOF > "$ofile"
+ trap "$rm \"$ofile\"; exit 1" 1 2 15
+ echo "creating $ofile"
+ $rm "$ofile"
+ cat <<EOF > "$ofile"
#! $SHELL
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -1530,10 +2491,34 @@ Xsed="sed -e s/^X//"
if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
### BEGIN LIBTOOL CONFIG
+EOF
+ cfgfile="$ofile"
+ ;;
+
+*)
+ # Double-quote the variables that need it (for aesthetics).
+ for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+ old_LN_S old_DLLTOOL old_AS; do
+ eval "$var=\\\"\$var\\\""
+ done
+
+ # Just create a config file.
+ cfgfile="$ofile.cfg"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ echo "creating $cfgfile"
+ $rm "$cfgfile"
+ cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+EOF
+ ;;
+esac
+
+cat <<EOF >> "$cfgfile"
# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
-# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
-# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
# $0$ltconfig_args
#
@@ -1541,10 +2526,10 @@ if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
# debugging $progname, is in ./config.log if it exists.
# The version of $progname that generated this script.
-LTCONFIG_VERSION="$VERSION"
+LTCONFIG_VERSION=$LTCONFIG_VERSION
# Shell to use when invoking shell scripts.
-SHELL="$SHELL"
+SHELL=$LTSHELL
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
@@ -1552,43 +2537,46 @@ build_libtool_libs=$enable_shared
# Whether or not to build static libraries.
build_old_libs=$enable_static
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
# The host system.
-host_alias="$host_alias"
-host="$host"
+host_alias=$host_alias
+host=$host
# An echo program that does not interpret backslashes.
-echo="$ltecho"
+echo=$ltecho
# The archiver.
-AR="$AR"
+AR=$AR
# The default C compiler.
-CC="$CC"
+CC=$CC
# The linker used to build libraries.
-LD="$LD"
+LD=$LD
# Whether we need hard or soft links.
-LN_S="$LN_S"
+LN_S=$LN_S
# A BSD-compatible nm program.
-NM="$NM"
+NM=$NM
-# Used on cygwin32: DLL creation program.
+# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"
-# Used on cygwin32: assembler.
+# Used on cygwin: assembler.
AS="$AS"
# The name of the directory that contains temporary libtool files.
-objdir="$objdir"
+objdir=$objdir
# How to create reloadable object files.
-reload_flag="$reload_flag"
-reload_cmds="$reload_cmds"
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
# How to pass a linker flag through the compiler.
-wl="$wl"
+wl=$wl
# Object file suffix (normally "o").
objext="$objext"
@@ -1597,61 +2585,98 @@ objext="$objext"
libext="$libext"
# Additional compiler flags for building library objects.
-pic_flag="$pic_flag"
+pic_flag=$pic_flag
+
+# Does compiler simultaneously support -c and -o options
+compiler_c_o=$compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
-link_static_flag="$link_static_flag"
+link_static_flag=$link_static_flag
# Compiler flag to turn off builtin functions.
-no_builtin_flag="$no_builtin_flag"
+no_builtin_flag=$no_builtin_flag
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="$export_dynamic_flag_spec"
+export_dynamic_flag_spec=$export_dynamic_flag_spec
# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="$whole_archive_flag_spec"
+whole_archive_flag_spec=$whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$thread_safe_flag_spec
# Library versioning type.
version_type=$version_type
# Format of library name prefix.
-libname_spec="$libname_spec"
+libname_spec=$libname_spec
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
-library_names_spec="$library_names_spec"
+library_names_spec=$library_names_spec
# The coded name of the library, if different from the real name.
-soname_spec="$soname_spec"
+soname_spec=$soname_spec
# Commands used to build and install an old-style archive.
-RANLIB="$RANLIB"
-old_archive_cmds="$old_archive_cmds"
-old_postinstall_cmds="$old_postinstall_cmds"
-old_postuninstall_cmds="$old_postuninstall_cmds"
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds="$old_archive_from_new_cmds"
+old_archive_from_new_cmds=$old_archive_from_new_cmds
# Commands used to build and install a shared archive.
-archive_cmds="$archive_cmds"
-postinstall_cmds="$postinstall_cmds"
-postuninstall_cmds="$postuninstall_cmds"
+archive_cmds=$archive_cmds
+archive_expsym_cmds=$archive_expsym_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic
+file_magic_cmd=$file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag="$allow_undefined_flag"
+allow_undefined_flag=$allow_undefined_flag
# Flag that forces no undefined symbols.
-no_undefined_flag="$no_undefined_flag"
+no_undefined_flag=$no_undefined_flag
# Commands used to finish a libtool library installation in a directory.
-finish_cmds="$finish_cmds"
+finish_cmds=$finish_cmds
# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval="$finish_eval"
+finish_eval=$finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="$global_symbol_pipe"
+global_symbol_pipe=$global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$global_symbol_to_cdecl
# This is the shared library runtime path variable.
runpath_var=$runpath_var
@@ -1659,15 +2684,18 @@ runpath_var=$runpath_var
# This is the shared library path variable.
shlibpath_var=$shlibpath_var
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
+hardcode_libdir_separator=$hardcode_libdir_separator
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
@@ -1681,13 +2709,36 @@ hardcode_minus_L=$hardcode_minus_L
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required
+always_export_symbols=$always_export_symbols
+
+# The command to extract exported symbols
+export_symbols_cmds=$export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols
+exclude_expsyms=$exclude_expsyms
+
+# Symbols that must always be exported
+include_expsyms=$include_expsyms
+
EOF
-case "$host_os" in
-aix3*)
- cat <<\EOF >> "$ofile"
+case "$ltmain" in
+*.sh)
+ echo '### END LIBTOOL CONFIG' >> "$ofile"
+ echo >> "$ofile"
+ case "$host_os" in
+ aix3*)
+ cat <<\EOF >> "$ofile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
@@ -1697,16 +2748,72 @@ if test "${COLLECT_NAMES+set}" != set; then
export COLLECT_NAMES
fi
EOF
+ ;;
+ esac
+
+ # Append the ltmain.sh script.
+ cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+
+ chmod +x "$ofile"
+ ;;
+
+*)
+ # Compile the libtool program.
+ echo "FIXME: would compile $ltmain"
;;
esac
-echo '### END LIBTOOL CONFIG' >> "$ofile"
-echo >> "$ofile"
+test -n "$cache_file" || exit 0
-# Append the ltmain.sh script.
-cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+# AC_CACHE_SAVE
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
-chmod +x "$ofile"
exit 0
# Local Variables:
diff --git a/gnu/egcs/ltmain.sh b/gnu/egcs/ltmain.sh
index eee5763387b..bfc7e9d7ad3 100644
--- a/gnu/egcs/ltmain.sh
+++ b/gnu/egcs/ltmain.sh
@@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun ltconfig.
#
-# Copyright (C) 1996-1998 Free Software Foundation, Inc.
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -27,6 +27,13 @@
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
+elif test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
# Yippee, $echo works!
:
@@ -42,7 +49,8 @@ modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.2b
+VERSION=1.2f
+TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
default_mode=
help="Try \`$progname --help' for more information."
@@ -53,8 +61,10 @@ rm="rm -f"
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \012 \040'
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
@@ -90,7 +100,6 @@ show="$echo"
show_help=
execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
-los2o="s/\\.lo /.${objext} /g"
# Parse our command line options once, thoroughly.
while test $# -gt 0
@@ -126,7 +135,7 @@ do
;;
--version)
- echo "$PROGRAM (GNU $PACKAGE) $VERSION"
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
exit 0
;;
@@ -201,12 +210,12 @@ if test -z "$show_help"; then
mode=link
for arg
do
- case "$arg" in
- -c)
- mode=compile
- break
- ;;
- esac
+ case "$arg" in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
done
;;
*db | *dbx | *strace | *truss)
@@ -224,11 +233,11 @@ if test -z "$show_help"; then
# Just use the default operation mode.
if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
fi
;;
esac
@@ -256,14 +265,17 @@ if test -z "$show_help"; then
srcfile="$nonopt"
suppress_output=
+ user_target=no
for arg
do
# Accept any command-line options.
case "$arg" in
-o)
- $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
;;
-static)
@@ -272,6 +284,20 @@ if test -z "$show_help"; then
;;
esac
+ case "$user_target" in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
# Accept the current argument as the source file.
lastarg="$srcfile"
srcfile="$arg"
@@ -300,11 +326,22 @@ if test -z "$show_help"; then
fi
done
- # Get the name of the library object.
- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ case "$user_target" in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
# Recognize several different file suffixes.
- xform='[cCFSfms]'
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
case "$libobj" in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
@@ -323,7 +360,7 @@ if test -z "$show_help"; then
case "$libobj" in
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
- $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
exit 1
;;
esac
@@ -336,11 +373,50 @@ if test -z "$show_help"; then
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
- $run $rm $obj $libobj
- trap "$run $rm $obj $libobj; exit 1" 1 2 15
+ removelist="$obj $libobj"
+ else
+ removelist="$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
else
- $run $rm $libobj
- trap "$run $rm $libobj; exit 1" 1 2 15
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
@@ -353,23 +429,101 @@ if test -z "$show_help"; then
fbsd_hideous_sh_bug=$base_compile
# All platforms use -DPIC, to notify preprocessed assembler code.
- $show "$base_compile$pic_flag -DPIC $srcfile"
- if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
+ command="$base_compile $pic_flag -DPIC $srcfile"
+ if test "$build_old_libs" = yes; then
+ lo_libobj="$libobj"
+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$libobj"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" = yes; then
+ output_obj="$libobj"
+ command="$command -o $output_obj"
+ elif test "$compiler_c_o" = yes; then
+ output_obj="$obj"
+ command="$command -o $output_obj"
+ fi
+
+ $show "$command"
+ if $run eval "$command"; then :
else
- test -n "$obj" && $run $rm $obj
- exit 1
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
fi
- # If we have no pic_flag, then copy the object into place and finish.
- if test -z "$pic_flag"; then
- $show "$LN_S $obj $libobj"
- $run $LN_S $obj $libobj
- exit $?
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
fi
- # Just move the object, then go on to compile the next one
- $show "$mv $obj $libobj"
- $run $mv $obj $libobj || exit $?
+ # Just move the object if needed, then go on to compile the next one
+ if test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if test -z "$pic_flag" && test "$build_old_libs" = yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ # Now arrange that obj and lo_libobj become the same file
+ $show "$LN_S $obj $lo_libobj"
+ if $run $LN_S $obj $lo_libobj; then
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
# Allow error messages only from the first compilation.
suppress_output=' >/dev/null 2>&1'
@@ -377,20 +531,72 @@ if test -z "$show_help"; then
# Only build a position-dependent object if we build old libraries.
if test "$build_old_libs" = yes; then
+ command="$base_compile $srcfile"
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
# Suppress compiler output if we already did a PIC compilation.
- $show "$base_compile $srcfile$suppress_output"
- if $run eval "$base_compile \$srcfile$suppress_output"; then :
+ command="$command$suppress_output"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
else
- $run $rm $obj $libobj
- exit 1
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
fi
fi
- # Create an invalid libtool object if no PIC, so that we do not
- # accidentally link it into a program.
- if test "$build_libtool_libs" != yes; then
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > \$libobj" || exit $?
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $rm "$lockfile"
fi
exit 0
@@ -399,31 +605,225 @@ if test -z "$show_help"; then
# libtool link mode
link)
modename="$modename: link"
+ C_compiler="$CC" # save it, to compile generated C sources
CC="$nonopt"
- allow_undefined=yes
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+#
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+# /* impgen.c starts here */
+# /* Copyright (C) 1999 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# */
+#
+# #include <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b = ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename = argv[1];
+#
+# dll = open(filename, O_RDONLY|O_BINARY);
+# if (!dll)
+# return 1;
+#
+# dll_name = filename;
+#
+# for (i=0; filename[i]; i++)
+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+# dll_name = filename + i +1;
+#
+# pe_header_offset = pe_get32 (dll, 0x3c);
+# opthdr_ofs = pe_header_offset + 4 + 20;
+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
+# export_size = pe_get32 (dll, opthdr_ofs + 100);
+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr = (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr = 0;
+# for (i = 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 = secptr + 40 * i;
+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# {
+# expptr = fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size = vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata = (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva = expdata - export_rva;
+#
+# nexp = pe_as32 (expdata+24);
+# name_rvas = pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i = 0; i<nexp; i++)
+# {
+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
compile_command="$CC"
finalize_command="$CC"
+ compile_rpath=
+ finalize_rpath=
compile_shlibpath=
finalize_shlibpath=
convenience=
old_convenience=
deplibs=
+ linkopts=
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ lib_search_path=
+ fi
+ # now prepend the system-specific ones
+ eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ avoid_version=no
dlfiles=
dlprefiles=
+ dlself=no
export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
generated=
- hardcode_libdirs=
libobjs=
link_against_libtool_libs=
ltlibs=
+ module=no
objs=
+ preload=no
prev=
prevarg=
release=
rpath=
+ xrpath=
perm_rpath=
temp_rpath=
+ thread_safe=no
vinfo=
# We need to know -static, to get the right output filenames.
@@ -431,13 +831,13 @@ if test -z "$show_help"; then
do
case "$arg" in
-all-static | -static)
- if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
- fi
- build_libtool_libs=no
+ fi
+ build_libtool_libs=no
build_old_libs=yes
- break
- ;;
+ break
+ ;;
esac
done
@@ -451,40 +851,74 @@ if test -z "$show_help"; then
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
- case "$prev" in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- ;;
- esac
-
- case "$prev" in
- dlfiles|dlprefiles)
- case "$arg" in
- *.la | *.lo) ;; # We handle these cases below.
- *)
- dlprefiles="$dlprefiles $arg"
- test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
- prev=
- ;;
- esac
- ;;
+ case "$prev" in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case "$prev" in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case "$arg" in
+ *.la | *.lo) ;; # We handle these cases below.
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ dlprefiles="$dlprefiles $arg"
+ test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
+ prev=
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
release)
release="-$arg"
prev=
continue
;;
- rpath)
- rpath="$rpath $arg"
+ rpath)
+ rpath="$rpath $arg"
prev=
continue
;;
- *)
- eval "$prev=\"\$arg\""
- prev=
- continue
- ;;
- esac
+ xrpath)
+ xrpath="$xrpath $arg"
+ prev=
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
fi
prevarg="$arg"
@@ -492,10 +926,11 @@ if test -z "$show_help"; then
case "$arg" in
-all-static)
if test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
+ compile_command="$compile_command $link_static_flag"
finalize_command="$finalize_command $link_static_flag"
- fi
- continue
+ dlopen_self=$dlopen_self_static
+ fi
+ continue
;;
-allow-undefined)
@@ -504,47 +939,91 @@ if test -z "$show_help"; then
continue
;;
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
-dlopen)
- prev=dlfiles
- continue
- ;;
+ prev=dlfiles
+ continue
+ ;;
-dlpreopen)
- prev=dlprefiles
- continue
- ;;
+ prev=dlprefiles
+ continue
+ ;;
-export-dynamic)
- if test "$export_dynamic" != yes; then
- export_dynamic=yes
+ if test "$export_dynamic" != yes; then
+ export_dynamic=yes
if test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
else
arg=
fi
+ fi
+ ;;
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
- fi
- ;;
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: cannot have more than one -exported-symbols"
+ exit 1
+ fi
+ if test "$arg" = "-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
-L*)
- dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
- case "$dir" in
- /* | [A-Za-z]:[/\\]*)
+ dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*)
# Add the corresponding hardcode_libdir_flag, if it is not identical.
- ;;
- *)
- $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
- exit 1
- ;;
- esac
- deplibs="$deplibs $arg"
- ;;
+ ;;
+ *)
+ $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
+ exit 1
+ ;;
+ esac
+ case " $deplibs " in
+ *" $arg "*) ;;
+ *) deplibs="$deplibs $arg";;
+ esac
+ case " $lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir";;
+ esac
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ case ":$dllsearchpath:" in
+ ::) dllsearchpath="$dllsearchdir";;
+ *":$dllsearchdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
+ esac
+ ;;
+ esac
+ ;;
- -l*) deplibs="$deplibs $arg" ;;
+ -l*)
+ deplibs="$deplibs $arg"
+ ;;
+ -module)
+ if test "$module" != yes; then
+ module=yes
+ if test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ else
+ arg=
+ fi
+ fi
+ ;;
+
-no-undefined)
allow_undefined=no
continue
@@ -558,23 +1037,39 @@ if test -z "$show_help"; then
;;
-rpath)
- prev=rpath
- continue
- ;;
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ continue
+ ;;
-static)
# If we have no pic_flag, then this is the same as -all-static.
if test -z "$pic_flag" && test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
+ compile_command="$compile_command $link_static_flag"
finalize_command="$finalize_command $link_static_flag"
- fi
+ dlopen_self=$dlopen_self_static
+ fi
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
continue
;;
-version-info)
- prev=vinfo
- continue
- ;;
+ prev=vinfo
+ continue
+ ;;
# Some other compiler flag.
-* | +*)
@@ -586,18 +1081,18 @@ if test -z "$show_help"; then
arg="\"$arg\""
;;
esac
- ;;
+ ;;
*.o | *.obj | *.a | *.lib)
- # A standard object.
- objs="$objs $arg"
- ;;
+ # A standard object.
+ objs="$objs $arg"
+ ;;
*.lo)
- # A library object.
+ # A library object.
if test "$prev" = dlfiles; then
dlfiles="$dlfiles $arg"
- if test "$build_libtool_libs" = yes; then
+ if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
prev=
continue
else
@@ -612,205 +1107,264 @@ if test -z "$show_help"; then
prev=
fi
libobjs="$libobjs $arg"
- ;;
+ ;;
*.la)
- # A libtool-controlled library.
-
- dlname=
- libdir=
- library_names=
- old_library=
-
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
- exit 1
- fi
-
- # If there is no directory component, then add one.
- case "$arg" in
- */* | *\\*) . $arg ;;
- *) . ./$arg ;;
- esac
-
- # Get the name of the library we link against.
- linklib=
- for l in $old_library $library_names; do
- linklib="$l"
- done
-
- if test -z "$linklib"; then
- $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
- exit 1
- fi
-
- # Find the relevant object directory and library name.
- name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
- dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$arg"; then
- dir="$objdir"
- else
- dir="$dir/$objdir"
- fi
-
- if test -z "$libdir"; then
+ # A libtool-controlled library.
+
+ dlname=
+ libdir=
+ library_names=
+ old_library=
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # If there is no directory component, then add one.
+ case "$arg" in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Find the relevant object directory and library name.
+ name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+
+ if test "X$installed" = Xyes; then
+ dir="$libdir"
+ else
+ dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$arg"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ fi
+
+ if test -n "$dependency_libs"; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for deplib in $dependency_libs; do
+ case "$deplib" in
+ -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ case " $rpath $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ -L*) case "$compile_command $temp_deplibs " in
+ *" $deplib "*) ;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $deplib";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ if test -z "$libdir"; then
# It is a libtool convenience library, so add in its objects.
- convenience="$convenience $dir/$old_library"l
+ convenience="$convenience $dir/$old_library"
old_convenience="$old_convenience $dir/$old_library"
- compile_command="$compile_command $dir/$old_library"
- finalize_command="$finalize_command $dir/$old_library"
+ deplibs="$deplibs$dependency_libs"
+ compile_command="$compile_command $dir/$old_library$dependency_libs"
+ finalize_command="$finalize_command $dir/$old_library$dependency_libs"
continue
fi
- # This library was specified with -dlopen.
- if test "$prev" = dlfiles; then
- dlfiles="$dlfiles $arg"
- if test -z "$dlname"; then
- # If there is no dlname, we need to preload.
- prev=dlprefiles
- else
- # We should not create a dependency on this library, but we
+ # This library was specified with -dlopen.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking statically,
+ # we need to preload.
+ prev=dlprefiles
+ else
+ # We should not create a dependency on this library, but we
# may need any libraries it requires.
compile_command="$compile_command$dependency_libs"
finalize_command="$finalize_command$dependency_libs"
- prev=
- continue
- fi
- fi
-
- # The library was specified with -dlpreopen.
- if test "$prev" = dlprefiles; then
- # Prefer using a static library (so that no silly _DYNAMIC symbols
- # are required to link).
- if test -n "$old_library"; then
- dlprefiles="$dlprefiles $dir/$old_library"
- else
- dlprefiles="$dlprefiles $dir/$linklib"
- fi
- prev=
- fi
-
- if test "$build_libtool_libs" = yes && test -n "$library_names"; then
- link_against_libtool_libs="$link_against_libtool_libs $arg"
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
+ prev=
+ continue
+ fi
+ fi
+
+ # The library was specified with -dlpreopen.
+ if test "$prev" = dlprefiles; then
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ dlprefiles="$dlprefiles $dir/$old_library"
+ else
+ dlprefiles="$dlprefiles $dir/$linklib"
+ fi
+ prev=
+ fi
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+
+ # We need an absolute path.
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
+ exit 1
+ fi
+ ;;
+ esac
+
# This is the magic to use -rpath.
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- compile_command="$compile_command $flag"
- finalize_command="$finalize_command $flag"
- fi
- elif test -n "$runpath_var"; then
- # Do the same for the permanent run path.
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
+ # Skip directories that are in the system default run-time
+ # search path, unless they have been requested with -R.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
lib_linked=yes
- case "$hardcode_action" in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = no; then
+ case "$hardcode_action" in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ compile_command="$compile_command $dir/$linklib"
+ deplibs="$deplibs $dir/$linklib"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+ if test -n "$dllsearchpath"; then
+ dllsearchpath="$dllsearchpath:$dllsearchdir"
+ else
+ dllsearchpath="$dllsearchdir"
+ fi
+ ;;
+ esac
+ elif test "$hardcode_minus_L" = no; then
case "$host" in
*-*-sunos*)
- compile_shlibpath="$compile_shlibpath$dir:"
+ compile_shlibpath="$compile_shlibpath$dir:"
;;
esac
- compile_command="$compile_command -L$dir -l$name"
- elif test "$hardcode_shlibpath_var" = no; then
- compile_shlibpath="$compile_shlibpath$dir:"
- compile_command="$compile_command -l$name"
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ case ":$compile_shlibpath:" in
+ *":$dir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$dir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
else
lib_linked=no
- fi
- ;;
-
- relink)
- # We need an absolute path.
- case "$dir" in
- /* | [A-Za-z]:[/\\]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
- dir="$absdir"
- ;;
- esac
-
- if test "$hardcode_direct" = yes; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- compile_command="$compile_command -L$dir -l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- compile_shlibpath="$compile_shlibpath$dir:"
- compile_command="$compile_command -l$name"
+ fi
+ ;;
+
+ relink)
+ if test "$hardcode_direct" = yes; then
+ compile_command="$compile_command $absdir/$linklib"
+ deplibs="$deplibs $absdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$compile_command " in
+ *" -L$absdir "*) ;;
+ *) compile_command="$compile_command -L$absdir";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -L$absdir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$compile_shlibpath:" in
+ *":$absdir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$absdir:";;
+ esac
+ compile_command="$compile_command -l$name"
+ deplibs="$deplibs -l$name"
else
lib_linked=no
- fi
- ;;
+ fi
+ ;;
*)
lib_linked=no
;;
- esac
+ esac
if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties"
exit 1
fi
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- finalize_command="$finalize_command $libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- finalize_command="$finalize_command -L$libdir -l$name"
- elif test "$hardcode_shlibpath_var" = yes; then
- finalize_shlibpath="$finalize_shlibpath$libdir:"
- finalize_command="$finalize_command -l$name"
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- finalize_command="$finalize_command -L$libdir -l$name"
- fi
- else
- # Transform directly to old archives if we don't build new libraries.
- if test -n "$pic_flag" && test -z "$old_library"; then
- $echo "$modename: cannot find static library for \`$arg'" 1>&2
- exit 1
- fi
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ finalize_command="$finalize_command $libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ case "$finalize_command " in
+ *" -L$libdir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case ":$finalize_shlibpath:" in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$libdir";;
+ esac
+ finalize_command="$finalize_command -l$name"
+ fi
+ else
+ # Transform directly to old archives if we don't build new libraries.
+ if test -n "$pic_flag" && test -z "$old_library"; then
+ $echo "$modename: cannot find static library for \`$arg'" 1>&2
+ exit 1
+ fi
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
@@ -820,16 +1374,24 @@ if test -z "$show_help"; then
compile_command="$compile_command $dir/$linklib"
finalize_command="$finalize_command $dir/$linklib"
else
- compile_command="$compile_command -L$dir -l$name"
- finalize_command="$finalize_command -L$dir -l$name"
+ case "$compile_command " in
+ *" -L$dir "*) ;;
+ *) compile_command="$compile_command -L$dir";;
+ esac
+ compile_command="$compile_command -l$name"
+ case "$finalize_command " in
+ *" -L$dir "*) ;;
+ *) finalize_command="$finalize_command -L$dir";;
+ esac
+ finalize_command="$finalize_command -l$name"
fi
- fi
+ fi
# Add in any libraries that this one depends upon.
compile_command="$compile_command$dependency_libs"
finalize_command="$finalize_command$dependency_libs"
continue
- ;;
+ ;;
# Some other compiler argument.
*)
@@ -841,7 +1403,7 @@ if test -z "$show_help"; then
arg="\"$arg\""
;;
esac
- ;;
+ ;;
esac
# Now actually substitute the argument into the commands.
@@ -858,6 +1420,10 @@ if test -z "$show_help"; then
fi
oldlibs=
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
case "$output" in
"")
$echo "$modename: you must specify an output file" 1>&2
@@ -865,36 +1431,38 @@ if test -z "$show_help"; then
exit 1
;;
- */* | *\\*)
- $echo "$modename: output file \`$output' must have no directory components" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
-
*.a | *.lib)
if test -n "$link_against_libtool_libs"; then
- $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
- exit 1
+ $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
+ exit 1
fi
if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
fi
if test -n "$dlfiles$dlprefiles"; then
- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
fi
if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
fi
# Now set the variables for building old libraries.
@@ -904,17 +1472,33 @@ if test -z "$show_help"; then
*.la)
# Make sure we only generate libraries of the form `libNAME.la'.
- case "$output" in
- lib*) ;;
+ case "$outputname" in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+ ;;
*)
- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
;;
esac
- name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- eval libname=\"$libname_spec\"
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
# All the library-specific variables (install_libdir is set above).
library_names=
@@ -922,18 +1506,18 @@ if test -z "$show_help"; then
dlname=
if test -n "$objs"; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
- exit 1
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+ exit 1
fi
# How the heck are we supposed to write a wrapper for a shared library?
if test -n "$link_against_libtool_libs"; then
- $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
- exit 1
+ $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+ exit 1
fi
if test -n "$dlfiles$dlprefiles"; then
- $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
+ $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
fi
set dummy $rpath
@@ -942,12 +1526,16 @@ if test -z "$show_help"; then
fi
install_libdir="$2"
- # Now set the variables for building old libraries.
- oldlibs="$objdir/$libname.$libext"
+ oldlibs=
if test -z "$rpath"; then
- # Building a libtool convenience library.
- oldlibs="$objdir/$libname.al $oldlibs"
- build_libtool_libs=convenience
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+ dependency_libs="$deplibs"
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
@@ -1014,6 +1602,20 @@ if test -z "$show_help"; then
case "$version_type" in
none) ;;
+ irix)
+ major=`expr $current - $age + 1`
+ versuffix="$major.$revision"
+ verstring="sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test $loop != 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+ done
+ ;;
+
linux)
major=.`expr $current - $age`
versuffix="$major.$age.$revision"
@@ -1041,6 +1643,16 @@ if test -z "$show_help"; then
versuffix=".$current.$revision"
;;
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
windows)
# Like Linux, but with '-' rather than '.', since we only
# want one extension on Windows 95.
@@ -1058,15 +1670,21 @@ if test -z "$show_help"; then
# Clear the version info if we defaulted, and they specified a release.
if test -z "$vinfo" && test -n "$release"; then
major=
- versuffix=
verstring="0.0"
- case "$host" in
- *-*-sunos*)
+ if test "$need_version" = no; then
+ versuffix=
+ else
versuffix=".0.0"
- ;;
- esac
+ fi
fi
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
if test "$allow_undefined_flag" = unsupported; then
@@ -1079,25 +1697,247 @@ if test -z "$show_help"; then
allow_undefined_flag="$no_undefined_flag"
fi
- # Add libc to deplibs on all systems.
dependency_libs="$deplibs"
- deplibs="$deplibs -lc"
+ case "$host" in
+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *)
+ # Add libc to deplibs on all other systems.
+ deplibs="$deplibs -lc"
+ ;;
+ esac
fi
# Create the output directory, or remove our outputs if we need to.
- if test -d $objdir; then
- $show "${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*"
- $run ${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
else
- $show "$mkdir $objdir"
- $run $mkdir $objdir
- status=$?
- if test $status -ne 0 && test ! -d $objdir; then
- exit $status
- fi
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ if test "$build_libtool_libs" = yes; then
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case "$deplibs_check_method" in
+ pass_all)
+ newdeplibs=$deplibs
+ ;; # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $C_compiler -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ $rm conftest
+ $C_compiler -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ deplibs=$newdeplibs
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potlib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ case "$potliblink" in
+ /*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" \
+ | sed 10q \
+ | egrep "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *) newdeplibs=""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ echo "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ dlname=
+ library_names=
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+ fi
+ fi
fi
+ # test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
+ deplibs=$newdeplibs
+ # Done checking deplibs!
+
# Get the real and link names of the library.
eval library_names=\"$library_names_spec\"
set dummy $library_names
@@ -1110,17 +1950,21 @@ if test -z "$show_help"; then
soname="$realname"
fi
- lib="$objdir/$realname"
+ lib="$output_objdir/$realname"
for link
do
linknames="$linknames $link"
done
- # Use standard objects if they are PIC.
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e "$los2o" -e 's/ $//g'`
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) incase we are running --disable-static
+ for obj in $libobjs; do
+ oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
+ test -f $oldobj || ${LN_S} $obj $oldobj
+ done
- # Transform .lo files to .o files.
- test "$build_old_libs" = yes && oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/[^ ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
if test -n "$whole_archive_flag_spec"; then
if test -n "$convenience"; then
@@ -1131,7 +1975,7 @@ if test -z "$show_help"; then
# Extract the objects.
xdir="$xlib"x
generated="$generated $xdir"
- xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'`
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
@@ -1144,13 +1988,50 @@ if test -z "$show_help"; then
$show "(cd $xdir && $AR x ../$xlib)"
$run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
- libobjs="$libobjs `echo $xdir/*`"
+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
done
fi
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+
+ linkopts="$linkopts $flag"
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=\"$export_symbols_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
+
# Do each of the archive commands.
- eval cmds=\"$archive_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=\"$archive_expsym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
@@ -1161,13 +2042,13 @@ if test -z "$show_help"; then
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
- $show "(cd $objdir && $LN_S $realname $linkname)"
- $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $?
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
fi
done
- # If -export-dynamic was specified, set the dlname.
- if test "$export_dynamic" = yes; then
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
# On all known operating systems, these are identical.
dlname="$soname"
fi
@@ -1176,58 +2057,62 @@ if test -z "$show_help"; then
*.lo | *.o | *.obj)
if test -n "$link_against_libtool_libs"; then
- $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
- exit 1
+ $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
+ exit 1
fi
if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
fi
if test -n "$dlfiles$dlprefiles"; then
- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
fi
if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
fi
if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
fi
case "$output" in
*.lo)
- if test -n "$objs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e "$lo2o"`
- ;;
+ if test -n "$objs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
*)
- libobj=
- obj="$output"
- ;;
+ libobj=
+ obj="$output"
+ ;;
esac
# Delete the old objects.
$run $rm $obj $libobj
# Create the old-style object.
- reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/[^ ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+ reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
output="$obj"
eval cmds=\"$reload_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
@@ -1235,339 +2120,503 @@ if test -z "$show_help"; then
test -z "$libobj" && exit 0
if test "$build_libtool_libs" != yes; then
- # Create an invalid libtool object if no PIC, so that we don't
- # accidentally link it into a program.
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > $libobj" || exit $?
- exit 0
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
fi
if test -n "$pic_flag"; then
- # Only do commands if we really have different PIC objects.
- reload_objs="$libobjs"
- output="$libobj"
- eval cmds=\"$reload_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
else
- # Just create a symlink.
- $show "$LN_S $obj $libobj"
- $run $LN_S $obj $libobj || exit $?
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ $show "$LN_S $obj $libobj"
+ $run $LN_S $obj $libobj || exit $?
fi
exit 0
;;
+ # Anything else should be a program.
*)
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
fi
if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
fi
- if test -n "$rpath"; then
+ if test "$preload" = yes; then
+ if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ if test "$dlself" = yes && test "$export_dynamic" = no; then
+ $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
+ exit 1
+ fi
+
+ if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
- for libdir in $rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- compile_command="$compile_command $flag"
- finalize_command="$finalize_command $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$compile_rpath " in
+ *" $libdir "*) ;;
+ *) compile_rpath="$compile_rpath $libdir" ;;
+ esac
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
done
fi
- # Substitute the hardcoded libdirs into the compile commands.
- if test -n "$hardcode_libdir_separator"; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
- if test -n "$libobjs" && test "$build_old_libs" = yes; then
- # Transform all the library objects into standard objects.
- compile_command=`$echo "X$compile_command " | $Xsed -e "$los2o" -e 's/ $//'`
- finalize_command=`$echo "X$finalize_command " | $Xsed -e "$los2o" -e 's/ $//'`
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
fi
+ finalize_rpath="$rpath"
- if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${output}S.c"
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
else
- dlsyms=
+ output_objdir="$output_objdir/$objdir"
fi
- if test -n "$dlsyms"; then
- # Add our own program objects to the preloaded list.
- dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e "$los2o" -e 's/ $//'`
-
- # Discover the nlist of each of the dlfiles.
- nlist="$objdir/${output}.nm"
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
- if test -d $objdir; then
- $show "$rm $nlist ${nlist}T"
- $run $rm "$nlist" "${nlist}T"
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
else
- $show "$mkdir $objdir"
- $run $mkdir $objdir
- status=$?
- if test $status -ne 0 && test ! -d $objdir; then
- exit $status
- fi
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
fi
+ fi
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- # Parse the name list into a source file.
- $show "creating $objdir/$dlsyms"
- if test -z "$run"; then
- # Make sure we at least have an empty file.
- test -f "$nlist" || : > "$nlist"
-
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- wcout=`wc "$nlist" 2>/dev/null`
- count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
- (test "$count" -ge 0) 2>/dev/null || count=-1
+ if test -n "$dlsyms"; then
+ case "$dlsyms" in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$objdir/${output}.nm"
+
+ if test -d $objdir; then
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
else
- $rm "$nlist"T
- count=-1
+ $show "$mkdir $objdir"
+ $run $mkdir $objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
fi
- case "$dlsyms" in
- "") ;;
- *.c)
- $echo > "$objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
+ # Parse the name list into a source file.
+ $show "creating $objdir/$dlsyms"
+
+ $echo > "$objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
#ifdef __cplusplus
extern \"C\" {
#endif
/* Prevent the only kind of declaration conflicts we can make. */
-#define dld_preloaded_symbol_count some_other_symbol
-#define dld_preloaded_symbols some_other_symbol
+#define lt_preloaded_symbols some_other_symbol
/* External symbol declarations for the compiler. */\
"
- if test -f "$nlist"; then
- sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run $rm $export_symbols
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
+ $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ $run eval 'echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ :
else
- echo '/* NONE */' >> "$objdir/$dlsyms"
+ grep -v "^: " < "$nlist" > "$nlist"S
fi
- $echo >> "$objdir/$dlsyms" "\
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
-#undef dld_preloaded_symbol_count
-#undef dld_preloaded_symbols
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
#if defined (__STDC__) && __STDC__
-# define __ptr_t void *
+# define lt_ptr_t void *
#else
-# define __ptr_t char *
+# define lt_ptr_t char *
+# define const
#endif
-/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
-int dld_preloaded_symbol_count = $count;
-
/* The mapping between symbol names and symbols. */
-struct {
- char *name;
- __ptr_t address;
+const struct {
+ const char *name;
+ lt_ptr_t address;
}
-dld_preloaded_symbols[] =
+lt_preloaded_symbols[] =
{\
"
- if test -f "$nlist"; then
- sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
- fi
+ sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
+ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
+ < "$nlist" >> "$output_objdir/$dlsyms"
- $echo >> "$objdir/$dlsyms" "\
- {0, (__ptr_t) 0}
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr_t) 0}
};
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
#ifdef __cplusplus
}
#endif\
"
- ;;
+ fi
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit 1
- ;;
+ pic_flag_for_symtable=
+ case "$host" in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ esac
esac
- fi
- # Now compile the dynamic symbol file.
- $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
- $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
+ # Now compile the dynamic symbol file.
+ $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
- # Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
- elif test "$export_dynamic" != yes; then
- test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
else
- # We keep going just in case the user didn't refer to
- # dld_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-
- # We have no uninstalled library dependencies, so finalize right now.
- $show "$compile_command"
- $run eval "$compile_command"
- exit $?
- fi
-
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'`
-
- # Create the binary in the object directory, then wrap it.
- if test ! -d $objdir; then
- $show "$mkdir $objdir"
- $run $mkdir $objdir
- status=$?
- if test $status -ne 0 && test ! -d $objdir; then
- exit $status
- fi
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ exit $?
fi
if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case "$dir" in
- /* | [A-Za-z]:[/\\]*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
fi
- # Delete the old output file.
- $run $rm $output
-
- if test -n "$compile_shlibpath"; then
- compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
fi
if test -n "$finalize_shlibpath"; then
- finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
- finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
fi
if test "$hardcode_action" = relink; then
- # AGH! Flame the AIX and HP-UX people for me, will ya?
- $echo "$modename: warning: using a buggy system linker" 1>&2
- $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ # AGH! Flame the AIX and HP-UX people for me, will ya?
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
fi
- $show "$compile_command"
- $run eval "$compile_command" || exit $?
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Create the binary in the object directory, then wrap it.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
+ fi
+
+ # Delete the old output file.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
# Now create the wrapper script.
$show "creating $output"
- # Quote the finalize command for shipping.
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
# Quote $echo for shipping.
- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case "$0" in
+ /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
# Only actually do things if our run command is non-null.
if test -z "$run"; then
- $rm $output
- trap "$rm $output; exit 1" 1 2 15
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
- $echo > $output "\
+ $echo > $output "\
#! $SHELL
-# $output - temporary wrapper script for $objdir/$output
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
-# This wrapper script should never be moved out of \``pwd`'.
+# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
+Xsed='sed -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
+relink_command=\"$relink_command\"
+
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
+ # install mode needs the following variable:
link_against_libtool_libs='$link_against_libtool_libs'
- finalize_command=\"$finalize_command\"
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
@@ -1586,7 +2635,7 @@ else
fi
fi\
"
- $echo >> $output "\
+ $echo >> $output "\
# Find the directory that this script lives in.
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
@@ -1612,35 +2661,97 @@ else
# Try to get the absolute directory name.
absdir=\`cd \"\$thisdir\" && pwd\`
test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ echo >> $output "\
+ program=lt-'$outputname'
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+
+ echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if (cd \"\$thisdir\" && eval \$relink_command); then :
+ else
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program='$outputname'
progdir=\"\$thisdir/$objdir\"
- program='$output'
+"
+ fi
+
+ echo >> $output "\
if test -f \"\$progdir/\$program\"; then"
- # Export our shlibpath_var if we have one.
- if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output "\
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var
"
- fi
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
- $echo >> $output "\
+ $echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
-
+"
+ case $host in
+ *-*-cygwin* | *-*-mingw | *-*-os2*)
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+ *)
+ $echo >> $output "\
# Export the path to the program.
PATH=\"\$progdir:\$PATH\"
export PATH
exec \$program \${1+\"\$@\"}
-
+"
+ ;;
+ esac
+ $echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit 1
fi
@@ -1653,7 +2764,7 @@ else
fi
fi\
"
- chmod +x $output
+ chmod +x $output
fi
exit 0
;;
@@ -1663,11 +2774,16 @@ fi\
for oldlib in $oldlibs; do
if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs"
+ oldobjs="$libobjs_save"
addlibs="$convenience"
build_libtool_libs=no
else
- oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/[^ ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
addlibs="$old_convenience"
fi
@@ -1676,7 +2792,7 @@ fi\
# Extract the objects.
xdir="$xlib"x
generated="$generated $xdir"
- xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'`
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
@@ -1689,7 +2805,7 @@ fi\
$show "(cd $xdir && $AR x ../$xlib)"
$run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
- oldobjs="$oldobjs `echo $xdir/*`"
+ oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
done
# Do each command in the archive commands.
@@ -1698,11 +2814,11 @@ fi\
else
eval cmds=\"$old_archive_cmds\"
fi
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
@@ -1719,11 +2835,19 @@ fi\
test "$build_old_libs" = yes && old_library="$libname.$libext"
$show "creating $output"
+ if test -n "$xrpath"; then
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ done
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+
# Only create the output if not a dry run.
if test -z "$run"; then
- $echo > $output "\
+ $echo > $output "\
# $output - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
# The name that we can dlopen(3).
dlname='$dlname'
@@ -1742,15 +2866,22 @@ current=$current
age=$age
revision=$revision
+# Is this an already installed library?
+installed=no
+
# Directory that this library needs to be installed in:
libdir='$install_libdir'\
"
+
+ $rm "$output_objdir/$outputname"i
+ sed 's/^installed=no$/installed=yes/' \
+ < "$output" > "$output_objdir/$outputname"i || exit 1
fi
# Do a symbolic link so that the libtool archive can be found in
# LD_LIBRARY_PATH before the program is installed.
- $show "(cd $objdir && $LN_S ../$output $output)"
- $run eval "(cd $objdir && $LN_S ../$output $output)" || exit $?
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
;;
esac
exit 0
@@ -1762,7 +2893,7 @@ libdir='$install_libdir'\
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = "/bin/sh"; then
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case "$arg" in
@@ -1799,9 +2930,9 @@ libdir='$install_libdir'\
for arg
do
if test -n "$dest"; then
- files="$files $dest"
- dest="$arg"
- continue
+ files="$files $dest"
+ dest="$arg"
+ continue
fi
case "$arg" in
@@ -1811,20 +2942,20 @@ libdir='$install_libdir'\
-m) prev="-m" ;;
-o) prev="-o" ;;
-s)
- stripme=" -s"
- continue
- ;;
+ stripme=" -s"
+ continue
+ ;;
-*) ;;
*)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest="$arg"
- continue
- fi
- ;;
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
esac
# Aesthetically quote the argument.
@@ -1851,9 +2982,9 @@ libdir='$install_libdir'\
if test -z "$files"; then
if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
+ $echo "$modename: no file or destination specified" 1>&2
else
- $echo "$modename: you must specify a destination" 1>&2
+ $echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
exit 1
@@ -1875,23 +3006,23 @@ libdir='$install_libdir'\
# Not a directory, so check to see that there is only one file specified.
set dummy $files
if test $# -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit 1
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
fi
fi
case "$destdir" in
/* | [A-Za-z]:[/\\]*) ;;
*)
for file in $files; do
- case "$file" in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
+ case "$file" in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
done
;;
esac
@@ -1908,217 +3039,219 @@ libdir='$install_libdir'\
# Do each installation.
case "$file" in
*.a | *.lib)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
*.la)
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- library_names=
- old_library=
- # If there is no directory component, then add one.
- case "$file" in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$realname $destdir/$realname"
- $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
- test "X$dlname" = "X$realname" && dlname=
-
- if test $# -gt 0; then
- # Delete the old symlinks.
- rmcmd="$rm"
- for linkname
- do
- if test "X$linkname" != "X$realname"; then
- rmcmd="$rmcmd $destdir/$linkname"
- fi
- done
- $show "$rmcmd"
- $run $rmcmd
-
- # ... and create new ones.
- for linkname
- do
- if test "X$linkname" != "X$realname"; then
- test "X$dlname" = "X$linkname" && dlname=
- $show "(cd $destdir && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $LN_S $realname $linkname)"
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+ test "X$dlname" = "X$realname" && dlname=
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ test "X$dlname" = "X$linkname" && dlname=
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
fi
- done
- fi
-
- if test -n "$dlname"; then
- # Install the dynamically-loadable library.
- $show "$install_prog $dir/$dlname $destdir/$dlname"
- $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- eval cmds=\"$postinstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- $show "$install_prog $file $destdir/$name"
- $run eval "$install_prog $file $destdir/$name" || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
+ done
+ fi
+
+ if test -n "$dlname"; then
+ # Install the dynamically-loadable library.
+ $show "$install_prog $dir/$dlname $destdir/$dlname"
+ $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ if test ! -f "$instname"; then
+ # Just in case it was removed...
+ $show "Creating $instname"
+ $rm "$instname"
+ sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
+ fi
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
*.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case "$destfile" in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.o | *.obj)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit 0
- ;;
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case "$destfile" in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.o | *.obj)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
*)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- link_against_libtool_libs=
- finalize_command=
-
- # If there is no directory component, then add one.
- case "$file" in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
- $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
- exit 1
- fi
-
- finalize=yes
- for lib in $link_against_libtool_libs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case "$lib" in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- if test "$hardcode_action" = relink; then
- if test "$finalize" = yes; then
- $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
- $show "$finalize_command"
- if $run eval "$finalize_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- continue
- fi
- file="$objdir/$file"T
- else
- $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ link_against_libtool_libs=
+ relink_command=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$link_against_libtool_libs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $link_against_libtool_libs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes; then
+ outputname="/tmp/$$-$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
+ fi
+ fi
- $show "$install_prog$stripme $file $destfile"
- $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
- ;;
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && $rm $outputname
+ ;;
esac
done
@@ -2133,11 +3266,11 @@ libdir='$install_libdir'\
# Do each command in the postinstall commands.
eval cmds=\"$old_postinstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
@@ -2165,21 +3298,21 @@ libdir='$install_libdir'\
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
for dir
do
- libdirs="$libdirs $dir"
+ libdirs="$libdirs $dir"
done
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
eval cmds=\"$finish_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || admincmds="$admincmds
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
$cmd"
- done
- IFS="$save_ifs"
+ done
+ IFS="$save_ifs"
fi
if test -n "$finish_eval"; then
# Do the single finish_eval.
@@ -2190,16 +3323,19 @@ libdir='$install_libdir'\
done
fi
+ # Exit here if they wanted silent mode.
+ test "$show" = : && exit 0
+
echo "----------------------------------------------------------------------"
echo "Libraries have been installed in:"
for libdir in $libdirs; do
echo " $libdir"
done
echo
- echo "To link against installed libraries in a given directory, LIBDIR,"
- echo "you must use the \`-LLIBDIR' flag during linking."
- echo
- echo " You will also need to do at least one of the following:"
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
echo " during execution"
@@ -2250,22 +3386,22 @@ libdir='$install_libdir'\
dir=
case "$file" in
*.la)
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
# Read the libtool library.
dlname=
library_names=
- # If there is no directory component, then add one.
+ # If there is no directory component, then add one.
case "$file" in
*/* | *\\*) . $file ;;
- *) . ./$file ;;
+ *) . ./$file ;;
esac
# Skip this library if it cannot be dlopened.
@@ -2294,7 +3430,7 @@ libdir='$install_libdir'\
*)
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- continue
+ continue
;;
esac
@@ -2321,8 +3457,8 @@ libdir='$install_libdir'\
case "$file" in
-*) ;;
*)
- # Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one.
case "$file" in
*/* | *\\*) . $file ;;
@@ -2332,7 +3468,7 @@ libdir='$install_libdir'\
# Transform arg to wrapped name.
file="$progdir/$program"
fi
- ;;
+ ;;
esac
# Quote arguments (to preserve shell metacharacters).
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
@@ -2345,10 +3481,10 @@ libdir='$install_libdir'\
# Restore saved enviroment variables
if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
+ LC_ALL="$save_LC_ALL"; export LC_ALL
fi
if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
+ LANG="$save_LANG"; export LANG
fi
# Now actually exec the command.
@@ -2394,17 +3530,17 @@ libdir='$install_libdir'\
case "$name" in
*.la)
- # Possibly a libtool archive, so verify it.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- . $dir/$name
-
- # Delete the libtool libraries and symlinks.
- for n in $library_names; do
- rmfiles="$rmfiles $dir/$n"
- test "X$n" = "X$dlname" && dlname=
- done
- test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
- test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $dir/$n"
+ test "X$n" = "X$dlname" && dlname=
+ done
+ test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
$show "$rm $rmfiles"
$run $rm $rmfiles
@@ -2412,7 +3548,7 @@ libdir='$install_libdir'\
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
eval cmds=\"$postuninstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
@@ -2421,10 +3557,10 @@ libdir='$install_libdir'\
IFS="$save_ifs"
fi
- if test -n "$old_library"; then
+ if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
eval cmds=\"$old_postuninstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
@@ -2433,21 +3569,21 @@ libdir='$install_libdir'\
IFS="$save_ifs"
fi
- # FIXME: should reinstall the best remaining shared library.
- fi
- ;;
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ ;;
*.lo)
- if test "$build_old_libs" = yes; then
- oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
- rmfiles="$rmfiles $dir/$oldobj"
- fi
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
$show "$rm $rmfiles"
$run $rm $rmfiles
- ;;
+ ;;
*)
- $show "$rm $rmfiles"
+ $show "$rm $rmfiles"
$run $rm $rmfiles
;;
esac
@@ -2507,6 +3643,7 @@ Compile a source file into a libtool library object.
This mode accepts the following additional options:
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
-static always build a \`.o' file suitable for static linking
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
@@ -2575,18 +3712,23 @@ a program from several object files.
The following components of LINK-COMMAND are treated specially:
-all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-static do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
@@ -2594,11 +3736,12 @@ Every other argument is treated as a filename. Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
-library objects (\`.lo' files) may be specified, and \`-rpath' is required.
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on WIndows using \`lib'.
+using \`ar' and \`ranlib', or on Windows using \`lib'.
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
is created, otherwise an executable program is created."