summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2012-05-15 13:28:58 -0500
committerMatthew McClintock <msm@freescale.com>2012-05-15 13:28:58 -0500
commita88d77e2ae8a4ec05d6757eddee80537933b86a5 (patch)
tree067d5a5691108b90ebfefdd670bf2dcdc2a47abd /recipes-devtools
parentb1a63d1f36bbafd2efe3b69f78a1afee61292a4d (diff)
downloadmeta-fsl-ppc-a88d77e2ae8a4ec05d6757eddee80537933b86a5.tar.gz
remove fsl specific toolchain
Signed-off-by: Matthew McClintock <msm@freescale.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend1
-rw-r--r--recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend1
-rw-r--r--recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend1
-rw-r--r--recipes-devtools/binutils/binutils-fsl.inc15
-rw-r--r--recipes-devtools/binutils/binutils_2.21.1a.bbappend1
-rw-r--r--recipes-devtools/binutils/files/bin.e500mc_nop.patch114
-rw-r--r--recipes-devtools/binutils/files/bin.e5500.patch102
-rw-r--r--recipes-devtools/binutils/files/bin.e6500-2.patch674
-rw-r--r--recipes-devtools/binutils/files/libiberty_path_fix.patch22
-rw-r--r--recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch18705
-rw-r--r--recipes-devtools/eglibc/eglibc-fsl.inc14
-rw-r--r--recipes-devtools/eglibc/eglibc-initial_2.13.bbappend1
-rw-r--r--recipes-devtools/eglibc/eglibc-locale_2.13.bbappend1
-rw-r--r--recipes-devtools/eglibc/eglibc_2.13.bbappend1
-rw-r--r--recipes-devtools/eglibc/files/etc/ld.so.conf0
-rw-r--r--recipes-devtools/eglibc/files/generate-supported.mk11
-rw-r--r--recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch11
-rw-r--r--recipes-devtools/eglibc/files/glibc.fix_prof.patch38
-rw-r--r--recipes-devtools/eglibc/files/glibc.fix_sqrt.patch500
-rw-r--r--recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch29
-rw-r--r--recipes-devtools/eglibc/files/glibc.readv_proto.patch99
-rw-r--r--recipes-devtools/eglibc/files/glibc.undefined_static.patch37
-rw-r--r--recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch186
-rw-r--r--recipes-devtools/gcc/files/gcc.builtin_isel.patch1059
-rw-r--r--recipes-devtools/gcc/files/gcc.case_values.patch65
-rw-r--r--recipes-devtools/gcc/files/gcc.check_path_validity.patch12
-rw-r--r--recipes-devtools/gcc/files/gcc.e5500_mfocr.patch181
-rw-r--r--recipes-devtools/gcc/files/gcc.e6500-FSF46.patch4011
-rw-r--r--recipes-devtools/gcc/files/gcc.experimental_move.patch32
-rw-r--r--recipes-devtools/gcc/files/gcc.extelim-v3.patch3491
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch9
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch11
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch39
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch18
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_constvector.patch43
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_header_issue.patch12
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch12
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_longversionstring.patch16
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_min_max.patch38
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_mingw32.patch11
-rw-r--r--recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch32
-rw-r--r--recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch138
-rw-r--r--recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch18
-rw-r--r--recipes-devtools/gcc/files/gcc.opt-array-offset.patch350
-rw-r--r--recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch24
-rw-r--r--recipes-devtools/gcc/files/gcc.rm_slow_tests.patch67
-rw-r--r--recipes-devtools/gcc/files/gcc.soft_float-460.patch190
-rw-r--r--recipes-devtools/gcc/files/gcc.widen_types-46.patch1534
-rw-r--r--recipes-devtools/gcc/files/optional_libstdc.patch86
-rw-r--r--recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend1
-rw-r--r--recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend1
-rw-r--r--recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend1
-rw-r--r--recipes-devtools/gcc/gcc-cross_4.6.bbappend1
-rw-r--r--recipes-devtools/gcc/gcc-fsl.inc46
-rw-r--r--recipes-devtools/gcc/gcc-runtime_4.6.bbappend1
-rw-r--r--recipes-devtools/gcc/gcc_4.6.bbappend1
-rw-r--r--recipes-devtools/gcc/libgcc_4.6.bbappend1
57 files changed, 0 insertions, 32116 deletions
diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend b/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend
deleted file mode 100644
index d46b87a..0000000
--- a/recipes-devtools/binutils/binutils-cross-canadian_2.21.1a.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require binutils-fsl.inc
diff --git a/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend b/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend
deleted file mode 100644
index d46b87a..0000000
--- a/recipes-devtools/binutils/binutils-cross_2.21.1a.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require binutils-fsl.inc
diff --git a/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend b/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend
deleted file mode 100644
index d46b87a..0000000
--- a/recipes-devtools/binutils/binutils-crosssdk_2.21.1a.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require binutils-fsl.inc
diff --git a/recipes-devtools/binutils/binutils-fsl.inc b/recipes-devtools/binutils/binutils-fsl.inc
deleted file mode 100644
index 258f6cc..0000000
--- a/recipes-devtools/binutils/binutils-fsl.inc
+++ /dev/null
@@ -1,15 +0,0 @@
1SRC_URI_fsl = "\
2 ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
3 file://bin.e5500.patch \
4 file://bin.e6500-2.patch \
5 file://bin.e500mc_nop.patch \
6 file://libtool-2.4-update_fsl.patch \
7 file://binutils-2.19.1-ld-sysroot.patch \
8 file://libiberty_path_fix.patch \
9 file://binutils-poison.patch \
10 file://libtool-rpath-fix.patch \
11 "
12
13FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
14
15PR_append_fsl = "+${DISTRO}.4"
diff --git a/recipes-devtools/binutils/binutils_2.21.1a.bbappend b/recipes-devtools/binutils/binutils_2.21.1a.bbappend
deleted file mode 100644
index d46b87a..0000000
--- a/recipes-devtools/binutils/binutils_2.21.1a.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require binutils-fsl.inc
diff --git a/recipes-devtools/binutils/files/bin.e500mc_nop.patch b/recipes-devtools/binutils/files/bin.e500mc_nop.patch
deleted file mode 100644
index 9c9d52c..0000000
--- a/recipes-devtools/binutils/files/bin.e500mc_nop.patch
+++ /dev/null
@@ -1,114 +0,0 @@
1Generate the preferred NOP: ori r0, r0, 0 in the place of ori r2, r2, 0
2and add the nop test cases in gas for e500mc64, e5500 and e6500.
3
4diff -ruN binutils-4.6.0-orig/gas/config/tc-ppc.c binutils-4.6.0-new/gas/config/tc-ppc.c
5--- binutils-4.6.0-orig/gas/config/tc-ppc.c 2011-08-18 16:02:21.847979825 -0500
6+++ binutils-4.6.0-new/gas/config/tc-ppc.c 2011-08-19 10:09:19.888849978 -0500
7@@ -5815,8 +5817,14 @@
8 }
9
10 if ((ppc_cpu & PPC_OPCODE_POWER7) != 0)
11- /* power7 group terminating nop: "ori 2,2,0". */
12- md_number_to_chars (dest, 0x60420000, 4);
13+ {
14+ if (ppc_cpu & PPC_OPCODE_E500MC)
15+ /* e500mc group terminating nop: "ori 0,0,0". */
16+ md_number_to_chars (dest, 0x60000000, 4);
17+ else
18+ /* power7 group terminating nop: "ori 2,2,0". */
19+ md_number_to_chars (dest, 0x60420000, 4);
20+ }
21 else
22 /* power6 group terminating nop: "ori 1,1,0". */
23 md_number_to_chars (dest, 0x60210000, 4);
24diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d
25--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d 1969-12-31 18:00:00.000000000 -0600
26+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d 2011-08-19 10:16:29.561849966 -0500
27@@ -0,0 +1,13 @@
28+#as: -mppc -me500mc64
29+#objdump: -dr -Me500mc64
30+#name: Power E500MC64 nop tests
31+
32+.*: +file format elf(32)?(64)?-powerpc.*
33+
34+Disassembly of section \.text:
35+
36+0+00 <start>:
37+ 0: 60 00 00 00 nop
38+ 4: 60 00 00 00 nop
39+ 8: 60 00 00 00 nop
40+ c: 60 00 00 00 nop
41diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s
42--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s 1969-12-31 18:00:00.000000000 -0600
43+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s 2011-08-19 10:16:29.561849966 -0500
44@@ -0,0 +1,5 @@
45+# Power E500MC64 nop tests
46+ .section ".text"
47+start:
48+ nop
49+ .p2align 4,,15
50diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d
51--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d 1969-12-31 18:00:00.000000000 -0600
52+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d 2011-08-19 10:16:29.561849966 -0500
53@@ -0,0 +1,13 @@
54+#as: -mppc -me5500
55+#objdump: -dr -Me5500
56+#name: Power E5500 nop tests
57+
58+.*: +file format elf(32)?(64)?-powerpc.*
59+
60+Disassembly of section \.text:
61+
62+0+00 <start>:
63+ 0: 60 00 00 00 nop
64+ 4: 60 00 00 00 nop
65+ 8: 60 00 00 00 nop
66+ c: 60 00 00 00 nop
67diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s
68--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s 1969-12-31 18:00:00.000000000 -0600
69+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s 2011-08-19 10:16:29.561849966 -0500
70@@ -0,0 +1,5 @@
71+# Power E5500 nop tests
72+ .section ".text"
73+start:
74+ nop
75+ .p2align 4,,15
76diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d
77--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d 1969-12-31 18:00:00.000000000 -0600
78+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d 2011-08-19 10:16:29.561849966 -0500
79@@ -0,0 +1,13 @@
80+#as: -mppc -me6500
81+#objdump: -dr -Me6500
82+#name: Power E6500 nop tests
83+
84+.*: +file format elf(32)?(64)?-powerpc.*
85+
86+Disassembly of section \.text:
87+
88+0+00 <start>:
89+ 0: 60 00 00 00 nop
90+ 4: 60 00 00 00 nop
91+ 8: 60 00 00 00 nop
92+ c: 60 00 00 00 nop
93diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s
94--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s 1969-12-31 18:00:00.000000000 -0600
95+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s 2011-08-19 10:16:29.562849956 -0500
96@@ -0,0 +1,5 @@
97+# Power E6500 nop tests
98+ .section ".text"
99+start:
100+ nop
101+ .p2align 4,,15
102diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp
103--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp 2011-08-19 10:15:29.445978575 -0500
104+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp 2011-08-19 10:16:17.827852501 -0500
105@@ -43,6 +43,9 @@
106 run_dump_test "ppc750ps"
107 run_dump_test "e500mc"
108 run_dump_test "e6500"
109+ run_dump_test "e500mc64_nop"
110+ run_dump_test "e5500_nop"
111+ run_dump_test "e6500_nop"
112 run_dump_test "a2"
113 run_dump_test "cell"
114 run_dump_test "common"
diff --git a/recipes-devtools/binutils/files/bin.e5500.patch b/recipes-devtools/binutils/files/bin.e5500.patch
deleted file mode 100644
index 800590c..0000000
--- a/recipes-devtools/binutils/files/bin.e5500.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1bin.e5500
2
3Implements target e5500 and -me5500, etc..
4
5diff -r -u binutils-2.21-20110211-orig/bfd/archures.c binutils-2.21-20110211/bfd/archures.c
6--- binutils-2.21-20110211-orig/bfd/archures.c 2010-12-30 18:33:31.000000000 -0600
7+++ binutils-2.21-20110211/bfd/archures.c 2011-02-14 13:17:00.528340236 -0600
8@@ -234,6 +234,7 @@
9 .#define bfd_mach_ppc_e500 500
10 .#define bfd_mach_ppc_e500mc 5001
11 .#define bfd_mach_ppc_e500mc64 5005
12+.#define bfd_mach_ppc_e5500 5006
13 .#define bfd_mach_ppc_titan 83
14 . bfd_arch_rs6000, {* IBM RS/6000 *}
15 .#define bfd_mach_rs6k 6000
16diff -r -u binutils-2.21-20110211-orig/bfd/bfd-in2.h binutils-2.21-20110211/bfd/bfd-in2.h
17--- binutils-2.21-20110211-orig/bfd/bfd-in2.h 2011-02-11 10:57:58.000000000 -0600
18+++ binutils-2.21-20110211/bfd/bfd-in2.h 2011-02-14 13:19:57.365092179 -0600
19@@ -1921,6 +1921,7 @@
20 #define bfd_mach_ppc_e500 500
21 #define bfd_mach_ppc_e500mc 5001
22 #define bfd_mach_ppc_e500mc64 5005
23+#define bfd_mach_ppc_e5500 5006
24 #define bfd_mach_ppc_titan 83
25 bfd_arch_rs6000, /* IBM RS/6000 */
26 #define bfd_mach_rs6k 6000
27diff -r -u binutils-2.21-20110211-orig/bfd/cpu-powerpc.c binutils-2.21-20110211/bfd/cpu-powerpc.c
28--- binutils-2.21-20110211-orig/bfd/cpu-powerpc.c 2010-02-07 19:59:34.000000000 -0600
29+++ binutils-2.21-20110211/bfd/cpu-powerpc.c 2011-02-14 13:21:48.802403135 -0600
30@@ -352,6 +352,20 @@
31 FALSE, /* not the default */
32 powerpc_compatible,
33 bfd_default_scan,
34+ &bfd_powerpc_archs[19]
35+ },
36+ {
37+ 64, /* 64 bits in a word */
38+ 64, /* 64 bits in an address */
39+ 8, /* 8 bits in a byte */
40+ bfd_arch_powerpc,
41+ bfd_mach_ppc_e5500,
42+ "powerpc",
43+ "powerpc:e5500",
44+ 3,
45+ FALSE, /* not the default */
46+ powerpc_compatible,
47+ bfd_default_scan,
48 0
49 }
50 };
51diff -r -u binutils-2.21-20110211-orig/gas/config/tc-ppc.c binutils-2.21-20110211/gas/config/tc-ppc.c
52--- binutils-2.21-20110211-orig/gas/config/tc-ppc.c 2011-02-11 10:58:01.000000000 -0600
53+++ binutils-2.21-20110211/gas/config/tc-ppc.c 2011-02-14 13:23:39.478340515 -0600
54@@ -1235,6 +1235,7 @@
55 -me500, -me500x2 generate code for Motorola e500 core complex\n\
56 -me500mc, generate code for Freescale e500mc core complex\n\
57 -me500mc64, generate code for Freescale e500mc64 core complex\n\
58+-me5500, generate code for Freescale e5500 core complex\n\
59 -mspe generate code for Motorola SPE instructions\n\
60 -mtitan generate code for AppliedMicro Titan core complex\n\
61 -mregnames Allow symbolic names for registers\n\
62diff -r -u binutils-2.21-20110211-orig/gas/doc/as.texinfo binutils-2.21-20110211/gas/doc/as.texinfo
63--- binutils-2.21-20110211-orig/gas/doc/as.texinfo 2011-02-11 10:58:01.000000000 -0600
64+++ binutils-2.21-20110211/gas/doc/as.texinfo 2011-02-14 13:26:01.383403323 -0600
65@@ -431,7 +431,7 @@
66 [@b{-a32}|@b{-a64}]
67 [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}|
68 @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}|
69- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-mppc64bridge}|@b{-mbooke}|
70+ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}|
71 @b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}|
72 @b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}]
73 [@b{-many}] [@b{-maltivec}|@b{-mvsx}]
74diff -r -u binutils-2.21-20110211-orig/gas/doc/c-ppc.texi binutils-2.21-20110211/gas/doc/c-ppc.texi
75--- binutils-2.21-20110211-orig/gas/doc/c-ppc.texi 2011-02-11 10:58:04.000000000 -0600
76+++ binutils-2.21-20110211/gas/doc/c-ppc.texi 2011-02-14 13:26:31.140090956 -0600
77@@ -88,6 +88,9 @@
78 @item -me500mc64
79 Generate code for Freescale e500mc64 core complex.
80
81+@item -me5500
82+Generate code for Freescale e5500 core complex.
83+
84 @item -mspe
85 Generate code for Motorola SPE instructions.
86
87diff -r -u binutils-2.21-20110211-orig/opcodes/ppc-dis.c binutils-2.21-20110211/opcodes/ppc-dis.c
88--- binutils-2.21-20110211-orig/opcodes/ppc-dis.c 2010-07-03 03:27:23.000000000 -0500
89+++ binutils-2.21-20110211/opcodes/ppc-dis.c 2011-02-14 13:28:54.384090879 -0600
90@@ -114,6 +114,12 @@
91 | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER5
92 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7),
93 0 },
94+ { "e5500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
95+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
96+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER4
97+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
98+ | PPC_OPCODE_POWER7),
99+ 0 },
100 { "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE
101 | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
102 | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
diff --git a/recipes-devtools/binutils/files/bin.e6500-2.patch b/recipes-devtools/binutils/files/bin.e6500-2.patch
deleted file mode 100644
index e863323..0000000
--- a/recipes-devtools/binutils/files/bin.e6500-2.patch
+++ /dev/null
@@ -1,674 +0,0 @@
1bin.e6500-2
2Implements target e6500 and -me6500, etc..
3
4Also enables some cell instructions but using different opcodes. (This
5should be temporary until new mnemonics are chosen. Likely to be
6defined only when ISA 2.07 comes out)
7
8Also implements new altivec instructions, and a few other e6500
9instructions like miso, and sync with two arguments.
10
11diff -ruN binutils-2.21-20110211-e5500/bfd/archures.c binutils-2.21-20110211-e6500/bfd/archures.c
12--- binutils-2.21-20110211-e5500/bfd/archures.c 2011-05-03 16:04:03.828069461 -0500
13+++ binutils-2.21-20110211-e6500/bfd/archures.c 2011-05-03 16:04:15.253938636 -0500
14@@ -235,6 +235,7 @@
15 .#define bfd_mach_ppc_e500mc 5001
16 .#define bfd_mach_ppc_e500mc64 5005
17 .#define bfd_mach_ppc_e5500 5006
18+.#define bfd_mach_ppc_e6500 5007
19 .#define bfd_mach_ppc_titan 83
20 . bfd_arch_rs6000, {* IBM RS/6000 *}
21 .#define bfd_mach_rs6k 6000
22diff -ruN binutils-2.21-20110211-e5500/bfd/bfd-in2.h binutils-2.21-20110211-e6500/bfd/bfd-in2.h
23--- binutils-2.21-20110211-e5500/bfd/bfd-in2.h 2011-05-03 16:04:03.836064584 -0500
24+++ binutils-2.21-20110211-e6500/bfd/bfd-in2.h 2011-05-03 16:04:15.260938268 -0500
25@@ -1922,6 +1922,7 @@
26 #define bfd_mach_ppc_e500mc 5001
27 #define bfd_mach_ppc_e500mc64 5005
28 #define bfd_mach_ppc_e5500 5006
29+#define bfd_mach_ppc_e6500 5007
30 #define bfd_mach_ppc_titan 83
31 bfd_arch_rs6000, /* IBM RS/6000 */
32 #define bfd_mach_rs6k 6000
33diff -ruN binutils-2.21-20110211-e5500/bfd/cpu-powerpc.c binutils-2.21-20110211-e6500/bfd/cpu-powerpc.c
34--- binutils-2.21-20110211-e5500/bfd/cpu-powerpc.c 2011-05-03 16:04:03.839066505 -0500
35+++ binutils-2.21-20110211-e6500/bfd/cpu-powerpc.c 2011-05-03 16:04:15.272066052 -0500
36@@ -366,6 +366,20 @@
37 FALSE, /* not the default */
38 powerpc_compatible,
39 bfd_default_scan,
40+ &bfd_powerpc_archs[20]
41+ },
42+ {
43+ 64, /* 64 bits in a word */
44+ 64, /* 64 bits in an address */
45+ 8, /* 8 bits in a byte */
46+ bfd_arch_powerpc,
47+ bfd_mach_ppc_e6500,
48+ "powerpc",
49+ "powerpc:e6500",
50+ 3,
51+ FALSE, /* not the default */
52+ powerpc_compatible,
53+ bfd_default_scan,
54 0
55 }
56 };
57diff -ruN binutils-2.21-20110211-e5500/gas/config/tc-ppc.c binutils-2.21-20110211-e6500/gas/config/tc-ppc.c
58--- binutils-2.21-20110211-e5500/gas/config/tc-ppc.c 2011-05-03 16:04:03.847063157 -0500
59+++ binutils-2.21-20110211-e6500/gas/config/tc-ppc.c 2011-05-03 16:04:15.279062744 -0500
60@@ -1236,6 +1236,7 @@
61 -me500mc, generate code for Freescale e500mc core complex\n\
62 -me500mc64, generate code for Freescale e500mc64 core complex\n\
63 -me5500, generate code for Freescale e5500 core complex\n\
64+-me6500, generate code for Freescale e6500 core complex\n\
65 -mspe generate code for Motorola SPE instructions\n\
66 -mtitan generate code for AppliedMicro Titan core complex\n\
67 -mregnames Allow symbolic names for registers\n\
68diff -ruN binutils-2.21-20110211-e5500/gas/doc/as.texinfo binutils-2.21-20110211-e6500/gas/doc/as.texinfo
69--- binutils-2.21-20110211-e5500/gas/doc/as.texinfo 2011-05-03 16:04:03.857062970 -0500
70+++ binutils-2.21-20110211-e6500/gas/doc/as.texinfo 2011-05-03 16:04:15.289062767 -0500
71@@ -431,8 +431,8 @@
72 [@b{-a32}|@b{-a64}]
73 [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|@b{-m403}|@b{-m405}|
74 @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}|
75- @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-mppc64bridge}|@b{-mbooke}|
76- @b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}|
77+ @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-me6500}|@b{-mppc64bridge}|
78+ @b{-mbooke}|@b{-mpower4}|@b{-mpr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}|
79 @b{-mpower7}|@b{-mpw7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}]
80 [@b{-many}] [@b{-maltivec}|@b{-mvsx}]
81 [@b{-mregnames}|@b{-mno-regnames}]
82diff -ruN binutils-2.21-20110211-e5500/gas/doc/c-ppc.texi binutils-2.21-20110211-e6500/gas/doc/c-ppc.texi
83--- binutils-2.21-20110211-e5500/gas/doc/c-ppc.texi 2011-05-03 16:04:03.859065711 -0500
84+++ binutils-2.21-20110211-e6500/gas/doc/c-ppc.texi 2011-05-03 16:04:15.291064458 -0500
85@@ -91,6 +91,9 @@
86 @item -me5500
87 Generate code for Freescale e5500 core complex.
88
89+@item -me6500
90+Generate code for Freescale e6500 core complex.
91+
92 @item -mspe
93 Generate code for Motorola SPE instructions.
94
95diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.d binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.d
96--- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.d 1969-12-31 18:00:00.000000000 -0600
97+++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.d 2011-05-03 17:04:13.611815418 -0500
98@@ -0,0 +1,75 @@
99+#as: -mppc -me6500
100+#objdump: -dr -Me6500
101+#name: Power E6500 tests
102+
103+.*: +file format elf(32)?(64)?-powerpc.*
104+
105+Disassembly of section \.text:
106+
107+0+00 <start>:
108+ 0: 10 01 10 c0 vabsdub v0,v1,v2
109+ 4: 10 01 11 00 vabsduh v0,v1,v2
110+ 8: 10 01 11 40 vabsduw v0,v1,v2
111+ c: 7c 01 10 dc mvidsplt v0,r1,r2
112+ 10: 7c 01 11 1c mviwsplt v0,r1,r2
113+ 14: 7c 00 12 0a lvexbx v0,0,r2
114+ 18: 7c 01 12 0a lvexbx v0,r1,r2
115+ 1c: 7c 00 12 4a lvexhx v0,0,r2
116+ 20: 7c 01 12 4a lvexhx v0,r1,r2
117+ 24: 7c 00 12 8a lvexwx v0,0,r2
118+ 28: 7c 01 12 8a lvexwx v0,r1,r2
119+ 2c: 7c 00 13 0a stvexbx v0,0,r2
120+ 30: 7c 01 13 0a stvexbx v0,r1,r2
121+ 34: 7c 00 13 4a stvexhx v0,0,r2
122+ 38: 7c 01 13 4a stvexhx v0,r1,r2
123+ 3c: 7c 00 13 8a stvexwx v0,0,r2
124+ 40: 7c 01 13 8a stvexwx v0,r1,r2
125+ 44: 7c 00 12 4e lvepx v0,0,r2
126+ 48: 7c 01 12 4e lvepx v0,r1,r2
127+ 4c: 7c 00 12 0e lvepxl v0,0,r2
128+ 50: 7c 01 12 0e lvepxl v0,r1,r2
129+ 54: 7c 00 16 4e stvepx v0,0,r2
130+ 58: 7c 01 16 4e stvepx v0,r1,r2
131+ 5c: 7c 00 16 0e stvepxl v0,0,r2
132+ 60: 7c 01 16 0e stvepxl v0,r1,r2
133+ 64: 7c 00 14 8a lvlx v0,0,r2
134+ 68: 7c 01 14 8a lvlx v0,r1,r2
135+ 6c: 7c 00 16 8a lvlxl v0,0,r2
136+ 70: 7c 01 16 8a lvlxl v0,r1,r2
137+ 74: 7c 00 14 4a lvrx v0,0,r2
138+ 78: 7c 01 14 4a lvrx v0,r1,r2
139+ 7c: 7c 00 16 4a lvrxl v0,0,r2
140+ 80: 7c 01 16 4a lvrxl v0,r1,r2
141+ 84: 7c 00 15 8a stvlx v0,0,r2
142+ 88: 7c 01 15 8a stvlx v0,r1,r2
143+ 8c: 7c 00 17 8a stvlxl v0,0,r2
144+ 90: 7c 01 17 8a stvlxl v0,r1,r2
145+ 94: 7c 00 15 4a stvrx v0,0,r2
146+ 98: 7c 01 15 4a stvrx v0,r1,r2
147+ 9c: 7c 00 17 4a stvrxl v0,0,r2
148+ a0: 7c 01 17 4a stvrxl v0,r1,r2
149+ a4: 7c 00 14 ca lvswx v0,0,r2
150+ a8: 7c 01 14 ca lvswx v0,r1,r2
151+ ac: 7c 00 16 ca lvswxl v0,0,r2
152+ b0: 7c 01 16 ca lvswxl v0,r1,r2
153+ b4: 7c 00 15 ca stvswx v0,0,r2
154+ b8: 7c 01 15 ca stvswx v0,r1,r2
155+ bc: 7c 00 17 ca stvswxl v0,0,r2
156+ c0: 7c 01 17 ca stvswxl v0,r1,r2
157+ c4: 7c 00 16 0a lvsm v0,0,r2
158+ c8: 7c 01 16 0a lvsm v0,r1,r2
159+ cc: 7f 5a d3 78 miso
160+ d0: 7c 00 04 ac sync
161+ d4: 7c 00 04 ac sync
162+ d8: 7c 20 04 ac lwsync
163+ dc: 7c 00 04 ac sync
164+ e0: 7c 07 04 ac sync 0,7
165+ e4: 7c 28 04 ac sync 1,8
166+ e8: 7c 00 00 c3 dni 0,0
167+ ec: 7f ff 00 c3 dni 31,31
168+ f0: 7c 40 0b 4d dcblq. 2,0,r1
169+ f4: 7c 43 0b 4d dcblq. 2,r3,r1
170+ f8: 7c 40 09 8d icblq. 2,0,r1
171+ fc: 7c 43 09 8d icblq. 2,r3,r1
172+ 100: 7c 10 02 dc mftmr r0,16
173+ 104: 7c 10 03 dc mttmr 16,r0
174diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.s binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.s
175--- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/e6500.s 1969-12-31 18:00:00.000000000 -0600
176+++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/e6500.s 2011-05-03 16:35:30.724819687 -0500
177@@ -0,0 +1,69 @@
178+# Power E6500 tests
179+ .section ".text"
180+start:
181+ vabsdub 0, 1, 2
182+ vabsduh 0, 1, 2
183+ vabsduw 0, 1, 2
184+ mvidsplt 0, 1, 2
185+ mviwsplt 0, 1, 2
186+ lvexbx 0, 0, 2
187+ lvexbx 0, 1, 2
188+ lvexhx 0, 0, 2
189+ lvexhx 0, 1, 2
190+ lvexwx 0, 0, 2
191+ lvexwx 0, 1, 2
192+ stvexbx 0, 0, 2
193+ stvexbx 0, 1, 2
194+ stvexhx 0, 0, 2
195+ stvexhx 0, 1, 2
196+ stvexwx 0, 0, 2
197+ stvexwx 0, 1, 2
198+ lvepx 0, 0, 2
199+ lvepx 0, 1, 2
200+ lvepxl 0, 0, 2
201+ lvepxl 0, 1, 2
202+ stvepx 0, 0, 2
203+ stvepx 0, 1, 2
204+ stvepxl 0, 0, 2
205+ stvepxl 0, 1, 2
206+ lvlx 0, 0, 2
207+ lvlx 0, 1, 2
208+ lvlxl 0, 0, 2
209+ lvlxl 0, 1, 2
210+ lvrx 0, 0, 2
211+ lvrx 0, 1, 2
212+ lvrxl 0, 0, 2
213+ lvrxl 0, 1, 2
214+ stvlx 0, 0, 2
215+ stvlx 0, 1, 2
216+ stvlxl 0, 0, 2
217+ stvlxl 0, 1, 2
218+ stvrx 0, 0, 2
219+ stvrx 0, 1, 2
220+ stvrxl 0, 0, 2
221+ stvrxl 0, 1, 2
222+ lvswx 0, 0, 2
223+ lvswx 0, 1, 2
224+ lvswxl 0, 0, 2
225+ lvswxl 0, 1, 2
226+ stvswx 0, 0, 2
227+ stvswx 0, 1, 2
228+ stvswxl 0, 0, 2
229+ stvswxl 0, 1, 2
230+ lvsm 0, 0, 2
231+ lvsm 0, 1, 2
232+ miso
233+ sync
234+ sync 0,0
235+ sync 1,0
236+ sync 2,0
237+ sync 3,7
238+ sync 3,8
239+ dni 0,0
240+ dni 31,31
241+ dcblq. 2,0,1
242+ dcblq. 2,3,1
243+ icblq. 2,0,1
244+ icblq. 2,3,1
245+ mftmr 0,16
246+ mttmr 16,0
247diff -ruN binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/ppc.exp binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/ppc.exp
248--- binutils-2.21-20110211-e5500/gas/testsuite/gas/ppc/ppc.exp 2010-02-07 19:59:38.000000000 -0600
249+++ binutils-2.21-20110211-e6500/gas/testsuite/gas/ppc/ppc.exp 2011-05-03 16:04:15.297067070 -0500
250@@ -42,6 +42,7 @@
251 run_list_test "range" "-a32"
252 run_dump_test "ppc750ps"
253 run_dump_test "e500mc"
254+ run_dump_test "e6500"
255 run_dump_test "a2"
256 run_dump_test "cell"
257 run_dump_test "common"
258diff -ruN binutils-2.21-20110211-e5500/include/opcode/ppc.h binutils-2.21-20110211-e6500/include/opcode/ppc.h
259--- binutils-2.21-20110211-e5500/include/opcode/ppc.h 2010-07-03 01:51:53.000000000 -0500
260+++ binutils-2.21-20110211-e6500/include/opcode/ppc.h 2011-05-03 16:04:15.298069340 -0500
261@@ -174,6 +174,15 @@
262 /* Opcode which is supported by the e500 family */
263 #define PPC_OPCODE_E500 0x100000000ull
264
265+/* Opcode is supported by Extended Altivec Vector Unit */
266+#define PPC_OPCODE_ALTIVEC2 0x200000000ull
267+
268+/* Opcode is supported by Power E6500 */
269+#define PPC_OPCODE_E6500 0x400000000ull
270+
271+/* Opcode is supported by Thread management APU */
272+#define PPC_OPCODE_TMR 0x800000000ull
273+
274 /* A macro to extract the major opcode from an instruction. */
275 #define PPC_OP(i) (((i) >> 26) & 0x3f)
276
277diff -ruN binutils-2.21-20110211-e5500/opcodes/ppc-dis.c binutils-2.21-20110211-e6500/opcodes/ppc-dis.c
278--- binutils-2.21-20110211-e5500/opcodes/ppc-dis.c 2011-05-03 16:04:03.862065832 -0500
279+++ binutils-2.21-20110211-e6500/opcodes/ppc-dis.c 2011-05-03 16:04:15.300067851 -0500
280@@ -120,6 +120,12 @@
281 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
282 | PPC_OPCODE_POWER7),
283 0 },
284+ { "e6500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL
285+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
286+ | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_ALTIVEC
287+ | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_E6500 | PPC_OPCODE_POWER4
288+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7),
289+ 0 },
290 { "e500x2", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE
291 | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
292 | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI
293diff -ruN binutils-2.21-20110211-e5500/opcodes/ppc-opc.c binutils-2.21-20110211-e6500/opcodes/ppc-opc.c
294--- binutils-2.21-20110211-e5500/opcodes/ppc-opc.c 2011-02-11 10:58:12.000000000 -0600
295+++ binutils-2.21-20110211-e6500/opcodes/ppc-opc.c 2011-05-03 17:22:20.260813917 -0500
296@@ -53,6 +53,7 @@
297 static long extract_boe (unsigned long, ppc_cpu_t, int *);
298 static unsigned long insert_fxm (unsigned long, long, ppc_cpu_t, const char **);
299 static long extract_fxm (unsigned long, ppc_cpu_t, int *);
300+static unsigned long insert_ls (unsigned long, long, ppc_cpu_t, const char **);
301 static unsigned long insert_mbe (unsigned long, long, ppc_cpu_t, const char **);
302 static long extract_mbe (unsigned long, ppc_cpu_t, int *);
303 static unsigned long insert_mb6 (unsigned long, long, ppc_cpu_t, const char **);
304@@ -450,6 +451,7 @@
305 lower 5 bits are stored in the upper 5 and vice- versa. */
306 #define SPR SISIGNOPT + 1
307 #define PMR SPR
308+#define TMR SPR
309 #define SPR_MASK (0x3ff << 11)
310 { 0x3ff, 11, insert_spr, extract_spr, 0 },
311
312@@ -472,8 +474,12 @@
313 #define T STRM
314 { 0x3, 21, NULL, NULL, 0 },
315
316+ /* The ESYNC field in an X (sync) form instruction. */
317+#define ESYNC STRM + 1
318+ { 0xf, 16, insert_ls, NULL, PPC_OPERAND_OPTIONAL },
319+
320 /* The SV field in a POWER SC form instruction. */
321-#define SV STRM + 1
322+#define SV ESYNC + 1
323 { 0x3fff, 2, NULL, NULL, 0 },
324
325 /* The TBR field in an XFX form instruction. This is like the SPR
326@@ -515,6 +521,7 @@
327
328 /* The UIMM field in a VX form instruction. */
329 #define UIMM SIMM + 1
330+#define DCTL UIMM
331 { 0x1f, 16, NULL, NULL, 0 },
332
333 /* The SHB field in a VA form instruction. */
334@@ -996,6 +1003,32 @@
335 return mask;
336 }
337
338+/* The LS field in a sync instruction that accepts 2 operands
339+ Values 2 and 3 are reserved,
340+ must be treated as 0 for future compatibility
341+ Values 0 and 1 can be accepted, if field ESYNC is zero
342+ Otherwise L = complement of ESYNC-bit2 (1<<18) */
343+
344+static unsigned long
345+insert_ls (unsigned long insn,
346+ long value,
347+ ppc_cpu_t dialect ATTRIBUTE_UNUSED,
348+ const char **errmsg ATTRIBUTE_UNUSED)
349+{
350+ unsigned long ls;
351+
352+ ls = (insn >> 21) & 0x03;
353+ if (value == 0)
354+ {
355+ if (ls > 1)
356+ return insn & ~(0x3 << 21);
357+ return insn;
358+ }
359+ if ((value & 0x2) != 0)
360+ return (insn & ~(0x3 << 21)) | ((value & 0xf) << 16);
361+ return (insn & ~(0x3 << 21)) | (0x1 << 21) | ((value & 0xf) << 16);
362+}
363+
364 /* The MB and ME fields in an M form instruction expressed as a single
365 operand which is itself a bitmask. The extraction function always
366 marks it as invalid, since we never want to recognize an
367@@ -1728,6 +1761,9 @@
368 /* An X form sync instruction with everything filled in except the LS field. */
369 #define XSYNC_MASK (0xff9fffff)
370
371+/* An X form sync instruction with everything filled in except the L and E fields. */
372+#define XSYNCLE_MASK (0xff90ffff)
373+
374 /* An X_MASK, but with the EH bit clear. */
375 #define XEH_MASK (X_MASK & ~((unsigned long )1))
376
377@@ -1922,6 +1958,7 @@
378 #define PPC860 PPC
379 #define PPCPS PPC_OPCODE_PPCPS
380 #define PPCVEC PPC_OPCODE_ALTIVEC
381+#define PPCVEC2 PPC_OPCODE_ALTIVEC2
382 #define PPCVSX PPC_OPCODE_VSX
383 #define POWER PPC_OPCODE_POWER
384 #define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2
385@@ -1940,6 +1977,7 @@
386 #define PPCEFS PPC_OPCODE_EFS
387 #define PPCBRLK PPC_OPCODE_BRLOCK
388 #define PPCPMR PPC_OPCODE_PMR
389+#define PPCTMR PPC_OPCODE_TMR
390 #define PPCCHLK PPC_OPCODE_CACHELCK
391 #define PPCRFMCI PPC_OPCODE_RFMCI
392 #define E500MC PPC_OPCODE_E500MC
393@@ -1947,6 +1985,7 @@
394 #define TITAN PPC_OPCODE_TITAN
395 #define MULHW PPC_OPCODE_405 | PPC_OPCODE_440 | TITAN
396 #define E500 PPC_OPCODE_E500
397+#define E6500 PPC_OPCODE_E6500
398
399 /* The opcode table.
400
401@@ -2112,12 +2151,14 @@
402 {"machhwsu", XO (4, 76,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
403 {"machhwsu.", XO (4, 76,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
404 {"ps_cmpo1", X (4, 96), X_MASK|(3<<21), PPCPS, PPCNONE, {BF, FRA, FRB}},
405+{"vabsdub", VX (4, 192), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}},
406 {"vcmpeqfp", VXR(4, 198,0), VXR_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
407 {"vpkuwus", VX (4, 206), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
408 {"machhws", XO (4, 108,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
409 {"machhws.", XO (4, 108,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
410 {"nmachhws", XO (4, 110,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
411 {"nmachhws.", XO (4, 110,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
412+{"vabsduh", VX (4, 256), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}},
413 {"vmaxsb", VX (4, 258), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
414 {"vslb", VX (4, 260), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
415 {"vmulosb", VX (4, 264), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
416@@ -2130,6 +2171,7 @@
417 {"mulchwu.", XRC(4, 136,1), X_MASK, MULHW, PPCNONE, {RT, RA, RB}},
418 {"macchwu", XO (4, 140,0,0),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
419 {"macchwu.", XO (4, 140,0,1),XO_MASK, MULHW, PPCNONE, {RT, RA, RB}},
420+{"vabsduw", VX (4, 320), VX_MASK, PPCVEC2, PPCNONE, {VD, VA, VB}},
421 {"vmaxsh", VX (4, 322), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
422 {"vslh", VX (4, 324), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
423 {"vmulosh", VX (4, 328), VX_MASK, PPCVEC, PPCNONE, {VD, VA, VB}},
424@@ -3613,6 +3655,8 @@
425
426 {"lbepx", X(31,95), X_MASK, E500MC|PPCA2, PPCNONE, {RT, RA, RB}},
427
428+{"dni", XRC(31,97,1), XRB_MASK, E6500, PPCNONE, {DUI, DCTL}},
429+
430 {"lvx", X(31,103), X_MASK, PPCVEC, PPCNONE, {VD, RA, RB}},
431 {"lqfcmx", APU(31,103,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
432
433@@ -3622,6 +3666,8 @@
434 {"mul", XO(31,107,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
435 {"mul.", XO(31,107,0,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
436
437+{"mvidsplt", X(31,110), X_MASK, PPCVEC2, PPCNONE, {VD, RA, RB}},
438+
439 {"mtsrdin", X(31,114), XRA_MASK, PPC64, PPCNONE, {RS, RB}},
440
441 {"lharx", X(31,116), XEH_MASK, POWER7, PPCNONE, {RT, RA0, RB, EH}},
442@@ -3656,6 +3702,8 @@
443 {"adde.", XO(31,138,0,1), XO_MASK, PPCCOM, PPCNONE, {RT, RA, RB}},
444 {"ae.", XO(31,138,0,1), XO_MASK, PWRCOM, PPCNONE, {RT, RA, RB}},
445
446+{"mviwsplt", X(31,142), X_MASK, PPCVEC2, PPCNONE, {VD, RA, RB}},
447+
448 {"dcbtstlse", X(31,142), X_MASK, PPCCHLK, PPCNONE, {CT, RA, RB}},
449
450 {"mtcr", XFXM(31,144,0xff,0), XRARB_MASK, COM, PPCNONE, {RS}},
451@@ -3711,6 +3759,8 @@
452
453 {"prtyd", X(31,186), XRB_MASK, POWER6|PPCA2, PPCNONE, {RA, RS}},
454
455+{"icblq.", XRC(31,198,1), X_MASK, E6500, PPCNONE, {CT, RA0, RB}},
456+
457 {"stvewx", X(31,199), X_MASK, PPCVEC, PPCNONE, {VS, RA, RB}},
458 {"stwfcmx", APU(31,199,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
459
460@@ -3788,8 +3838,12 @@
461 {"mfdcrx", X(31,259), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RS, RA}},
462 {"mfdcrx.", XRC(31,259,1), X_MASK, PPCA2, PPCNONE, {RS, RA}},
463
464+{"lvexbx", X(31,261), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
465+
466 {"icbt", X(31,262), XRT_MASK, PPC403, PPCNONE, {RA, RB}},
467
468+{"lvepxl", X(31,263), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
469+
470 {"ldfcmx", APU(31,263,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
471 {"doz", XO(31,264,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
472 {"doz.", XO(31,264,0,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
473@@ -3823,6 +3877,9 @@
474
475 {"mfdcrux", X(31,291), X_MASK, PPC464, PPCNONE, {RS, RA}},
476
477+{"lvexhx", X(31,293), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
478+{"lvepx", X(31,295), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
479+
480 {"tlbie", X(31,306), XRTLRA_MASK, PPC, TITAN, {RB, L}},
481 {"tlbi", X(31,306), XRT_MASK, POWER, PPCNONE, {RA0, RB}},
482
483@@ -3874,6 +3931,8 @@
484 {"mfdcr", X(31,323), X_MASK, PPC403|BOOKE|PPCA2|PPC476, TITAN, {RT, SPR}},
485 {"mfdcr.", XRC(31,323,1), X_MASK, PPCA2, PPCNONE, {RT, SPR}},
486
487+{"lvexwx", X(31,325), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
488+
489 {"dcread", X(31,326), X_MASK, PPC476|TITAN, PPCNONE, {RT, RA, RB}},
490
491 {"div", XO(31,331,0,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
492@@ -3882,6 +3941,7 @@
493 {"lxvdsx", X(31,332), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA, RB}},
494
495 {"mfpmr", X(31,334), X_MASK, PPCPMR|PPCE300, PPCNONE, {RT, PMR}},
496+{"mftmr", X(31,366), X_MASK, PPCTMR|E6500, PPCNONE, {RT, TMR}},
497
498 {"mfmq", XSPR(31,339, 0), XSPR_MASK, M601, PPCNONE, {RT}},
499 {"mfxer", XSPR(31,339, 1), XSPR_MASK, COM, PPCNONE, {RT}},
500@@ -4112,6 +4172,8 @@
501 {"mtdcrx", X(31,387), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RA, RS}},
502 {"mtdcrx.", XRC(31,387,1), X_MASK, PPCA2, PPCNONE, {RA, RS}},
503
504+{"stvexbx", X(31,389), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
505+
506 {"dcblc", X(31,390), X_MASK, PPCCHLK|PPC476|TITAN, PPCNONE, {CT, RA, RB}},
507 {"stdfcmx", APU(31,391,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
508
509@@ -4136,6 +4198,10 @@
510
511 {"mtdcrux", X(31,419), X_MASK, PPC464, PPCNONE, {RA, RS}},
512
513+{"stvexhx", X(31,421), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
514+
515+{"dcblq.", XRC(31,422,1), X_MASK, E6500, PPCNONE, {CT, RA0, RB}},
516+
517 {"divde", XO(31,425,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}},
518 {"divde.", XO(31,425,0,1), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}},
519 {"divwe", XO(31,427,0,0), XO_MASK, POWER7|PPCA2, PPCNONE, {RT, RA, RB}},
520@@ -4149,6 +4215,8 @@
521
522 {"mdors", 0x7f9ce378, 0xffffffff, E500MC, PPCNONE, {0}},
523
524+{"miso", 0x7f5ad378, 0xffffffff, E6500, PPCNONE, {0}},
525+
526 {"mr", XRC(31,444,0), X_MASK, COM, PPCNONE, {RA, RS, RBS}},
527 {"or", XRC(31,444,0), X_MASK, COM, PPCNONE, {RA, RS, RB}},
528 {"mr.", XRC(31,444,1), X_MASK, COM, PPCNONE, {RA, RS, RBS}},
529@@ -4191,6 +4259,8 @@
530 {"mtdcr", X(31,451), X_MASK, PPC403|BOOKE|PPCA2|PPC476, TITAN, {SPR, RS}},
531 {"mtdcr.", XRC(31,451,1), X_MASK, PPCA2, PPCNONE, {SPR, RS}},
532
533+{"stvexwx", X(31,453), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
534+
535 {"dccci", X(31,454), XRT_MASK, PPC403|PPC440|TITAN|PPCA2, PPCNONE, {RAOPT, RBOPT}},
536 {"dci", X(31,454), XRARB_MASK, PPCA2|PPC476, PPCNONE, {CT}},
537
538@@ -4201,6 +4271,7 @@
539 {"divwu.", XO(31,459,0,1), XO_MASK, PPC, PPCNONE, {RT, RA, RB}},
540
541 {"mtpmr", X(31,462), X_MASK, PPCPMR|PPCE300, PPCNONE, {PMR, RS}},
542+{"mttmr", X(31,494), X_MASK, PPCTMR|E6500, PPCNONE, {TMR, RS}},
543
544 {"mtmq", XSPR(31,467, 0), XSPR_MASK, M601, PPCNONE, {RS}},
545 {"mtxer", XSPR(31,467, 1), XSPR_MASK, COM, PPCNONE, {RS}},
546@@ -4445,6 +4516,8 @@
547
548 {"lhdx", X(31,547), X_MASK, E500MC, PPCNONE, {RT, RA, RB}},
549
550+{"lvrx", X(31,549), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
551+
552 {"bbelr", X(31,550), X_MASK, PPCBRLK, PPCNONE, {0}},
553
554 {"lvrx", X(31,551), X_MASK, CELL, PPCNONE, {VD, RA0, RB}},
555@@ -4461,6 +4534,8 @@
556
557 {"lwdx", X(31,579), X_MASK, E500MC, PPCNONE, {RT, RA, RB}},
558
559+{"lvlx", X(31,581), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
560+
561 {"lwfcmux", APU(31,583,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
562
563 {"lxsdx", X(31,588), XX1_MASK, PPCVSX, PPCNONE, {XT6, RA, RB}},
564@@ -4472,9 +4547,10 @@
565
566 {"lwsync", XSYNC(31,598,1), 0xffffffff, PPC, E500, {0}},
567 {"ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, PPCNONE, {0}},
568+{"sync", X(31,598), XSYNCLE_MASK,E6500, PPCNONE, {LS, ESYNC}},
569 {"sync", X(31,598), XSYNC_MASK, PPCCOM, BOOKE|PPC476, {LS}},
570 {"msync", X(31,598), 0xffffffff, BOOKE|PPCA2|PPC476, PPCNONE, {0}},
571-{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, PPCNONE, {0}},
572+{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, E6500, {0}},
573 {"lwsync", X(31,598), 0xffffffff, E500, PPCNONE, {0}},
574 {"dcs", X(31,598), 0xffffffff, PWRCOM, PPCNONE, {0}},
575
576@@ -4485,6 +4561,8 @@
577
578 {"lddx", X(31,611), X_MASK, E500MC, PPCNONE, {RT, RA, RB}},
579
580+{"lvswx", X(31,613), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
581+
582 {"lqfcmux", APU(31,615,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
583
584 {"nego", XO(31,104,1,0), XORB_MASK, COM, PPCNONE, {RT, RA}},
585@@ -4534,6 +4612,8 @@
586
587 {"sthdx", X(31,675), X_MASK, E500MC, PPCNONE, {RS, RA, RB}},
588
589+{"stvrx", X(31,677), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
590+
591 {"stvrx", X(31,679), X_MASK, CELL, PPCNONE, {VS, RA0, RB}},
592 {"sthfcmux", APU(31,679,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
593
594@@ -4546,6 +4626,8 @@
595
596 {"stwdx", X(31,707), X_MASK, E500MC, PPCNONE, {RS, RA, RB}},
597
598+{"stvlx", X(31,709), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
599+
600 {"stwfcmux", APU(31,711,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
601
602 {"stxsdx", X(31,716), XX1_MASK, PPCVSX, PPCNONE, {XS6, RA, RB}},
603@@ -4578,6 +4660,8 @@
604
605 {"stddx", X(31,739), X_MASK, E500MC, PPCNONE, {RS, RA, RB}},
606
607+{"stvswx", X(31,741), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
608+
609 {"stqfcmux", APU(31,743,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
610
611 {"subfmeo", XO(31,232,1,0), XORB_MASK, PPCCOM, PPCNONE, {RT, RA}},
612@@ -4606,6 +4690,8 @@
613 {"srliq", XRC(31,760,0), X_MASK, M601, PPCNONE, {RA, RS, SH}},
614 {"srliq.", XRC(31,760,1), X_MASK, M601, PPCNONE, {RA, RS, SH}},
615
616+{"lvsm", X(31,773), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
617+{"stvepxl", X(31,775), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
618 {"lvlxl", X(31,775), X_MASK, CELL, PPCNONE, {VD, RA0, RB}},
619 {"ldfcmux", APU(31,775,0), APU_MASK, PPC405, PPCNONE, {FCRT, RA, RB}},
620
621@@ -4638,6 +4724,8 @@
622
623 {"lfddx", X(31,803), X_MASK, E500MC, PPCNONE, {FRT, RA, RB}},
624
625+{"lvrxl", X(31,805), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
626+{"stvepx", X(31,807), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
627 {"lvrxl", X(31,807), X_MASK, CELL, PPCNONE, {VD, RA0, RB}},
628
629 {"rac", X(31,818), X_MASK, M601, PPCNONE, {RT, RA, RB}},
630@@ -4658,6 +4746,8 @@
631 {"sradi", XS(31,413,0), XS_MASK, PPC64, PPCNONE, {RA, RS, SH6}},
632 {"sradi.", XS(31,413,1), XS_MASK, PPC64, PPCNONE, {RA, RS, SH6}},
633
634+{"lvlxl", X(31,837), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
635+
636 {"divo", XO(31,331,1,0), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
637 {"divo.", XO(31,331,1,1), XO_MASK, M601, PPCNONE, {RT, RA, RB}},
638
639@@ -4676,6 +4766,8 @@
640
641 {"lfiwax", X(31,855), X_MASK, POWER6|PPCA2|PPC476, PPCNONE, {FRT, RA0, RB}},
642
643+{"lvswxl", X(31,869), X_MASK, PPCVEC2, PPCNONE, {VD, RA0, RB}},
644+
645 {"abso", XO(31,360,1,0), XORB_MASK, M601, PPCNONE, {RT, RA}},
646 {"abso.", XO(31,360,1,1), XORB_MASK, M601, PPCNONE, {RT, RA}},
647
648@@ -4721,6 +4813,8 @@
649
650 {"stfddx", X(31,931), X_MASK, E500MC, PPCNONE, {FRS, RA, RB}},
651
652+{"stvrxl", X(31,933), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
653+
654 {"wclrone", XOPL2(31,934,2),XRT_MASK, PPCA2, PPCNONE, {RA0, RB}},
655 {"wclrall", X(31,934), XRARB_MASK, PPCA2, PPCNONE, {L}},
656 {"wclr", X(31,934), X_MASK, PPCA2, PPCNONE, {L, RA0, RB}},
657@@ -4749,6 +4843,8 @@
658 {"extsb", XRC(31,954,0), XRB_MASK, PPC, PPCNONE, {RA, RS}},
659 {"extsb.", XRC(31,954,1), XRB_MASK, PPC, PPCNONE, {RA, RS}},
660
661+{"stvlxl", X(31,965), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
662+
663 {"iccci", X(31,966), XRT_MASK, PPC403|PPC440|TITAN|PPCA2, PPCNONE, {RAOPT, RBOPT}},
664 {"ici", X(31,966), XRARB_MASK, PPCA2|PPC476, PPCNONE, {CT}},
665
666@@ -4776,6 +4872,8 @@
667
668 {"icbiep", XRT(31,991,0), XRT_MASK, E500MC|PPCA2, PPCNONE, {RA, RB}},
669
670+{"stvswxl", X(31,997), X_MASK, PPCVEC2, PPCNONE, {VS, RA0, RB}},
671+
672 {"icread", X(31,998), XRT_MASK, PPC403|PPC440|PPC476|TITAN, PPCNONE, {RA, RB}},
673
674 {"nabso", XO(31,488,1,0), XORB_MASK, M601, PPCNONE, {RT, RA}},
diff --git a/recipes-devtools/binutils/files/libiberty_path_fix.patch b/recipes-devtools/binutils/files/libiberty_path_fix.patch
deleted file mode 100644
index 3772dfb..0000000
--- a/recipes-devtools/binutils/files/libiberty_path_fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3don't let the distro compiler point to the wrong installation location
4
5Thanks to RP for helping find the source code causing the issue.
6
72010/08/13
8Nitin A Kamble <nitin.a.kamble@intel.com>
9Index: binutils-2.20.1/libiberty/Makefile.in
10===================================================================
11--- binutils-2.20.1.orig/libiberty/Makefile.in
12+++ binutils-2.20.1/libiberty/Makefile.in
13@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst
14 # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
15 # default multilib, so we have to take CFLAGS into account as well,
16 # since it will be passed the multilib flags.
17-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
18+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
19+MULTIOSDIR = ""
20 install_to_libdir: all
21 ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
22 $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
diff --git a/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch b/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch
deleted file mode 100644
index 039241f..0000000
--- a/recipes-devtools/binutils/files/libtool-2.4-update_fsl.patch
+++ /dev/null
@@ -1,18705 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: binutils-2.21.1/libtool.m4
4===================================================================
5--- binutils-2.21.1.orig/libtool.m4
6+++ binutils-2.21.1/libtool.m4
7@@ -1,7 +1,8 @@
8 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
9 #
10 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
11-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
12+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
13+# Inc.
14 # Written by Gordon Matzigkeit, 1996
15 #
16 # This file is free software; the Free Software Foundation gives
17@@ -10,7 +11,8 @@
18
19 m4_define([_LT_COPYING], [dnl
20 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
21-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
23+# Inc.
24 # Written by Gordon Matzigkeit, 1996
25 #
26 # This file is part of GNU Libtool.
27@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 ])
30
31-# serial 56 LT_INIT
32+# serial 57 LT_INIT
33
34
35 # LT_PREREQ(VERSION)
36@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
37 LIBTOOL_DEPS="$ltmain"
38
39 # Always use our own libtool.
40-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
41+LIBTOOL='$(SHELL) $(top_builddir)'
42+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
43 AC_SUBST(LIBTOOL)dnl
44
45 _LT_SETUP
46@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable
47 dnl
48 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
49 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
50+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
51 m4_require([_LT_CMD_RELOAD])dnl
52 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
53+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
54 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
55 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
56+m4_require([_LT_WITH_SYSROOT])dnl
57
58 _LT_CONFIG_LIBTOOL_INIT([
59 # See if we are running on zsh, and set the options which allow our
60@@ -199,7 +205,7 @@ aix3*)
61 esac
62
63 # Global variables:
64-ofile=libtool
65+ofile=${host_alias}-libtool
66 can_build_shared=yes
67
68 # All known linkers require a `.a' archive for static linking (except MSVC,
69@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_
70 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
71 configured by $[0], generated by m4_PACKAGE_STRING.
72
73-Copyright (C) 2009 Free Software Foundation, Inc.
74+Copyright (C) 2010 Free Software Foundation, Inc.
75 This config.lt script is free software; the Free Software Foundation
76 gives unlimited permision to copy, distribute and modify it."
77
78@@ -746,15 +752,12 @@ _LT_EOF
79 # if finds mixed CR/LF and LF-only lines. Since sed operates in
80 # text mode, it properly converts lines to CR/LF. This bash problem
81 # is reportedly fixed, but why not run on old versions too?
82- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
83- || (rm -f "$cfgfile"; exit 1)
84+ sed '$q' "$ltmain" >> "$cfgfile" \
85+ || (rm -f "$cfgfile"; exit 1)
86
87- _LT_PROG_XSI_SHELLFNS
88+ _LT_PROG_REPLACE_SHELLFNS
89
90- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
91- || (rm -f "$cfgfile"; exit 1)
92-
93- mv -f "$cfgfile" "$ofile" ||
94+ mv -f "$cfgfile" "$ofile" ||
95 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
96 chmod +x "$ofile"
97 ],
98@@ -980,6 +983,8 @@ _LT_EOF
99 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
100 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
101 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
102+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
103+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
104 cat > conftest.c << _LT_EOF
105 int main() { return 0;}
106 _LT_EOF
107@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
108 fi
109 ])
110
111-# _LT_SYS_MODULE_PATH_AIX
112-# -----------------------
113+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
114+# ----------------------------------
115 # Links a minimal program and checks the executable
116 # for the system default hardcoded library path. In most cases,
117 # this is /usr/lib:/lib, but when the MPI compilers are used
118 # the location of the communication and MPI libs are included too.
119 # If we don't find anything, use the default library path according
120 # to the aix ld manual.
121+# Store the results from the different compilers for each TAGNAME.
122+# Allow to override them for all tags through lt_cv_aix_libpath.
123 m4_defun([_LT_SYS_MODULE_PATH_AIX],
124 [m4_require([_LT_DECL_SED])dnl
125-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
126-lt_aix_libpath_sed='
127- /Import File Strings/,/^$/ {
128- /^0/ {
129- s/^0 *\(.*\)$/\1/
130- p
131- }
132- }'
133-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
134-# Check for a 64-bit object if we didn't find anything.
135-if test -z "$aix_libpath"; then
136- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
137-fi],[])
138-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
139+if test "${lt_cv_aix_libpath+set}" = set; then
140+ aix_libpath=$lt_cv_aix_libpath
141+else
142+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
143+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
144+ lt_aix_libpath_sed='[
145+ /Import File Strings/,/^$/ {
146+ /^0/ {
147+ s/^0 *\([^ ]*\) *$/\1/
148+ p
149+ }
150+ }]'
151+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
152+ # Check for a 64-bit object if we didn't find anything.
153+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
154+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
155+ fi],[])
156+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
157+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
158+ fi
159+ ])
160+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
161+fi
162 ])# _LT_SYS_MODULE_PATH_AIX
163
164
165@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
166
167 AC_MSG_CHECKING([how to print strings])
168 # Test print first, because it will be a builtin if present.
169-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
170+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
171 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
172 ECHO='print -r --'
173 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
174@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo progr
175 ])# _LT_PROG_ECHO_BACKSLASH
176
177
178+# _LT_WITH_SYSROOT
179+# ----------------
180+AC_DEFUN([_LT_WITH_SYSROOT],
181+[AC_MSG_CHECKING([for sysroot])
182+AC_ARG_WITH([libtool-sysroot],
183+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR
184+ (or the compiler's sysroot if not specified).],
185+[], [with_libtool_sysroot=no])
186+
187+dnl lt_sysroot will always be passed unquoted. We quote it here
188+dnl in case the user passed a directory name.
189+lt_sysroot=
190+case ${with_libtool_sysroot} in #(
191+ yes)
192+ if test "$GCC" = yes; then
193+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
194+ fi
195+ ;; #(
196+ /*)
197+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
198+ ;; #(
199+ no|'')
200+ ;; #(
201+ *)
202+ AC_MSG_RESULT([${with_libtool_sysroot}])
203+ AC_MSG_ERROR([The sysroot must be an absolute path.])
204+ ;;
205+esac
206+
207+ AC_MSG_RESULT([${lt_sysroot:-no}])
208+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
209+[dependent libraries, and in which our libraries should be installed.])])
210+
211 # _LT_ENABLE_LOCK
212 # ---------------
213 m4_defun([_LT_ENABLE_LOCK],
214@@ -1307,14 +1356,47 @@ need_locks="$enable_libtool_lock"
215 ])# _LT_ENABLE_LOCK
216
217
218+# _LT_PROG_AR
219+# -----------
220+m4_defun([_LT_PROG_AR],
221+[AC_CHECK_TOOLS(AR, [ar], false)
222+: ${AR=ar}
223+: ${AR_FLAGS=cru}
224+_LT_DECL([], [AR], [1], [The archiver])
225+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
226+
227+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
228+ [lt_cv_ar_at_file=no
229+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
230+ [echo conftest.$ac_objext > conftest.lst
231+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
232+ AC_TRY_EVAL([lt_ar_try])
233+ if test "$ac_status" -eq 0; then
234+ # Ensure the archiver fails upon bogus file names.
235+ rm -f conftest.$ac_objext libconftest.a
236+ AC_TRY_EVAL([lt_ar_try])
237+ if test "$ac_status" -ne 0; then
238+ lt_cv_ar_at_file=@
239+ fi
240+ fi
241+ rm -f conftest.* libconftest.a
242+ ])
243+ ])
244+
245+if test "x$lt_cv_ar_at_file" = xno; then
246+ archiver_list_spec=
247+else
248+ archiver_list_spec=$lt_cv_ar_at_file
249+fi
250+_LT_DECL([], [archiver_list_spec], [1],
251+ [How to feed a file listing to the archiver])
252+])# _LT_PROG_AR
253+
254+
255 # _LT_CMD_OLD_ARCHIVE
256 # -------------------
257 m4_defun([_LT_CMD_OLD_ARCHIVE],
258-[AC_CHECK_TOOL(AR, ar, false)
259-test -z "$AR" && AR=ar
260-test -z "$AR_FLAGS" && AR_FLAGS=cru
261-_LT_DECL([], [AR], [1], [The archiver])
262-_LT_DECL([], [AR_FLAGS], [1])
263+[_LT_PROG_AR
264
265 AC_CHECK_TOOL(STRIP, strip, :)
266 test -z "$STRIP" && STRIP=:
267@@ -1610,7 +1692,7 @@ else
268 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
269 lt_status=$lt_dlunknown
270 cat > conftest.$ac_ext <<_LT_EOF
271-[#line __oline__ "configure"
272+[#line $LINENO "configure"
273 #include "confdefs.h"
274
275 #if HAVE_DLFCN_H
276@@ -1654,10 +1736,10 @@ else
277 /* When -fvisbility=hidden is used, assume the code has been annotated
278 correspondingly for the symbols needed. */
279 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
280-void fnord () __attribute__((visibility("default")));
281+int fnord () __attribute__((visibility("default")));
282 #endif
283
284-void fnord () { int i=42; }
285+int fnord () { return 42; }
286 int main ()
287 {
288 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
289@@ -2197,8 +2279,9 @@ cygwin* | mingw* | pw32* | cegcc*)
290 need_version=no
291 need_lib_prefix=no
292
293- case $GCC,$host_os in
294- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
295+ case $GCC,$cc_basename in
296+ yes,*)
297+ # gcc
298 library_names_spec='$libname.dll.a'
299 # DLL is installed to $(libdir)/../bin by postinstall_cmds
300 postinstall_cmds='base_file=`basename \${file}`~
301@@ -2231,13 +2314,71 @@ m4_if([$1], [],[
302 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
303 ;;
304 esac
305+ dynamic_linker='Win32 ld.exe'
306+ ;;
307+
308+ *,cl*)
309+ # Native MSVC
310+ libname_spec='$name'
311+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
312+ library_names_spec='${libname}.dll.lib'
313+
314+ case $build_os in
315+ mingw*)
316+ sys_lib_search_path_spec=
317+ lt_save_ifs=$IFS
318+ IFS=';'
319+ for lt_path in $LIB
320+ do
321+ IFS=$lt_save_ifs
322+ # Let DOS variable expansion print the short 8.3 style file name.
323+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
324+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
325+ done
326+ IFS=$lt_save_ifs
327+ # Convert to MSYS style.
328+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
329+ ;;
330+ cygwin*)
331+ # Convert to unix form, then to dos form, then back to unix form
332+ # but this time dos style (no spaces!) so that the unix form looks
333+ # like /cygdrive/c/PROGRA~1:/cygdr...
334+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
335+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
336+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
337+ ;;
338+ *)
339+ sys_lib_search_path_spec="$LIB"
340+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
341+ # It is most probably a Windows format PATH.
342+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
343+ else
344+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
345+ fi
346+ # FIXME: find the short name or the path components, as spaces are
347+ # common. (e.g. "Program Files" -> "PROGRA~1")
348+ ;;
349+ esac
350+
351+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
352+ postinstall_cmds='base_file=`basename \${file}`~
353+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
354+ dldir=$destdir/`dirname \$dlpath`~
355+ test -d \$dldir || mkdir -p \$dldir~
356+ $install_prog $dir/$dlname \$dldir/$dlname'
357+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
358+ dlpath=$dir/\$dldll~
359+ $RM \$dlpath'
360+ shlibpath_overrides_runpath=yes
361+ dynamic_linker='Win32 link.exe'
362 ;;
363
364 *)
365+ # Assume MSVC wrapper
366 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
367+ dynamic_linker='Win32 ld.exe'
368 ;;
369 esac
370- dynamic_linker='Win32 ld.exe'
371 # FIXME: first we should search . and the directory the executable is in
372 shlibpath_var=PATH
373 ;;
374@@ -2333,7 +2474,7 @@ haiku*)
375 soname_spec='${libname}${release}${shared_ext}$major'
376 shlibpath_var=LIBRARY_PATH
377 shlibpath_overrides_runpath=yes
378- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
379+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
380 hardcode_into_libs=yes
381 ;;
382
383@@ -2941,6 +3082,11 @@ case $reload_flag in
384 esac
385 reload_cmds='$LD$reload_flag -o $output$reload_objs'
386 case $host_os in
387+ cygwin* | mingw* | pw32* | cegcc*)
388+ if test "$GCC" != yes; then
389+ reload_cmds=false
390+ fi
391+ ;;
392 darwin*)
393 if test "$GCC" = yes; then
394 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
395@@ -3007,7 +3153,8 @@ mingw* | pw32*)
396 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
397 lt_cv_file_magic_cmd='func_win32_libid'
398 else
399- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
400+ # Keep this pattern in sync with the one in func_win32_libid.
401+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
402 lt_cv_file_magic_cmd='$OBJDUMP -f'
403 fi
404 ;;
405@@ -3158,6 +3305,21 @@ tpf*)
406 ;;
407 esac
408 ])
409+
410+file_magic_glob=
411+want_nocaseglob=no
412+if test "$build" = "$host"; then
413+ case $host_os in
414+ mingw* | pw32*)
415+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
416+ want_nocaseglob=yes
417+ else
418+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
419+ fi
420+ ;;
421+ esac
422+fi
423+
424 file_magic_cmd=$lt_cv_file_magic_cmd
425 deplibs_check_method=$lt_cv_deplibs_check_method
426 test -z "$deplibs_check_method" && deplibs_check_method=unknown
427@@ -3165,7 +3327,11 @@ test -z "$deplibs_check_method" && depli
428 _LT_DECL([], [deplibs_check_method], [1],
429 [Method to check whether dependent libraries are shared objects])
430 _LT_DECL([], [file_magic_cmd], [1],
431- [Command to use when deplibs_check_method == "file_magic"])
432+ [Command to use when deplibs_check_method = "file_magic"])
433+_LT_DECL([], [file_magic_glob], [1],
434+ [How to find potential files when deplibs_check_method = "file_magic"])
435+_LT_DECL([], [want_nocaseglob], [1],
436+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
437 ])# _LT_CHECK_MAGIC_METHOD
438
439
440@@ -3268,6 +3434,67 @@ dnl aclocal-1.4 backwards compatibility:
441 dnl AC_DEFUN([AM_PROG_NM], [])
442 dnl AC_DEFUN([AC_PROG_NM], [])
443
444+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
445+# --------------------------------
446+# how to determine the name of the shared library
447+# associated with a specific link library.
448+# -- PORTME fill in with the dynamic library characteristics
449+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
450+[m4_require([_LT_DECL_EGREP])
451+m4_require([_LT_DECL_OBJDUMP])
452+m4_require([_LT_DECL_DLLTOOL])
453+AC_CACHE_CHECK([how to associate runtime and link libraries],
454+lt_cv_sharedlib_from_linklib_cmd,
455+[lt_cv_sharedlib_from_linklib_cmd='unknown'
456+
457+case $host_os in
458+cygwin* | mingw* | pw32* | cegcc*)
459+ # two different shell functions defined in ltmain.sh
460+ # decide which to use based on capabilities of $DLLTOOL
461+ case `$DLLTOOL --help 2>&1` in
462+ *--identify-strict*)
463+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
464+ ;;
465+ *)
466+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
467+ ;;
468+ esac
469+ ;;
470+*)
471+ # fallback: assume linklib IS sharedlib
472+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
473+ ;;
474+esac
475+])
476+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
477+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
478+
479+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
480+ [Command to associate shared and link libraries])
481+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
482+
483+
484+# _LT_PATH_MANIFEST_TOOL
485+# ----------------------
486+# locate the manifest tool
487+m4_defun([_LT_PATH_MANIFEST_TOOL],
488+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
489+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
490+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
491+ [lt_cv_path_mainfest_tool=no
492+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
493+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
494+ cat conftest.err >&AS_MESSAGE_LOG_FD
495+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
496+ lt_cv_path_mainfest_tool=yes
497+ fi
498+ rm -f conftest*])
499+if test "x$lt_cv_path_mainfest_tool" != xyes; then
500+ MANIFEST_TOOL=:
501+fi
502+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
503+])# _LT_PATH_MANIFEST_TOOL
504+
505
506 # LT_LIB_M
507 # --------
508@@ -3394,8 +3621,8 @@ esac
509 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
510
511 # Transform an extracted symbol line into symbol name and symbol address
512-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
513-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
514+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
515+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
516
517 # Handle CRLF in mingw tool chain
518 opt_cr=
519@@ -3431,6 +3658,7 @@ for ac_symprfx in "" "_"; do
520 else
521 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
522 fi
523+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
524
525 # Check to see that the pipe works correctly.
526 pipe_works=no
527@@ -3464,6 +3692,18 @@ _LT_EOF
528 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
529 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
530 cat <<_LT_EOF > conftest.$ac_ext
531+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
532+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
533+/* DATA imports from DLLs on WIN32 con't be const, because runtime
534+ relocations are performed -- see ld's documentation on pseudo-relocs. */
535+# define LT@&t@_DLSYM_CONST
536+#elif defined(__osf__)
537+/* This system does not cope well with relocations in const data. */
538+# define LT@&t@_DLSYM_CONST
539+#else
540+# define LT@&t@_DLSYM_CONST const
541+#endif
542+
543 #ifdef __cplusplus
544 extern "C" {
545 #endif
546@@ -3475,7 +3715,7 @@ _LT_EOF
547 cat <<_LT_EOF >> conftest.$ac_ext
548
549 /* The mapping between symbol names and symbols. */
550-const struct {
551+LT@&t@_DLSYM_CONST struct {
552 const char *name;
553 void *address;
554 }
555@@ -3501,15 +3741,15 @@ static const void *lt_preloaded_setup()
556 _LT_EOF
557 # Now try linking the two files.
558 mv conftest.$ac_objext conftstm.$ac_objext
559- lt_save_LIBS="$LIBS"
560- lt_save_CFLAGS="$CFLAGS"
561+ lt_globsym_save_LIBS=$LIBS
562+ lt_globsym_save_CFLAGS=$CFLAGS
563 LIBS="conftstm.$ac_objext"
564 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
565 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
566 pipe_works=yes
567 fi
568- LIBS="$lt_save_LIBS"
569- CFLAGS="$lt_save_CFLAGS"
570+ LIBS=$lt_globsym_save_LIBS
571+ CFLAGS=$lt_globsym_save_CFLAGS
572 else
573 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
574 fi
575@@ -3542,6 +3782,13 @@ else
576 AC_MSG_RESULT(ok)
577 fi
578
579+# Response file support.
580+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
581+ nm_file_list_spec='@'
582+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
583+ nm_file_list_spec='@'
584+fi
585+
586 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
587 [Take the output of nm and produce a listing of raw symbols and C names])
588 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
589@@ -3552,6 +3799,8 @@ _LT_DECL([global_symbol_to_c_name_addres
590 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
591 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
592 [Transform the output of nm in a C name address pair when lib prefix is needed])
593+_LT_DECL([], [nm_file_list_spec], [1],
594+ [Specify filename containing input files for $NM])
595 ]) # _LT_CMD_GLOBAL_SYMBOLS
596
597
598@@ -3563,7 +3812,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
599 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
600 _LT_TAGVAR(lt_prog_compiler_static, $1)=
601
602-AC_MSG_CHECKING([for $compiler option to produce PIC])
603 m4_if([$1], [CXX], [
604 # C++ specific cases for pic, static, wl, etc.
605 if test "$GXX" = yes; then
606@@ -3668,6 +3916,12 @@ m4_if([$1], [CXX], [
607 ;;
608 esac
609 ;;
610+ mingw* | cygwin* | os2* | pw32* | cegcc*)
611+ # This hack is so that the source file can tell whether it is being
612+ # built for inclusion in a dll (and should export symbols for example).
613+ m4_if([$1], [GCJ], [],
614+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
615+ ;;
616 dgux*)
617 case $cc_basename in
618 ec++*)
619@@ -3820,7 +4074,7 @@ m4_if([$1], [CXX], [
620 ;;
621 solaris*)
622 case $cc_basename in
623- CC*)
624+ CC* | sunCC*)
625 # Sun C++ 4.2, 5.x and Centerline C++
626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
627 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
628@@ -4042,6 +4296,12 @@ m4_if([$1], [CXX], [
629 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
630 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
631 ;;
632+ nagfor*)
633+ # NAG Fortran compiler
634+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
635+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
636+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
637+ ;;
638 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
639 # Portland Group compilers (*not* the Pentium gcc compiler,
640 # which looks to be a dead project)
641@@ -4104,7 +4364,7 @@ m4_if([$1], [CXX], [
642 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
643 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
644 case $cc_basename in
645- f77* | f90* | f95*)
646+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
647 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
648 *)
649 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
650@@ -4161,9 +4421,11 @@ case $host_os in
651 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
652 ;;
653 esac
654-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
655-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
656- [How to pass a linker flag through the compiler])
657+
658+AC_CACHE_CHECK([for $compiler option to produce PIC],
659+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
660+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
661+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
662
663 #
664 # Check to make sure the PIC flag actually works.
665@@ -4182,6 +4444,8 @@ fi
666 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
667 [Additional compiler flags for building library objects])
668
669+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
670+ [How to pass a linker flag through the compiler])
671 #
672 # Check to make sure the static flag actually works.
673 #
674@@ -4202,6 +4466,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog
675 m4_defun([_LT_LINKER_SHLIBS],
676 [AC_REQUIRE([LT_PATH_LD])dnl
677 AC_REQUIRE([LT_PATH_NM])dnl
678+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
679 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
680 m4_require([_LT_DECL_EGREP])dnl
681 m4_require([_LT_DECL_SED])dnl
682@@ -4210,6 +4475,7 @@ m4_require([_LT_TAG_COMPILER])dnl
683 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
684 m4_if([$1], [CXX], [
685 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
686+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
687 case $host_os in
688 aix[[4-9]]*)
689 # If we're using GNU nm, then we don't want the "-C" option.
690@@ -4224,15 +4490,20 @@ m4_if([$1], [CXX], [
691 ;;
692 pw32*)
693 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
694- ;;
695+ ;;
696 cygwin* | mingw* | cegcc*)
697- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
698- ;;
699+ case $cc_basename in
700+ cl*) ;;
701+ *)
702+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
703+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
704+ ;;
705+ esac
706+ ;;
707 *)
708 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
709- ;;
710+ ;;
711 esac
712- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
713 ], [
714 runpath_var=
715 _LT_TAGVAR(allow_undefined_flag, $1)=
716@@ -4400,7 +4671,8 @@ _LT_EOF
717 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
718 _LT_TAGVAR(always_export_symbols, $1)=no
719 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
720- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
721+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
722+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
723
724 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
725 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
726@@ -4448,7 +4720,7 @@ _LT_EOF
727 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
728 && test "$tmp_diet" = no
729 then
730- tmp_addflag=
731+ tmp_addflag=' $pic_flag'
732 tmp_sharedflag='-shared'
733 case $cc_basename,$host_cpu in
734 pgcc*) # Portland Group C compiler
735@@ -4499,12 +4771,12 @@ _LT_EOF
736 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
738 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
739- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
740+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
741 if test "x$supports_anon_versioning" = xyes; then
742 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
743 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
744 echo "local: *; };" >> $output_objdir/$libname.ver~
745- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
746+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
747 fi
748 ;;
749 esac
750@@ -4518,8 +4790,8 @@ _LT_EOF
751 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
752 wlarc=
753 else
754- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
755- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
756+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
757+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
758 fi
759 ;;
760
761@@ -4537,8 +4809,8 @@ _LT_EOF
762
763 _LT_EOF
764 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
765- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
766- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
767+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
768+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
769 else
770 _LT_TAGVAR(ld_shlibs, $1)=no
771 fi
772@@ -4584,8 +4856,8 @@ _LT_EOF
773
774 *)
775 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
776- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
777- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
778+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
779+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
780 else
781 _LT_TAGVAR(ld_shlibs, $1)=no
782 fi
783@@ -4715,7 +4987,7 @@ _LT_EOF
784 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
785 # Determine the default libpath from the value encoded in an
786 # empty executable.
787- _LT_SYS_MODULE_PATH_AIX
788+ _LT_SYS_MODULE_PATH_AIX([$1])
789 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
790 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
791 else
792@@ -4726,7 +4998,7 @@ _LT_EOF
793 else
794 # Determine the default libpath from the value encoded in an
795 # empty executable.
796- _LT_SYS_MODULE_PATH_AIX
797+ _LT_SYS_MODULE_PATH_AIX([$1])
798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
799 # Warning - without using the other run time loading flags,
800 # -berok will link without error, but may produce a broken library.
801@@ -4770,20 +5042,63 @@ _LT_EOF
802 # Microsoft Visual C++.
803 # hardcode_libdir_flag_spec is actually meaningless, as there is
804 # no search path for DLLs.
805- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
806- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
807- # Tell ltmain to make .lib files, not .a files.
808- libext=lib
809- # Tell ltmain to make .dll files, not .so files.
810- shrext_cmds=".dll"
811- # FIXME: Setting linknames here is a bad hack.
812- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
813- # The linker will automatically build a .lib file if we build a DLL.
814- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
815- # FIXME: Should let the user specify the lib program.
816- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
817- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
818- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
819+ case $cc_basename in
820+ cl*)
821+ # Native MSVC
822+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
823+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
824+ _LT_TAGVAR(always_export_symbols, $1)=yes
825+ _LT_TAGVAR(file_list_spec, $1)='@'
826+ # Tell ltmain to make .lib files, not .a files.
827+ libext=lib
828+ # Tell ltmain to make .dll files, not .so files.
829+ shrext_cmds=".dll"
830+ # FIXME: Setting linknames here is a bad hack.
831+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
832+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
833+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
834+ else
835+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
836+ fi~
837+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
838+ linknames='
839+ # The linker will not automatically build a static lib if we build a DLL.
840+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
841+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
842+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
843+ # Don't use ranlib
844+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
845+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
846+ lt_tool_outputfile="@TOOL_OUTPUT@"~
847+ case $lt_outputfile in
848+ *.exe|*.EXE) ;;
849+ *)
850+ lt_outputfile="$lt_outputfile.exe"
851+ lt_tool_outputfile="$lt_tool_outputfile.exe"
852+ ;;
853+ esac~
854+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
855+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
856+ $RM "$lt_outputfile.manifest";
857+ fi'
858+ ;;
859+ *)
860+ # Assume MSVC wrapper
861+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
862+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
863+ # Tell ltmain to make .lib files, not .a files.
864+ libext=lib
865+ # Tell ltmain to make .dll files, not .so files.
866+ shrext_cmds=".dll"
867+ # FIXME: Setting linknames here is a bad hack.
868+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
869+ # The linker will automatically build a .lib file if we build a DLL.
870+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
871+ # FIXME: Should let the user specify the lib program.
872+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
873+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
874+ ;;
875+ esac
876 ;;
877
878 darwin* | rhapsody*)
879@@ -4821,7 +5136,7 @@ _LT_EOF
880
881 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
882 freebsd* | dragonfly*)
883- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
884+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
885 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
886 _LT_TAGVAR(hardcode_direct, $1)=yes
887 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
888@@ -4829,7 +5144,7 @@ _LT_EOF
889
890 hpux9*)
891 if test "$GCC" = yes; then
892- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
893+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
894 else
895 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
896 fi
897@@ -4845,7 +5160,7 @@ _LT_EOF
898
899 hpux10*)
900 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
901- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
902+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
903 else
904 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
905 fi
906@@ -4869,10 +5184,10 @@ _LT_EOF
907 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
908 ;;
909 ia64*)
910- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
911+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
912 ;;
913 *)
914- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
915+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
916 ;;
917 esac
918 else
919@@ -4919,16 +5234,31 @@ _LT_EOF
920
921 irix5* | irix6* | nonstopux*)
922 if test "$GCC" = yes; then
923- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
924+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
925 # Try to use the -exported_symbol ld option, if it does not
926 # work, assume that -exports_file does not work either and
927 # implicitly export all symbols.
928- save_LDFLAGS="$LDFLAGS"
929- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
930- AC_LINK_IFELSE(int foo(void) {},
931- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
932- )
933- LDFLAGS="$save_LDFLAGS"
934+ # This should be the same for all languages, so no per-tag cache variable.
935+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
936+ [lt_cv_irix_exported_symbol],
937+ [save_LDFLAGS="$LDFLAGS"
938+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
939+ AC_LINK_IFELSE(
940+ [AC_LANG_SOURCE(
941+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
942+ [C++], [[int foo (void) { return 0; }]],
943+ [Fortran 77], [[
944+ subroutine foo
945+ end]],
946+ [Fortran], [[
947+ subroutine foo
948+ end]])])],
949+ [lt_cv_irix_exported_symbol=yes],
950+ [lt_cv_irix_exported_symbol=no])
951+ LDFLAGS="$save_LDFLAGS"])
952+ if test "$lt_cv_irix_exported_symbol" = yes; then
953+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
954+ fi
955 else
956 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
957 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
958@@ -5013,7 +5343,7 @@ _LT_EOF
959 osf4* | osf5*) # as osf3* with the addition of -msym flag
960 if test "$GCC" = yes; then
961 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
962- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
963+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
965 else
966 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
967@@ -5032,9 +5362,9 @@ _LT_EOF
968 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
969 if test "$GCC" = yes; then
970 wlarc='${wl}'
971- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
972+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
973 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
974- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
975+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
976 else
977 case `$CC -V 2>&1` in
978 *"Compilers 5.0"*)
979@@ -5306,8 +5636,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
980 to runtime path list])
981 _LT_TAGDECL([], [link_all_deplibs], [0],
982 [Whether libtool must link a program against all its dependency libraries])
983-_LT_TAGDECL([], [fix_srcfile_path], [1],
984- [Fix the shell variable $srcfile for the compiler])
985 _LT_TAGDECL([], [always_export_symbols], [0],
986 [Set to "yes" if exported symbols are required])
987 _LT_TAGDECL([], [export_symbols_cmds], [2],
988@@ -5318,6 +5646,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
989 [Symbols that must always be exported])
990 _LT_TAGDECL([], [prelink_cmds], [2],
991 [Commands necessary for linking programs (against libraries) with templates])
992+_LT_TAGDECL([], [postlink_cmds], [2],
993+ [Commands necessary for finishing linking programs])
994 _LT_TAGDECL([], [file_list_spec], [1],
995 [Specify filename containing input files])
996 dnl FIXME: Not yet implemented
997@@ -5419,6 +5749,7 @@ CC="$lt_save_CC"
998 m4_defun([_LT_LANG_CXX_CONFIG],
999 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1000 m4_require([_LT_DECL_EGREP])dnl
1001+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
1002 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1003 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1004 (test "X$CXX" != "Xg++"))) ; then
1005@@ -5480,6 +5811,7 @@ if test "$_lt_caught_CXX_error" != yes;
1006
1007 # Allow CC to be a program name with arguments.
1008 lt_save_CC=$CC
1009+ lt_save_CFLAGS=$CFLAGS
1010 lt_save_LD=$LD
1011 lt_save_GCC=$GCC
1012 GCC=$GXX
1013@@ -5497,6 +5829,7 @@ if test "$_lt_caught_CXX_error" != yes;
1014 fi
1015 test -z "${LDCXX+set}" || LD=$LDCXX
1016 CC=${CXX-"c++"}
1017+ CFLAGS=$CXXFLAGS
1018 compiler=$CC
1019 _LT_TAGVAR(compiler, $1)=$CC
1020 _LT_CC_BASENAME([$compiler])
1021@@ -5518,8 +5851,8 @@ if test "$_lt_caught_CXX_error" != yes;
1022 # Check if GNU C++ uses GNU ld as the underlying linker, since the
1023 # archiving commands below assume that GNU ld is being used.
1024 if test "$with_gnu_ld" = yes; then
1025- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
1026- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1027+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
1028+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1029
1030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
1031 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
1032@@ -5660,7 +5993,7 @@ if test "$_lt_caught_CXX_error" != yes;
1033 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
1034 # Determine the default libpath from the value encoded in an empty
1035 # executable.
1036- _LT_SYS_MODULE_PATH_AIX
1037+ _LT_SYS_MODULE_PATH_AIX([$1])
1038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
1039
1040 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1041@@ -5672,7 +6005,7 @@ if test "$_lt_caught_CXX_error" != yes;
1042 else
1043 # Determine the default libpath from the value encoded in an
1044 # empty executable.
1045- _LT_SYS_MODULE_PATH_AIX
1046+ _LT_SYS_MODULE_PATH_AIX([$1])
1047 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
1048 # Warning - without using the other run time loading flags,
1049 # -berok will link without error, but may produce a broken library.
1050@@ -5714,29 +6047,75 @@ if test "$_lt_caught_CXX_error" != yes;
1051 ;;
1052
1053 cygwin* | mingw* | pw32* | cegcc*)
1054- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
1055- # as there is no search path for DLLs.
1056- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
1057- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
1058- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1059- _LT_TAGVAR(always_export_symbols, $1)=no
1060- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1061-
1062- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
1063- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1064- # If the export-symbols file already is a .def file (1st line
1065- # is EXPORTS), use it as is; otherwise, prepend...
1066- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
1067- cp $export_symbols $output_objdir/$soname.def;
1068- else
1069- echo EXPORTS > $output_objdir/$soname.def;
1070- cat $export_symbols >> $output_objdir/$soname.def;
1071- fi~
1072- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1073- else
1074- _LT_TAGVAR(ld_shlibs, $1)=no
1075- fi
1076- ;;
1077+ case $GXX,$cc_basename in
1078+ ,cl* | no,cl*)
1079+ # Native MSVC
1080+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1081+ # no search path for DLLs.
1082+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
1083+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1084+ _LT_TAGVAR(always_export_symbols, $1)=yes
1085+ _LT_TAGVAR(file_list_spec, $1)='@'
1086+ # Tell ltmain to make .lib files, not .a files.
1087+ libext=lib
1088+ # Tell ltmain to make .dll files, not .so files.
1089+ shrext_cmds=".dll"
1090+ # FIXME: Setting linknames here is a bad hack.
1091+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
1092+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
1093+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
1094+ else
1095+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
1096+ fi~
1097+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
1098+ linknames='
1099+ # The linker will not automatically build a static lib if we build a DLL.
1100+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
1101+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1102+ # Don't use ranlib
1103+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
1104+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
1105+ lt_tool_outputfile="@TOOL_OUTPUT@"~
1106+ case $lt_outputfile in
1107+ *.exe|*.EXE) ;;
1108+ *)
1109+ lt_outputfile="$lt_outputfile.exe"
1110+ lt_tool_outputfile="$lt_tool_outputfile.exe"
1111+ ;;
1112+ esac~
1113+ func_to_tool_file "$lt_outputfile"~
1114+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
1115+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
1116+ $RM "$lt_outputfile.manifest";
1117+ fi'
1118+ ;;
1119+ *)
1120+ # g++
1121+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
1122+ # as there is no search path for DLLs.
1123+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
1124+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
1125+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1126+ _LT_TAGVAR(always_export_symbols, $1)=no
1127+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1128+
1129+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
1130+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1131+ # If the export-symbols file already is a .def file (1st line
1132+ # is EXPORTS), use it as is; otherwise, prepend...
1133+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
1134+ cp $export_symbols $output_objdir/$soname.def;
1135+ else
1136+ echo EXPORTS > $output_objdir/$soname.def;
1137+ cat $export_symbols >> $output_objdir/$soname.def;
1138+ fi~
1139+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1140+ else
1141+ _LT_TAGVAR(ld_shlibs, $1)=no
1142+ fi
1143+ ;;
1144+ esac
1145+ ;;
1146 darwin* | rhapsody*)
1147 _LT_DARWIN_LINKER_FEATURES($1)
1148 ;;
1149@@ -5811,7 +6190,7 @@ if test "$_lt_caught_CXX_error" != yes;
1150 ;;
1151 *)
1152 if test "$GXX" = yes; then
1153- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
1154+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
1155 else
1156 # FIXME: insert proper C++ library support
1157 _LT_TAGVAR(ld_shlibs, $1)=no
1158@@ -5882,10 +6261,10 @@ if test "$_lt_caught_CXX_error" != yes;
1159 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1160 ;;
1161 ia64*)
1162- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1163+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1164 ;;
1165 *)
1166- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1167+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1168 ;;
1169 esac
1170 fi
1171@@ -5926,9 +6305,9 @@ if test "$_lt_caught_CXX_error" != yes;
1172 *)
1173 if test "$GXX" = yes; then
1174 if test "$with_gnu_ld" = no; then
1175- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1176+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1177 else
1178- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
1179+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
1180 fi
1181 fi
1182 _LT_TAGVAR(link_all_deplibs, $1)=yes
1183@@ -5998,20 +6377,20 @@ if test "$_lt_caught_CXX_error" != yes;
1184 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
1185 rm -rf $tpldir~
1186 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
1187- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
1188+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
1189 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
1190 rm -rf $tpldir~
1191 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
1192- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
1193+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
1194 $RANLIB $oldlib'
1195 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
1196 rm -rf $tpldir~
1197 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
1198- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
1199+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
1200 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
1201 rm -rf $tpldir~
1202 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
1203- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
1204+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
1205 ;;
1206 *) # Version 6 and above use weak symbols
1207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
1208@@ -6206,7 +6585,7 @@ if test "$_lt_caught_CXX_error" != yes;
1209 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1210 ;;
1211 *)
1212- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1213+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1214 ;;
1215 esac
1216
1217@@ -6252,7 +6631,7 @@ if test "$_lt_caught_CXX_error" != yes;
1218
1219 solaris*)
1220 case $cc_basename in
1221- CC*)
1222+ CC* | sunCC*)
1223 # Sun C++ 4.2, 5.x and Centerline C++
1224 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
1225 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
1226@@ -6293,9 +6672,9 @@ if test "$_lt_caught_CXX_error" != yes;
1227 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
1228 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
1229 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
1230- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
1231+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
1232 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
1233- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
1234+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
1235
1236 # Commands to make compiler produce verbose output that lists
1237 # what "hidden" libraries, object files and flags are used when
1238@@ -6424,6 +6803,7 @@ if test "$_lt_caught_CXX_error" != yes;
1239 fi # test -n "$compiler"
1240
1241 CC=$lt_save_CC
1242+ CFLAGS=$lt_save_CFLAGS
1243 LDCXX=$LD
1244 LD=$lt_save_LD
1245 GCC=$lt_save_GCC
1246@@ -6438,6 +6818,29 @@ AC_LANG_POP
1247 ])# _LT_LANG_CXX_CONFIG
1248
1249
1250+# _LT_FUNC_STRIPNAME_CNF
1251+# ----------------------
1252+# func_stripname_cnf prefix suffix name
1253+# strip PREFIX and SUFFIX off of NAME.
1254+# PREFIX and SUFFIX must not contain globbing or regex special
1255+# characters, hashes, percent signs, but SUFFIX may contain a leading
1256+# dot (in which case that matches only a dot).
1257+#
1258+# This function is identical to the (non-XSI) version of func_stripname,
1259+# except this one can be used by m4 code that may be executed by configure,
1260+# rather than the libtool script.
1261+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
1262+AC_REQUIRE([_LT_DECL_SED])
1263+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
1264+func_stripname_cnf ()
1265+{
1266+ case ${2} in
1267+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
1268+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
1269+ esac
1270+} # func_stripname_cnf
1271+])# _LT_FUNC_STRIPNAME_CNF
1272+
1273 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
1274 # ---------------------------------
1275 # Figure out "hidden" library dependencies from verbose
1276@@ -6446,6 +6849,7 @@ AC_LANG_POP
1277 # objects, libraries and library flags.
1278 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
1279 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1280+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
1281 # Dependencies to place before and after the object being linked:
1282 _LT_TAGVAR(predep_objects, $1)=
1283 _LT_TAGVAR(postdep_objects, $1)=
1284@@ -6496,6 +6900,13 @@ public class foo {
1285 };
1286 _LT_EOF
1287 ])
1288+
1289+_lt_libdeps_save_CFLAGS=$CFLAGS
1290+case "$CC $CFLAGS " in #(
1291+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
1292+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
1293+esac
1294+
1295 dnl Parse the compiler output and extract the necessary
1296 dnl objects, libraries and library flags.
1297 if AC_TRY_EVAL(ac_compile); then
1298@@ -6507,7 +6918,7 @@ if AC_TRY_EVAL(ac_compile); then
1299 pre_test_object_deps_done=no
1300
1301 for p in `eval "$output_verbose_link_cmd"`; do
1302- case $p in
1303+ case ${prev}${p} in
1304
1305 -L* | -R* | -l*)
1306 # Some compilers place space between "-{L,R}" and the path.
1307@@ -6516,13 +6927,22 @@ if AC_TRY_EVAL(ac_compile); then
1308 test $p = "-R"; then
1309 prev=$p
1310 continue
1311- else
1312- prev=
1313 fi
1314
1315+ # Expand the sysroot to ease extracting the directories later.
1316+ if test -z "$prev"; then
1317+ case $p in
1318+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
1319+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
1320+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
1321+ esac
1322+ fi
1323+ case $p in
1324+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
1325+ esac
1326 if test "$pre_test_object_deps_done" = no; then
1327- case $p in
1328- -L* | -R*)
1329+ case ${prev} in
1330+ -L | -R)
1331 # Internal compiler library paths should come after those
1332 # provided the user. The postdeps already come after the
1333 # user supplied libs so there is no need to process them.
1334@@ -6542,8 +6962,10 @@ if AC_TRY_EVAL(ac_compile); then
1335 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
1336 fi
1337 fi
1338+ prev=
1339 ;;
1340
1341+ *.lto.$objext) ;; # Ignore GCC LTO objects
1342 *.$objext)
1343 # This assumes that the test object file only shows up
1344 # once in the compiler output.
1345@@ -6579,6 +7001,7 @@ else
1346 fi
1347
1348 $RM -f confest.$objext
1349+CFLAGS=$_lt_libdeps_save_CFLAGS
1350
1351 # PORTME: override above test on systems where it is broken
1352 m4_if([$1], [CXX],
1353@@ -6615,7 +7038,7 @@ linux*)
1354
1355 solaris*)
1356 case $cc_basename in
1357- CC*)
1358+ CC* | sunCC*)
1359 # The more standards-conforming stlport4 library is
1360 # incompatible with the Cstd library. Avoid specifying
1361 # it if it's in CXXFLAGS. Ignore libCrun as
1362@@ -6728,7 +7151,9 @@ if test "$_lt_disable_F77" != yes; then
1363 # Allow CC to be a program name with arguments.
1364 lt_save_CC="$CC"
1365 lt_save_GCC=$GCC
1366+ lt_save_CFLAGS=$CFLAGS
1367 CC=${F77-"f77"}
1368+ CFLAGS=$FFLAGS
1369 compiler=$CC
1370 _LT_TAGVAR(compiler, $1)=$CC
1371 _LT_CC_BASENAME([$compiler])
1372@@ -6782,6 +7207,7 @@ if test "$_lt_disable_F77" != yes; then
1373
1374 GCC=$lt_save_GCC
1375 CC="$lt_save_CC"
1376+ CFLAGS="$lt_save_CFLAGS"
1377 fi # test "$_lt_disable_F77" != yes
1378
1379 AC_LANG_POP
1380@@ -6858,7 +7284,9 @@ if test "$_lt_disable_FC" != yes; then
1381 # Allow CC to be a program name with arguments.
1382 lt_save_CC="$CC"
1383 lt_save_GCC=$GCC
1384+ lt_save_CFLAGS=$CFLAGS
1385 CC=${FC-"f95"}
1386+ CFLAGS=$FCFLAGS
1387 compiler=$CC
1388 GCC=$ac_cv_fc_compiler_gnu
1389
1390@@ -6914,7 +7342,8 @@ if test "$_lt_disable_FC" != yes; then
1391 fi # test -n "$compiler"
1392
1393 GCC=$lt_save_GCC
1394- CC="$lt_save_CC"
1395+ CC=$lt_save_CC
1396+ CFLAGS=$lt_save_CFLAGS
1397 fi # test "$_lt_disable_FC" != yes
1398
1399 AC_LANG_POP
1400@@ -6951,10 +7380,12 @@ _LT_COMPILER_BOILERPLATE
1401 _LT_LINKER_BOILERPLATE
1402
1403 # Allow CC to be a program name with arguments.
1404-lt_save_CC="$CC"
1405+lt_save_CC=$CC
1406+lt_save_CFLAGS=$CFLAGS
1407 lt_save_GCC=$GCC
1408 GCC=yes
1409 CC=${GCJ-"gcj"}
1410+CFLAGS=$GCJFLAGS
1411 compiler=$CC
1412 _LT_TAGVAR(compiler, $1)=$CC
1413 _LT_TAGVAR(LD, $1)="$LD"
1414@@ -6985,7 +7416,8 @@ fi
1415 AC_LANG_RESTORE
1416
1417 GCC=$lt_save_GCC
1418-CC="$lt_save_CC"
1419+CC=$lt_save_CC
1420+CFLAGS=$lt_save_CFLAGS
1421 ])# _LT_LANG_GCJ_CONFIG
1422
1423
1424@@ -7020,9 +7452,11 @@ _LT_LINKER_BOILERPLATE
1425
1426 # Allow CC to be a program name with arguments.
1427 lt_save_CC="$CC"
1428+lt_save_CFLAGS=$CFLAGS
1429 lt_save_GCC=$GCC
1430 GCC=
1431 CC=${RC-"windres"}
1432+CFLAGS=
1433 compiler=$CC
1434 _LT_TAGVAR(compiler, $1)=$CC
1435 _LT_CC_BASENAME([$compiler])
1436@@ -7035,7 +7469,8 @@ fi
1437
1438 GCC=$lt_save_GCC
1439 AC_LANG_RESTORE
1440-CC="$lt_save_CC"
1441+CC=$lt_save_CC
1442+CFLAGS=$lt_save_CFLAGS
1443 ])# _LT_LANG_RC_CONFIG
1444
1445
1446@@ -7094,6 +7529,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object
1447 AC_SUBST([OBJDUMP])
1448 ])
1449
1450+# _LT_DECL_DLLTOOL
1451+# ----------------
1452+# Ensure DLLTOOL variable is set.
1453+m4_defun([_LT_DECL_DLLTOOL],
1454+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1455+test -z "$DLLTOOL" && DLLTOOL=dlltool
1456+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
1457+AC_SUBST([DLLTOOL])
1458+])
1459
1460 # _LT_DECL_SED
1461 # ------------
1462@@ -7187,8 +7631,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES],
1463 # Try some XSI features
1464 xsi_shell=no
1465 ( _lt_dummy="a/b/c"
1466- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
1467- = c,a/b,, \
1468+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
1469+ = c,a/b,b/c, \
1470 && eval 'test $(( 1 + 1 )) -eq 2 \
1471 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
1472 && xsi_shell=yes
1473@@ -7227,206 +7671,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn
1474 ])# _LT_CHECK_SHELL_FEATURES
1475
1476
1477-# _LT_PROG_XSI_SHELLFNS
1478-# ---------------------
1479-# Bourne and XSI compatible variants of some useful shell functions.
1480-m4_defun([_LT_PROG_XSI_SHELLFNS],
1481-[case $xsi_shell in
1482- yes)
1483- cat << \_LT_EOF >> "$cfgfile"
1484-
1485-# func_dirname file append nondir_replacement
1486-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
1487-# otherwise set result to NONDIR_REPLACEMENT.
1488-func_dirname ()
1489-{
1490- case ${1} in
1491- */*) func_dirname_result="${1%/*}${2}" ;;
1492- * ) func_dirname_result="${3}" ;;
1493- esac
1494-}
1495-
1496-# func_basename file
1497-func_basename ()
1498-{
1499- func_basename_result="${1##*/}"
1500-}
1501-
1502-# func_dirname_and_basename file append nondir_replacement
1503-# perform func_basename and func_dirname in a single function
1504-# call:
1505-# dirname: Compute the dirname of FILE. If nonempty,
1506-# add APPEND to the result, otherwise set result
1507-# to NONDIR_REPLACEMENT.
1508-# value returned in "$func_dirname_result"
1509-# basename: Compute filename of FILE.
1510-# value retuned in "$func_basename_result"
1511-# Implementation must be kept synchronized with func_dirname
1512-# and func_basename. For efficiency, we do not delegate to
1513-# those functions but instead duplicate the functionality here.
1514-func_dirname_and_basename ()
1515-{
1516- case ${1} in
1517- */*) func_dirname_result="${1%/*}${2}" ;;
1518- * ) func_dirname_result="${3}" ;;
1519- esac
1520- func_basename_result="${1##*/}"
1521-}
1522-
1523-# func_stripname prefix suffix name
1524-# strip PREFIX and SUFFIX off of NAME.
1525-# PREFIX and SUFFIX must not contain globbing or regex special
1526-# characters, hashes, percent signs, but SUFFIX may contain a leading
1527-# dot (in which case that matches only a dot).
1528-func_stripname ()
1529-{
1530- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1531- # positional parameters, so assign one to ordinary parameter first.
1532- func_stripname_result=${3}
1533- func_stripname_result=${func_stripname_result#"${1}"}
1534- func_stripname_result=${func_stripname_result%"${2}"}
1535-}
1536-
1537-# func_opt_split
1538-func_opt_split ()
1539-{
1540- func_opt_split_opt=${1%%=*}
1541- func_opt_split_arg=${1#*=}
1542-}
1543-
1544-# func_lo2o object
1545-func_lo2o ()
1546-{
1547- case ${1} in
1548- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
1549- *) func_lo2o_result=${1} ;;
1550- esac
1551-}
1552-
1553-# func_xform libobj-or-source
1554-func_xform ()
1555-{
1556- func_xform_result=${1%.*}.lo
1557-}
1558-
1559-# func_arith arithmetic-term...
1560-func_arith ()
1561-{
1562- func_arith_result=$(( $[*] ))
1563-}
1564-
1565-# func_len string
1566-# STRING may not start with a hyphen.
1567-func_len ()
1568-{
1569- func_len_result=${#1}
1570-}
1571-
1572-_LT_EOF
1573- ;;
1574- *) # Bourne compatible functions.
1575- cat << \_LT_EOF >> "$cfgfile"
1576-
1577-# func_dirname file append nondir_replacement
1578-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
1579-# otherwise set result to NONDIR_REPLACEMENT.
1580-func_dirname ()
1581-{
1582- # Extract subdirectory from the argument.
1583- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
1584- if test "X$func_dirname_result" = "X${1}"; then
1585- func_dirname_result="${3}"
1586- else
1587- func_dirname_result="$func_dirname_result${2}"
1588- fi
1589-}
1590-
1591-# func_basename file
1592-func_basename ()
1593-{
1594- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
1595-}
1596+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
1597+# ------------------------------------------------------
1598+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
1599+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
1600+m4_defun([_LT_PROG_FUNCTION_REPLACE],
1601+[dnl {
1602+sed -e '/^$1 ()$/,/^} # $1 /c\
1603+$1 ()\
1604+{\
1605+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
1606+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
1607+ && mv -f "$cfgfile.tmp" "$cfgfile" \
1608+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
1609+test 0 -eq $? || _lt_function_replace_fail=:
1610+])
1611
1612-dnl func_dirname_and_basename
1613-dnl A portable version of this function is already defined in general.m4sh
1614-dnl so there is no need for it here.
1615
1616-# func_stripname prefix suffix name
1617-# strip PREFIX and SUFFIX off of NAME.
1618-# PREFIX and SUFFIX must not contain globbing or regex special
1619-# characters, hashes, percent signs, but SUFFIX may contain a leading
1620-# dot (in which case that matches only a dot).
1621-# func_strip_suffix prefix name
1622-func_stripname ()
1623-{
1624- case ${2} in
1625- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
1626- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
1627- esac
1628-}
1629+# _LT_PROG_REPLACE_SHELLFNS
1630+# -------------------------
1631+# Replace existing portable implementations of several shell functions with
1632+# equivalent extended shell implementations where those features are available..
1633+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
1634+[if test x"$xsi_shell" = xyes; then
1635+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
1636+ case ${1} in
1637+ */*) func_dirname_result="${1%/*}${2}" ;;
1638+ * ) func_dirname_result="${3}" ;;
1639+ esac])
1640+
1641+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
1642+ func_basename_result="${1##*/}"])
1643+
1644+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
1645+ case ${1} in
1646+ */*) func_dirname_result="${1%/*}${2}" ;;
1647+ * ) func_dirname_result="${3}" ;;
1648+ esac
1649+ func_basename_result="${1##*/}"])
1650
1651-# sed scripts:
1652-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
1653-my_sed_long_arg='1s/^-[[^=]]*=//'
1654+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
1655+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1656+ # positional parameters, so assign one to ordinary parameter first.
1657+ func_stripname_result=${3}
1658+ func_stripname_result=${func_stripname_result#"${1}"}
1659+ func_stripname_result=${func_stripname_result%"${2}"}])
1660+
1661+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
1662+ func_split_long_opt_name=${1%%=*}
1663+ func_split_long_opt_arg=${1#*=}])
1664+
1665+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
1666+ func_split_short_opt_arg=${1#??}
1667+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
1668+
1669+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
1670+ case ${1} in
1671+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
1672+ *) func_lo2o_result=${1} ;;
1673+ esac])
1674
1675-# func_opt_split
1676-func_opt_split ()
1677-{
1678- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
1679- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
1680-}
1681+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
1682
1683-# func_lo2o object
1684-func_lo2o ()
1685-{
1686- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
1687-}
1688+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
1689
1690-# func_xform libobj-or-source
1691-func_xform ()
1692-{
1693- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
1694-}
1695+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
1696+fi
1697
1698-# func_arith arithmetic-term...
1699-func_arith ()
1700-{
1701- func_arith_result=`expr "$[@]"`
1702-}
1703+if test x"$lt_shell_append" = xyes; then
1704+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
1705
1706-# func_len string
1707-# STRING may not start with a hyphen.
1708-func_len ()
1709-{
1710- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
1711-}
1712+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
1713+ func_quote_for_eval "${2}"
1714+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
1715+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
1716+
1717+ # Save a `func_append' function call where possible by direct use of '+='
1718+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
1719+ && mv -f "$cfgfile.tmp" "$cfgfile" \
1720+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
1721+ test 0 -eq $? || _lt_function_replace_fail=:
1722+else
1723+ # Save a `func_append' function call even when '+=' is not available
1724+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
1725+ && mv -f "$cfgfile.tmp" "$cfgfile" \
1726+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
1727+ test 0 -eq $? || _lt_function_replace_fail=:
1728+fi
1729
1730-_LT_EOF
1731-esac
1732+if test x"$_lt_function_replace_fail" = x":"; then
1733+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
1734+fi
1735+])
1736
1737-case $lt_shell_append in
1738- yes)
1739- cat << \_LT_EOF >> "$cfgfile"
1740-
1741-# func_append var value
1742-# Append VALUE to the end of shell variable VAR.
1743-func_append ()
1744-{
1745- eval "$[1]+=\$[2]"
1746-}
1747-_LT_EOF
1748+# _LT_PATH_CONVERSION_FUNCTIONS
1749+# -----------------------------
1750+# Determine which file name conversion functions should be used by
1751+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
1752+# for certain cross-compile configurations and native mingw.
1753+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
1754+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1755+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1756+AC_MSG_CHECKING([how to convert $build file names to $host format])
1757+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
1758+[case $host in
1759+ *-*-mingw* )
1760+ case $build in
1761+ *-*-mingw* ) # actually msys
1762+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
1763+ ;;
1764+ *-*-cygwin* )
1765+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
1766+ ;;
1767+ * ) # otherwise, assume *nix
1768+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
1769+ ;;
1770+ esac
1771 ;;
1772- *)
1773- cat << \_LT_EOF >> "$cfgfile"
1774-
1775-# func_append var value
1776-# Append VALUE to the end of shell variable VAR.
1777-func_append ()
1778-{
1779- eval "$[1]=\$$[1]\$[2]"
1780-}
1781-
1782-_LT_EOF
1783+ *-*-cygwin* )
1784+ case $build in
1785+ *-*-mingw* ) # actually msys
1786+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
1787+ ;;
1788+ *-*-cygwin* )
1789+ lt_cv_to_host_file_cmd=func_convert_file_noop
1790+ ;;
1791+ * ) # otherwise, assume *nix
1792+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
1793+ ;;
1794+ esac
1795 ;;
1796- esac
1797+ * ) # unhandled hosts (and "normal" native builds)
1798+ lt_cv_to_host_file_cmd=func_convert_file_noop
1799+ ;;
1800+esac
1801+])
1802+to_host_file_cmd=$lt_cv_to_host_file_cmd
1803+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
1804+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
1805+ [0], [convert $build file names to $host format])dnl
1806+
1807+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
1808+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
1809+[#assume ordinary cross tools, or native build.
1810+lt_cv_to_tool_file_cmd=func_convert_file_noop
1811+case $host in
1812+ *-*-mingw* )
1813+ case $build in
1814+ *-*-mingw* ) # actually msys
1815+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
1816+ ;;
1817+ esac
1818+ ;;
1819+esac
1820 ])
1821+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
1822+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
1823+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
1824+ [0], [convert $build files to toolchain format])dnl
1825+])# _LT_PATH_CONVERSION_FUNCTIONS
1826Index: binutils-2.21.1/ltmain.sh
1827===================================================================
1828--- binutils-2.21.1.orig/ltmain.sh
1829+++ binutils-2.21.1/ltmain.sh
1830@@ -1,10 +1,9 @@
1831-# Generated from ltmain.m4sh.
1832
1833-# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
1834+# libtool (GNU libtool) 2.4
1835 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1836
1837 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
1838-# 2007, 2008, 2009 Free Software Foundation, Inc.
1839+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
1840 # This is free software; see the source for copying conditions. There is NO
1841 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1842
1843@@ -38,7 +37,6 @@
1844 # -n, --dry-run display commands without modifying any files
1845 # --features display basic configuration information and exit
1846 # --mode=MODE use operation mode MODE
1847-# --no-finish let install mode avoid finish commands
1848 # --preserve-dup-deps don't remove duplicate dependency libraries
1849 # --quiet, --silent don't print informational messages
1850 # --no-quiet, --no-silent
1851@@ -71,17 +69,19 @@
1852 # compiler: $LTCC
1853 # compiler flags: $LTCFLAGS
1854 # linker: $LD (gnu? $with_gnu_ld)
1855-# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a
1856+# $progname: (GNU libtool) 2.4
1857 # automake: $automake_version
1858 # autoconf: $autoconf_version
1859 #
1860 # Report bugs to <bug-libtool@gnu.org>.
1861+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
1862+# General help using GNU software: <http://www.gnu.org/gethelp/>.
1863
1864 PROGRAM=libtool
1865 PACKAGE=libtool
1866-VERSION=2.2.7a
1867-TIMESTAMP=" 1.3134 2009-11-29"
1868-package_revision=1.3134
1869+VERSION=2.4
1870+TIMESTAMP=""
1871+package_revision=1.3293
1872
1873 # Be Bourne compatible
1874 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
1875@@ -106,9 +106,6 @@ _LTECHO_EOF'
1876 }
1877
1878 # NLS nuisances: We save the old values to restore during execute mode.
1879-# Only set LANG and LC_ALL to C if already set.
1880-# These must not be set unconditionally because not all systems understand
1881-# e.g. LANG=C (notably SCO).
1882 lt_user_locale=
1883 lt_safe_locale=
1884 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
1885@@ -121,15 +118,13 @@ do
1886 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
1887 fi"
1888 done
1889+LC_ALL=C
1890+LANGUAGE=C
1891+export LANGUAGE LC_ALL
1892
1893 $lt_unset CDPATH
1894
1895
1896-
1897-
1898-
1899-
1900-
1901 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
1902 # is ksh but when the shell is invoked as "sh" and the current value of
1903 # the _XPG environment variable is not equal to 1 (one), the special
1904@@ -140,7 +135,7 @@ progpath="$0"
1905
1906
1907 : ${CP="cp -f"}
1908-: ${ECHO=$as_echo}
1909+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
1910 : ${EGREP="/bin/grep -E"}
1911 : ${FGREP="/bin/grep -F"}
1912 : ${GREP="/bin/grep"}
1913@@ -149,7 +144,7 @@ progpath="$0"
1914 : ${MKDIR="mkdir"}
1915 : ${MV="mv -f"}
1916 : ${RM="rm -f"}
1917-: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"}
1918+: ${SED="/bin/sed"}
1919 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
1920 : ${Xsed="$SED -e 1s/^X//"}
1921
1922@@ -169,6 +164,27 @@ IFS=" $lt_nl"
1923 dirname="s,/[^/]*$,,"
1924 basename="s,^.*/,,"
1925
1926+# func_dirname file append nondir_replacement
1927+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
1928+# otherwise set result to NONDIR_REPLACEMENT.
1929+func_dirname ()
1930+{
1931+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
1932+ if test "X$func_dirname_result" = "X${1}"; then
1933+ func_dirname_result="${3}"
1934+ else
1935+ func_dirname_result="$func_dirname_result${2}"
1936+ fi
1937+} # func_dirname may be replaced by extended shell implementation
1938+
1939+
1940+# func_basename file
1941+func_basename ()
1942+{
1943+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
1944+} # func_basename may be replaced by extended shell implementation
1945+
1946+
1947 # func_dirname_and_basename file append nondir_replacement
1948 # perform func_basename and func_dirname in a single function
1949 # call:
1950@@ -183,17 +199,31 @@ basename="s,^.*/,,"
1951 # those functions but instead duplicate the functionality here.
1952 func_dirname_and_basename ()
1953 {
1954- # Extract subdirectory from the argument.
1955- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
1956- if test "X$func_dirname_result" = "X${1}"; then
1957- func_dirname_result="${3}"
1958- else
1959- func_dirname_result="$func_dirname_result${2}"
1960- fi
1961- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
1962-}
1963+ # Extract subdirectory from the argument.
1964+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
1965+ if test "X$func_dirname_result" = "X${1}"; then
1966+ func_dirname_result="${3}"
1967+ else
1968+ func_dirname_result="$func_dirname_result${2}"
1969+ fi
1970+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
1971+} # func_dirname_and_basename may be replaced by extended shell implementation
1972+
1973+
1974+# func_stripname prefix suffix name
1975+# strip PREFIX and SUFFIX off of NAME.
1976+# PREFIX and SUFFIX must not contain globbing or regex special
1977+# characters, hashes, percent signs, but SUFFIX may contain a leading
1978+# dot (in which case that matches only a dot).
1979+# func_strip_suffix prefix name
1980+func_stripname ()
1981+{
1982+ case ${2} in
1983+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
1984+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
1985+ esac
1986+} # func_stripname may be replaced by extended shell implementation
1987
1988-# Generated shell functions inserted here.
1989
1990 # These SED scripts presuppose an absolute path with a trailing slash.
1991 pathcar='s,^/\([^/]*\).*$,\1,'
1992@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
1993 # Same as above, but do not quote variable references.
1994 double_quote_subst='s/\(["`\\]\)/\\\1/g'
1995
1996+# Sed substitution that turns a string into a regex matching for the
1997+# string literally.
1998+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
1999+
2000+# Sed substitution that converts a w32 file name or path
2001+# which contains forward slashes, into one that contains
2002+# (escaped) backslashes. A very naive implementation.
2003+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2004+
2005 # Re-`\' parameter expansions in output of double_quote_subst that were
2006 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
2007 # in input to double_quote_subst, that '$' was protected from expansion.
2008@@ -404,7 +443,7 @@ opt_warning=:
2009 # name if it has been set yet.
2010 func_echo ()
2011 {
2012- $ECHO "$progname${mode+: }$mode: $*"
2013+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
2014 }
2015
2016 # func_verbose arg...
2017@@ -430,14 +469,14 @@ func_echo_all ()
2018 # Echo program name prefixed message to standard error.
2019 func_error ()
2020 {
2021- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
2022+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
2023 }
2024
2025 # func_warning arg...
2026 # Echo program name prefixed warning message to standard error.
2027 func_warning ()
2028 {
2029- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
2030+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
2031
2032 # bash bug again:
2033 :
2034@@ -656,19 +695,35 @@ func_show_eval_locale ()
2035 fi
2036 }
2037
2038-
2039-
2040+# func_tr_sh
2041+# Turn $1 into a string suitable for a shell variable name.
2042+# Result is stored in $func_tr_sh_result. All characters
2043+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
2044+# if $1 begins with a digit, a '_' is prepended as well.
2045+func_tr_sh ()
2046+{
2047+ case $1 in
2048+ [0-9]* | *[!a-zA-Z0-9_]*)
2049+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
2050+ ;;
2051+ * )
2052+ func_tr_sh_result=$1
2053+ ;;
2054+ esac
2055+}
2056
2057
2058 # func_version
2059 # Echo version message to standard output and exit.
2060 func_version ()
2061 {
2062+ $opt_debug
2063+
2064 $SED -n '/(C)/!b go
2065 :more
2066 /\./!{
2067 N
2068- s/\n# //
2069+ s/\n# / /
2070 b more
2071 }
2072 :go
2073@@ -685,7 +740,9 @@ func_version ()
2074 # Echo short help message to standard output and exit.
2075 func_usage ()
2076 {
2077- $SED -n '/^# Usage:/,/^# *-h/ {
2078+ $opt_debug
2079+
2080+ $SED -n '/^# Usage:/,/^# *.*--help/ {
2081 s/^# //
2082 s/^# *$//
2083 s/\$progname/'$progname'/
2084@@ -701,7 +758,10 @@ func_usage ()
2085 # unless 'noexit' is passed as argument.
2086 func_help ()
2087 {
2088+ $opt_debug
2089+
2090 $SED -n '/^# Usage:/,/# Report bugs to/ {
2091+ :print
2092 s/^# //
2093 s/^# *$//
2094 s*\$progname*'$progname'*
2095@@ -714,7 +774,11 @@ func_help ()
2096 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
2097 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
2098 p
2099- }' < "$progpath"
2100+ d
2101+ }
2102+ /^# .* home page:/b print
2103+ /^# General help using/b print
2104+ ' < "$progpath"
2105 ret=$?
2106 if test -z "$1"; then
2107 exit $ret
2108@@ -726,12 +790,39 @@ func_help ()
2109 # exit_cmd.
2110 func_missing_arg ()
2111 {
2112- func_error "missing argument for $1"
2113+ $opt_debug
2114+
2115+ func_error "missing argument for $1."
2116 exit_cmd=exit
2117 }
2118
2119-exit_cmd=:
2120
2121+# func_split_short_opt shortopt
2122+# Set func_split_short_opt_name and func_split_short_opt_arg shell
2123+# variables after splitting SHORTOPT after the 2nd character.
2124+func_split_short_opt ()
2125+{
2126+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
2127+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
2128+
2129+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
2130+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
2131+} # func_split_short_opt may be replaced by extended shell implementation
2132+
2133+
2134+# func_split_long_opt longopt
2135+# Set func_split_long_opt_name and func_split_long_opt_arg shell
2136+# variables after splitting LONGOPT at the `=' sign.
2137+func_split_long_opt ()
2138+{
2139+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
2140+ my_sed_long_arg='1s/^--[^=]*=//'
2141+
2142+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
2143+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
2144+} # func_split_long_opt may be replaced by extended shell implementation
2145+
2146+exit_cmd=:
2147
2148
2149
2150@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%"
2151 magic_exe="%%%MAGIC EXE variable%%%"
2152
2153 # Global variables.
2154-# $mode is unset
2155 nonopt=
2156-execute_dlfiles=
2157 preserve_args=
2158 lo2o="s/\\.lo\$/.${objext}/"
2159 o2lo="s/\\.${objext}\$/.lo/"
2160 extracted_archives=
2161 extracted_serial=0
2162
2163-opt_dry_run=false
2164-opt_finish=:
2165-opt_duplicate_deps=false
2166-opt_silent=false
2167-opt_debug=:
2168-
2169 # If this variable is set in any of the actions, the command in it
2170 # will be execed at the end. This prevents here-documents from being
2171 # left over by shells.
2172 exec_cmd=
2173
2174+# func_append var value
2175+# Append VALUE to the end of shell variable VAR.
2176+func_append ()
2177+{
2178+ eval "${1}=\$${1}\${2}"
2179+} # func_append may be replaced by extended shell implementation
2180+
2181+# func_append_quoted var value
2182+# Quote VALUE and append to the end of shell variable VAR, separated
2183+# by a space.
2184+func_append_quoted ()
2185+{
2186+ func_quote_for_eval "${2}"
2187+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
2188+} # func_append_quoted may be replaced by extended shell implementation
2189+
2190+
2191+# func_arith arithmetic-term...
2192+func_arith ()
2193+{
2194+ func_arith_result=`expr "${@}"`
2195+} # func_arith may be replaced by extended shell implementation
2196+
2197+
2198+# func_len string
2199+# STRING may not start with a hyphen.
2200+func_len ()
2201+{
2202+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
2203+} # func_len may be replaced by extended shell implementation
2204+
2205+
2206+# func_lo2o object
2207+func_lo2o ()
2208+{
2209+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
2210+} # func_lo2o may be replaced by extended shell implementation
2211+
2212+
2213+# func_xform libobj-or-source
2214+func_xform ()
2215+{
2216+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
2217+} # func_xform may be replaced by extended shell implementation
2218+
2219+
2220 # func_fatal_configuration arg...
2221 # Echo program name prefixed message to standard error, followed by
2222 # a configuration failure hint, and exit.
2223@@ -850,130 +979,204 @@ func_enable_tag ()
2224 esac
2225 }
2226
2227-# Parse options once, thoroughly. This comes as soon as possible in
2228-# the script to make things like `libtool --version' happen quickly.
2229+# func_check_version_match
2230+# Ensure that we are using m4 macros, and libtool script from the same
2231+# release of libtool.
2232+func_check_version_match ()
2233 {
2234+ if test "$package_revision" != "$macro_revision"; then
2235+ if test "$VERSION" != "$macro_version"; then
2236+ if test -z "$macro_version"; then
2237+ cat >&2 <<_LT_EOF
2238+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2239+$progname: definition of this LT_INIT comes from an older release.
2240+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2241+$progname: and run autoconf again.
2242+_LT_EOF
2243+ else
2244+ cat >&2 <<_LT_EOF
2245+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2246+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2247+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2248+$progname: and run autoconf again.
2249+_LT_EOF
2250+ fi
2251+ else
2252+ cat >&2 <<_LT_EOF
2253+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
2254+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
2255+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
2256+$progname: of $PACKAGE $VERSION and run autoconf again.
2257+_LT_EOF
2258+ fi
2259+
2260+ exit $EXIT_MISMATCH
2261+ fi
2262+}
2263+
2264+
2265+# Shorthand for --mode=foo, only valid as the first argument
2266+case $1 in
2267+clean|clea|cle|cl)
2268+ shift; set dummy --mode clean ${1+"$@"}; shift
2269+ ;;
2270+compile|compil|compi|comp|com|co|c)
2271+ shift; set dummy --mode compile ${1+"$@"}; shift
2272+ ;;
2273+execute|execut|execu|exec|exe|ex|e)
2274+ shift; set dummy --mode execute ${1+"$@"}; shift
2275+ ;;
2276+finish|finis|fini|fin|fi|f)
2277+ shift; set dummy --mode finish ${1+"$@"}; shift
2278+ ;;
2279+install|instal|insta|inst|ins|in|i)
2280+ shift; set dummy --mode install ${1+"$@"}; shift
2281+ ;;
2282+link|lin|li|l)
2283+ shift; set dummy --mode link ${1+"$@"}; shift
2284+ ;;
2285+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2286+ shift; set dummy --mode uninstall ${1+"$@"}; shift
2287+ ;;
2288+esac
2289
2290- # Shorthand for --mode=foo, only valid as the first argument
2291- case $1 in
2292- clean|clea|cle|cl)
2293- shift; set dummy --mode clean ${1+"$@"}; shift
2294- ;;
2295- compile|compil|compi|comp|com|co|c)
2296- shift; set dummy --mode compile ${1+"$@"}; shift
2297- ;;
2298- execute|execut|execu|exec|exe|ex|e)
2299- shift; set dummy --mode execute ${1+"$@"}; shift
2300- ;;
2301- finish|finis|fini|fin|fi|f)
2302- shift; set dummy --mode finish ${1+"$@"}; shift
2303- ;;
2304- install|instal|insta|inst|ins|in|i)
2305- shift; set dummy --mode install ${1+"$@"}; shift
2306- ;;
2307- link|lin|li|l)
2308- shift; set dummy --mode link ${1+"$@"}; shift
2309- ;;
2310- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2311- shift; set dummy --mode uninstall ${1+"$@"}; shift
2312- ;;
2313- esac
2314
2315- # Parse non-mode specific arguments:
2316- while test "$#" -gt 0; do
2317+
2318+# Option defaults:
2319+opt_debug=:
2320+opt_dry_run=false
2321+opt_config=false
2322+opt_preserve_dup_deps=false
2323+opt_features=false
2324+opt_finish=false
2325+opt_help=false
2326+opt_help_all=false
2327+opt_silent=:
2328+opt_verbose=:
2329+opt_silent=false
2330+opt_verbose=false
2331+
2332+
2333+# Parse options once, thoroughly. This comes as soon as possible in the
2334+# script to make things like `--version' happen as quickly as we can.
2335+{
2336+ # this just eases exit handling
2337+ while test $# -gt 0; do
2338 opt="$1"
2339 shift
2340-
2341 case $opt in
2342- --config) func_config ;;
2343-
2344- --debug) preserve_args="$preserve_args $opt"
2345+ --debug|-x) opt_debug='set -x'
2346 func_echo "enabling shell trace mode"
2347- opt_debug='set -x'
2348 $opt_debug
2349 ;;
2350-
2351- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
2352- execute_dlfiles="$execute_dlfiles $1"
2353- shift
2354+ --dry-run|--dryrun|-n)
2355+ opt_dry_run=:
2356 ;;
2357-
2358- --dry-run | -n) opt_dry_run=: ;;
2359- --features) func_features ;;
2360- --finish) mode="finish" ;;
2361- --no-finish) opt_finish=false ;;
2362-
2363- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
2364- case $1 in
2365- # Valid mode arguments:
2366- clean) ;;
2367- compile) ;;
2368- execute) ;;
2369- finish) ;;
2370- install) ;;
2371- link) ;;
2372- relink) ;;
2373- uninstall) ;;
2374-
2375- # Catch anything else as an error
2376- *) func_error "invalid argument for $opt"
2377- exit_cmd=exit
2378- break
2379- ;;
2380- esac
2381-
2382- mode="$1"
2383+ --config)
2384+ opt_config=:
2385+func_config
2386+ ;;
2387+ --dlopen|-dlopen)
2388+ optarg="$1"
2389+ opt_dlopen="${opt_dlopen+$opt_dlopen
2390+}$optarg"
2391 shift
2392 ;;
2393-
2394 --preserve-dup-deps)
2395- opt_duplicate_deps=: ;;
2396-
2397- --quiet|--silent) preserve_args="$preserve_args $opt"
2398- opt_silent=:
2399- opt_verbose=false
2400+ opt_preserve_dup_deps=:
2401 ;;
2402-
2403- --no-quiet|--no-silent)
2404- preserve_args="$preserve_args $opt"
2405- opt_silent=false
2406+ --features)
2407+ opt_features=:
2408+func_features
2409 ;;
2410-
2411- --verbose| -v) preserve_args="$preserve_args $opt"
2412+ --finish)
2413+ opt_finish=:
2414+set dummy --mode finish ${1+"$@"}; shift
2415+ ;;
2416+ --help)
2417+ opt_help=:
2418+ ;;
2419+ --help-all)
2420+ opt_help_all=:
2421+opt_help=': help-all'
2422+ ;;
2423+ --mode)
2424+ test $# = 0 && func_missing_arg $opt && break
2425+ optarg="$1"
2426+ opt_mode="$optarg"
2427+case $optarg in
2428+ # Valid mode arguments:
2429+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
2430+
2431+ # Catch anything else as an error
2432+ *) func_error "invalid argument for $opt"
2433+ exit_cmd=exit
2434+ break
2435+ ;;
2436+esac
2437+ shift
2438+ ;;
2439+ --no-silent|--no-quiet)
2440 opt_silent=false
2441- opt_verbose=:
2442+func_append preserve_args " $opt"
2443 ;;
2444-
2445- --no-verbose) preserve_args="$preserve_args $opt"
2446+ --no-verbose)
2447 opt_verbose=false
2448+func_append preserve_args " $opt"
2449 ;;
2450-
2451- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
2452- preserve_args="$preserve_args $opt $1"
2453- func_enable_tag "$1" # tagname is set here
2454+ --silent|--quiet)
2455+ opt_silent=:
2456+func_append preserve_args " $opt"
2457+ opt_verbose=false
2458+ ;;
2459+ --verbose|-v)
2460+ opt_verbose=:
2461+func_append preserve_args " $opt"
2462+opt_silent=false
2463+ ;;
2464+ --tag)
2465+ test $# = 0 && func_missing_arg $opt && break
2466+ optarg="$1"
2467+ opt_tag="$optarg"
2468+func_append preserve_args " $opt $optarg"
2469+func_enable_tag "$optarg"
2470 shift
2471 ;;
2472
2473+ -\?|-h) func_usage ;;
2474+ --help) func_help ;;
2475+ --version) func_version ;;
2476+
2477 # Separate optargs to long options:
2478- -dlopen=*|--mode=*|--tag=*)
2479- func_opt_split "$opt"
2480- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
2481+ --*=*)
2482+ func_split_long_opt "$opt"
2483+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
2484 shift
2485 ;;
2486
2487- -\?|-h) func_usage ;;
2488- --help) opt_help=: ;;
2489- --help-all) opt_help=': help-all' ;;
2490- --version) func_version ;;
2491-
2492- -*) func_fatal_help "unrecognized option \`$opt'" ;;
2493-
2494- *) nonopt="$opt"
2495- break
2496+ # Separate non-argument short options:
2497+ -\?*|-h*|-n*|-v*)
2498+ func_split_short_opt "$opt"
2499+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
2500+ shift
2501 ;;
2502+
2503+ --) break ;;
2504+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
2505+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
2506 esac
2507 done
2508
2509+ # Validate options:
2510+
2511+ # save first non-option argument
2512+ if test "$#" -gt 0; then
2513+ nonopt="$opt"
2514+ shift
2515+ fi
2516+
2517+ # preserve --debug
2518+ test "$opt_debug" = : || func_append preserve_args " --debug"
2519
2520 case $host in
2521 *cygwin* | *mingw* | *pw32* | *cegcc*)
2522@@ -981,82 +1184,44 @@ func_enable_tag ()
2523 opt_duplicate_compiler_generated_deps=:
2524 ;;
2525 *)
2526- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
2527+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2528 ;;
2529 esac
2530
2531- # Having warned about all mis-specified options, bail out if
2532- # anything was wrong.
2533- $exit_cmd $EXIT_FAILURE
2534-}
2535+ $opt_help || {
2536+ # Sanity checks first:
2537+ func_check_version_match
2538
2539-# func_check_version_match
2540-# Ensure that we are using m4 macros, and libtool script from the same
2541-# release of libtool.
2542-func_check_version_match ()
2543-{
2544- if test "$package_revision" != "$macro_revision"; then
2545- if test "$VERSION" != "$macro_version"; then
2546- if test -z "$macro_version"; then
2547- cat >&2 <<_LT_EOF
2548-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2549-$progname: definition of this LT_INIT comes from an older release.
2550-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2551-$progname: and run autoconf again.
2552-_LT_EOF
2553- else
2554- cat >&2 <<_LT_EOF
2555-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
2556-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2557-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2558-$progname: and run autoconf again.
2559-_LT_EOF
2560- fi
2561- else
2562- cat >&2 <<_LT_EOF
2563-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
2564-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
2565-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
2566-$progname: of $PACKAGE $VERSION and run autoconf again.
2567-_LT_EOF
2568+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2569+ func_fatal_configuration "not configured to build any kind of library"
2570 fi
2571
2572- exit $EXIT_MISMATCH
2573- fi
2574-}
2575-
2576+ # Darwin sucks
2577+ eval std_shrext=\"$shrext_cmds\"
2578
2579-## ----------- ##
2580-## Main. ##
2581-## ----------- ##
2582-
2583-$opt_help || {
2584- # Sanity checks first:
2585- func_check_version_match
2586-
2587- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2588- func_fatal_configuration "not configured to build any kind of library"
2589- fi
2590+ # Only execute mode is allowed to have -dlopen flags.
2591+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
2592+ func_error "unrecognized option \`-dlopen'"
2593+ $ECHO "$help" 1>&2
2594+ exit $EXIT_FAILURE
2595+ fi
2596
2597- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
2598+ # Change the help message to a mode-specific one.
2599+ generic_help="$help"
2600+ help="Try \`$progname --help --mode=$opt_mode' for more information."
2601+ }
2602
2603
2604- # Darwin sucks
2605- eval "std_shrext=\"$shrext_cmds\""
2606+ # Bail if the options were screwed
2607+ $exit_cmd $EXIT_FAILURE
2608+}
2609
2610
2611- # Only execute mode is allowed to have -dlopen flags.
2612- if test -n "$execute_dlfiles" && test "$mode" != execute; then
2613- func_error "unrecognized option \`-dlopen'"
2614- $ECHO "$help" 1>&2
2615- exit $EXIT_FAILURE
2616- fi
2617
2618- # Change the help message to a mode-specific one.
2619- generic_help="$help"
2620- help="Try \`$progname --help --mode=$mode' for more information."
2621-}
2622
2623+## ----------- ##
2624+## Main. ##
2625+## ----------- ##
2626
2627 # func_lalib_p file
2628 # True iff FILE is a libtool `.la' library or `.lo' object file.
2629@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p ()
2630 # temporary ltwrapper_script.
2631 func_ltwrapper_scriptname ()
2632 {
2633- func_ltwrapper_scriptname_result=""
2634- if func_ltwrapper_executable_p "$1"; then
2635- func_dirname_and_basename "$1" "" "."
2636- func_stripname '' '.exe' "$func_basename_result"
2637- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2638- fi
2639+ func_dirname_and_basename "$1" "" "."
2640+ func_stripname '' '.exe' "$func_basename_result"
2641+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2642 }
2643
2644 # func_ltwrapper_p file
2645@@ -1149,7 +1311,7 @@ func_execute_cmds ()
2646 save_ifs=$IFS; IFS='~'
2647 for cmd in $1; do
2648 IFS=$save_ifs
2649- eval "cmd=\"$cmd\""
2650+ eval cmd=\"$cmd\"
2651 func_show_eval "$cmd" "${2-:}"
2652 done
2653 IFS=$save_ifs
2654@@ -1172,6 +1334,37 @@ func_source ()
2655 }
2656
2657
2658+# func_resolve_sysroot PATH
2659+# Replace a leading = in PATH with a sysroot. Store the result into
2660+# func_resolve_sysroot_result
2661+func_resolve_sysroot ()
2662+{
2663+ func_resolve_sysroot_result=$1
2664+ case $func_resolve_sysroot_result in
2665+ =*)
2666+ func_stripname '=' '' "$func_resolve_sysroot_result"
2667+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2668+ ;;
2669+ esac
2670+}
2671+
2672+# func_replace_sysroot PATH
2673+# If PATH begins with the sysroot, replace it with = and
2674+# store the result into func_replace_sysroot_result.
2675+func_replace_sysroot ()
2676+{
2677+ case "$lt_sysroot:$1" in
2678+ ?*:"$lt_sysroot"*)
2679+ func_stripname "$lt_sysroot" '' "$1"
2680+ func_replace_sysroot_result="=$func_stripname_result"
2681+ ;;
2682+ *)
2683+ # Including no sysroot.
2684+ func_replace_sysroot_result=$1
2685+ ;;
2686+ esac
2687+}
2688+
2689 # func_infer_tag arg
2690 # Infer tagged configuration to use if any are available and
2691 # if one wasn't chosen via the "--tag" command line option.
2692@@ -1184,8 +1377,7 @@ func_infer_tag ()
2693 if test -n "$available_tags" && test -z "$tagname"; then
2694 CC_quoted=
2695 for arg in $CC; do
2696- func_quote_for_eval "$arg"
2697- CC_quoted="$CC_quoted $func_quote_for_eval_result"
2698+ func_append_quoted CC_quoted "$arg"
2699 done
2700 CC_expanded=`func_echo_all $CC`
2701 CC_quoted_expanded=`func_echo_all $CC_quoted`
2702@@ -1204,8 +1396,7 @@ func_infer_tag ()
2703 CC_quoted=
2704 for arg in $CC; do
2705 # Double-quote args containing other shell metacharacters.
2706- func_quote_for_eval "$arg"
2707- CC_quoted="$CC_quoted $func_quote_for_eval_result"
2708+ func_append_quoted CC_quoted "$arg"
2709 done
2710 CC_expanded=`func_echo_all $CC`
2711 CC_quoted_expanded=`func_echo_all $CC_quoted`
2712@@ -1274,6 +1465,486 @@ EOF
2713 }
2714 }
2715
2716+
2717+##################################################
2718+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2719+##################################################
2720+
2721+# func_convert_core_file_wine_to_w32 ARG
2722+# Helper function used by file name conversion functions when $build is *nix,
2723+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
2724+# correctly configured wine environment available, with the winepath program
2725+# in $build's $PATH.
2726+#
2727+# ARG is the $build file name to be converted to w32 format.
2728+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
2729+# be empty on error (or when ARG is empty)
2730+func_convert_core_file_wine_to_w32 ()
2731+{
2732+ $opt_debug
2733+ func_convert_core_file_wine_to_w32_result="$1"
2734+ if test -n "$1"; then
2735+ # Unfortunately, winepath does not exit with a non-zero error code, so we
2736+ # are forced to check the contents of stdout. On the other hand, if the
2737+ # command is not found, the shell will set an exit code of 127 and print
2738+ # *an error message* to stdout. So we must check for both error code of
2739+ # zero AND non-empty stdout, which explains the odd construction:
2740+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2741+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
2742+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2743+ $SED -e "$lt_sed_naive_backslashify"`
2744+ else
2745+ func_convert_core_file_wine_to_w32_result=
2746+ fi
2747+ fi
2748+}
2749+# end: func_convert_core_file_wine_to_w32
2750+
2751+
2752+# func_convert_core_path_wine_to_w32 ARG
2753+# Helper function used by path conversion functions when $build is *nix, and
2754+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2755+# configured wine environment available, with the winepath program in $build's
2756+# $PATH. Assumes ARG has no leading or trailing path separator characters.
2757+#
2758+# ARG is path to be converted from $build format to win32.
2759+# Result is available in $func_convert_core_path_wine_to_w32_result.
2760+# Unconvertible file (directory) names in ARG are skipped; if no directory names
2761+# are convertible, then the result may be empty.
2762+func_convert_core_path_wine_to_w32 ()
2763+{
2764+ $opt_debug
2765+ # unfortunately, winepath doesn't convert paths, only file names
2766+ func_convert_core_path_wine_to_w32_result=""
2767+ if test -n "$1"; then
2768+ oldIFS=$IFS
2769+ IFS=:
2770+ for func_convert_core_path_wine_to_w32_f in $1; do
2771+ IFS=$oldIFS
2772+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2773+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
2774+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
2775+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
2776+ else
2777+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2778+ fi
2779+ fi
2780+ done
2781+ IFS=$oldIFS
2782+ fi
2783+}
2784+# end: func_convert_core_path_wine_to_w32
2785+
2786+
2787+# func_cygpath ARGS...
2788+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2789+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2790+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2791+# (2), returns the Cygwin file name or path in func_cygpath_result (input
2792+# file name or path is assumed to be in w32 format, as previously converted
2793+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
2794+# or path in func_cygpath_result (input file name or path is assumed to be in
2795+# Cygwin format). Returns an empty string on error.
2796+#
2797+# ARGS are passed to cygpath, with the last one being the file name or path to
2798+# be converted.
2799+#
2800+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2801+# environment variable; do not put it in $PATH.
2802+func_cygpath ()
2803+{
2804+ $opt_debug
2805+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2806+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2807+ if test "$?" -ne 0; then
2808+ # on failure, ensure result is empty
2809+ func_cygpath_result=
2810+ fi
2811+ else
2812+ func_cygpath_result=
2813+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
2814+ fi
2815+}
2816+#end: func_cygpath
2817+
2818+
2819+# func_convert_core_msys_to_w32 ARG
2820+# Convert file name or path ARG from MSYS format to w32 format. Return
2821+# result in func_convert_core_msys_to_w32_result.
2822+func_convert_core_msys_to_w32 ()
2823+{
2824+ $opt_debug
2825+ # awkward: cmd appends spaces to result
2826+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2827+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
2828+}
2829+#end: func_convert_core_msys_to_w32
2830+
2831+
2832+# func_convert_file_check ARG1 ARG2
2833+# Verify that ARG1 (a file name in $build format) was converted to $host
2834+# format in ARG2. Otherwise, emit an error message, but continue (resetting
2835+# func_to_host_file_result to ARG1).
2836+func_convert_file_check ()
2837+{
2838+ $opt_debug
2839+ if test -z "$2" && test -n "$1" ; then
2840+ func_error "Could not determine host file name corresponding to"
2841+ func_error " \`$1'"
2842+ func_error "Continuing, but uninstalled executables may not work."
2843+ # Fallback:
2844+ func_to_host_file_result="$1"
2845+ fi
2846+}
2847+# end func_convert_file_check
2848+
2849+
2850+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2851+# Verify that FROM_PATH (a path in $build format) was converted to $host
2852+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2853+# func_to_host_file_result to a simplistic fallback value (see below).
2854+func_convert_path_check ()
2855+{
2856+ $opt_debug
2857+ if test -z "$4" && test -n "$3"; then
2858+ func_error "Could not determine the host path corresponding to"
2859+ func_error " \`$3'"
2860+ func_error "Continuing, but uninstalled executables may not work."
2861+ # Fallback. This is a deliberately simplistic "conversion" and
2862+ # should not be "improved". See libtool.info.
2863+ if test "x$1" != "x$2"; then
2864+ lt_replace_pathsep_chars="s|$1|$2|g"
2865+ func_to_host_path_result=`echo "$3" |
2866+ $SED -e "$lt_replace_pathsep_chars"`
2867+ else
2868+ func_to_host_path_result="$3"
2869+ fi
2870+ fi
2871+}
2872+# end func_convert_path_check
2873+
2874+
2875+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
2876+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
2877+# and appending REPL if ORIG matches BACKPAT.
2878+func_convert_path_front_back_pathsep ()
2879+{
2880+ $opt_debug
2881+ case $4 in
2882+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
2883+ ;;
2884+ esac
2885+ case $4 in
2886+ $2 ) func_append func_to_host_path_result "$3"
2887+ ;;
2888+ esac
2889+}
2890+# end func_convert_path_front_back_pathsep
2891+
2892+
2893+##################################################
2894+# $build to $host FILE NAME CONVERSION FUNCTIONS #
2895+##################################################
2896+# invoked via `$to_host_file_cmd ARG'
2897+#
2898+# In each case, ARG is the path to be converted from $build to $host format.
2899+# Result will be available in $func_to_host_file_result.
2900+
2901+
2902+# func_to_host_file ARG
2903+# Converts the file name ARG from $build format to $host format. Return result
2904+# in func_to_host_file_result.
2905+func_to_host_file ()
2906+{
2907+ $opt_debug
2908+ $to_host_file_cmd "$1"
2909+}
2910+# end func_to_host_file
2911+
2912+
2913+# func_to_tool_file ARG LAZY
2914+# converts the file name ARG from $build format to toolchain format. Return
2915+# result in func_to_tool_file_result. If the conversion in use is listed
2916+# in (the comma separated) LAZY, no conversion takes place.
2917+func_to_tool_file ()
2918+{
2919+ $opt_debug
2920+ case ,$2, in
2921+ *,"$to_tool_file_cmd",*)
2922+ func_to_tool_file_result=$1
2923+ ;;
2924+ *)
2925+ $to_tool_file_cmd "$1"
2926+ func_to_tool_file_result=$func_to_host_file_result
2927+ ;;
2928+ esac
2929+}
2930+# end func_to_tool_file
2931+
2932+
2933+# func_convert_file_noop ARG
2934+# Copy ARG to func_to_host_file_result.
2935+func_convert_file_noop ()
2936+{
2937+ func_to_host_file_result="$1"
2938+}
2939+# end func_convert_file_noop
2940+
2941+
2942+# func_convert_file_msys_to_w32 ARG
2943+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
2944+# conversion to w32 is not available inside the cwrapper. Returns result in
2945+# func_to_host_file_result.
2946+func_convert_file_msys_to_w32 ()
2947+{
2948+ $opt_debug
2949+ func_to_host_file_result="$1"
2950+ if test -n "$1"; then
2951+ func_convert_core_msys_to_w32 "$1"
2952+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
2953+ fi
2954+ func_convert_file_check "$1" "$func_to_host_file_result"
2955+}
2956+# end func_convert_file_msys_to_w32
2957+
2958+
2959+# func_convert_file_cygwin_to_w32 ARG
2960+# Convert file name ARG from Cygwin to w32 format. Returns result in
2961+# func_to_host_file_result.
2962+func_convert_file_cygwin_to_w32 ()
2963+{
2964+ $opt_debug
2965+ func_to_host_file_result="$1"
2966+ if test -n "$1"; then
2967+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
2968+ # LT_CYGPATH in this case.
2969+ func_to_host_file_result=`cygpath -m "$1"`
2970+ fi
2971+ func_convert_file_check "$1" "$func_to_host_file_result"
2972+}
2973+# end func_convert_file_cygwin_to_w32
2974+
2975+
2976+# func_convert_file_nix_to_w32 ARG
2977+# Convert file name ARG from *nix to w32 format. Requires a wine environment
2978+# and a working winepath. Returns result in func_to_host_file_result.
2979+func_convert_file_nix_to_w32 ()
2980+{
2981+ $opt_debug
2982+ func_to_host_file_result="$1"
2983+ if test -n "$1"; then
2984+ func_convert_core_file_wine_to_w32 "$1"
2985+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
2986+ fi
2987+ func_convert_file_check "$1" "$func_to_host_file_result"
2988+}
2989+# end func_convert_file_nix_to_w32
2990+
2991+
2992+# func_convert_file_msys_to_cygwin ARG
2993+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
2994+# Returns result in func_to_host_file_result.
2995+func_convert_file_msys_to_cygwin ()
2996+{
2997+ $opt_debug
2998+ func_to_host_file_result="$1"
2999+ if test -n "$1"; then
3000+ func_convert_core_msys_to_w32 "$1"
3001+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
3002+ func_to_host_file_result="$func_cygpath_result"
3003+ fi
3004+ func_convert_file_check "$1" "$func_to_host_file_result"
3005+}
3006+# end func_convert_file_msys_to_cygwin
3007+
3008+
3009+# func_convert_file_nix_to_cygwin ARG
3010+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
3011+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
3012+# in func_to_host_file_result.
3013+func_convert_file_nix_to_cygwin ()
3014+{
3015+ $opt_debug
3016+ func_to_host_file_result="$1"
3017+ if test -n "$1"; then
3018+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
3019+ func_convert_core_file_wine_to_w32 "$1"
3020+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
3021+ func_to_host_file_result="$func_cygpath_result"
3022+ fi
3023+ func_convert_file_check "$1" "$func_to_host_file_result"
3024+}
3025+# end func_convert_file_nix_to_cygwin
3026+
3027+
3028+#############################################
3029+# $build to $host PATH CONVERSION FUNCTIONS #
3030+#############################################
3031+# invoked via `$to_host_path_cmd ARG'
3032+#
3033+# In each case, ARG is the path to be converted from $build to $host format.
3034+# The result will be available in $func_to_host_path_result.
3035+#
3036+# Path separators are also converted from $build format to $host format. If
3037+# ARG begins or ends with a path separator character, it is preserved (but
3038+# converted to $host format) on output.
3039+#
3040+# All path conversion functions are named using the following convention:
3041+# file name conversion function : func_convert_file_X_to_Y ()
3042+# path conversion function : func_convert_path_X_to_Y ()
3043+# where, for any given $build/$host combination the 'X_to_Y' value is the
3044+# same. If conversion functions are added for new $build/$host combinations,
3045+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
3046+# will break.
3047+
3048+
3049+# func_init_to_host_path_cmd
3050+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
3051+# appropriate value, based on the value of $to_host_file_cmd.
3052+to_host_path_cmd=
3053+func_init_to_host_path_cmd ()
3054+{
3055+ $opt_debug
3056+ if test -z "$to_host_path_cmd"; then
3057+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
3058+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
3059+ fi
3060+}
3061+
3062+
3063+# func_to_host_path ARG
3064+# Converts the path ARG from $build format to $host format. Return result
3065+# in func_to_host_path_result.
3066+func_to_host_path ()
3067+{
3068+ $opt_debug
3069+ func_init_to_host_path_cmd
3070+ $to_host_path_cmd "$1"
3071+}
3072+# end func_to_host_path
3073+
3074+
3075+# func_convert_path_noop ARG
3076+# Copy ARG to func_to_host_path_result.
3077+func_convert_path_noop ()
3078+{
3079+ func_to_host_path_result="$1"
3080+}
3081+# end func_convert_path_noop
3082+
3083+
3084+# func_convert_path_msys_to_w32 ARG
3085+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
3086+# conversion to w32 is not available inside the cwrapper. Returns result in
3087+# func_to_host_path_result.
3088+func_convert_path_msys_to_w32 ()
3089+{
3090+ $opt_debug
3091+ func_to_host_path_result="$1"
3092+ if test -n "$1"; then
3093+ # Remove leading and trailing path separator characters from ARG. MSYS
3094+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
3095+ # and winepath ignores them completely.
3096+ func_stripname : : "$1"
3097+ func_to_host_path_tmp1=$func_stripname_result
3098+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3099+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
3100+ func_convert_path_check : ";" \
3101+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3102+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3103+ fi
3104+}
3105+# end func_convert_path_msys_to_w32
3106+
3107+
3108+# func_convert_path_cygwin_to_w32 ARG
3109+# Convert path ARG from Cygwin to w32 format. Returns result in
3110+# func_to_host_file_result.
3111+func_convert_path_cygwin_to_w32 ()
3112+{
3113+ $opt_debug
3114+ func_to_host_path_result="$1"
3115+ if test -n "$1"; then
3116+ # See func_convert_path_msys_to_w32:
3117+ func_stripname : : "$1"
3118+ func_to_host_path_tmp1=$func_stripname_result
3119+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
3120+ func_convert_path_check : ";" \
3121+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3122+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3123+ fi
3124+}
3125+# end func_convert_path_cygwin_to_w32
3126+
3127+
3128+# func_convert_path_nix_to_w32 ARG
3129+# Convert path ARG from *nix to w32 format. Requires a wine environment and
3130+# a working winepath. Returns result in func_to_host_file_result.
3131+func_convert_path_nix_to_w32 ()
3132+{
3133+ $opt_debug
3134+ func_to_host_path_result="$1"
3135+ if test -n "$1"; then
3136+ # See func_convert_path_msys_to_w32:
3137+ func_stripname : : "$1"
3138+ func_to_host_path_tmp1=$func_stripname_result
3139+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3140+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
3141+ func_convert_path_check : ";" \
3142+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3143+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
3144+ fi
3145+}
3146+# end func_convert_path_nix_to_w32
3147+
3148+
3149+# func_convert_path_msys_to_cygwin ARG
3150+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
3151+# Returns result in func_to_host_file_result.
3152+func_convert_path_msys_to_cygwin ()
3153+{
3154+ $opt_debug
3155+ func_to_host_path_result="$1"
3156+ if test -n "$1"; then
3157+ # See func_convert_path_msys_to_w32:
3158+ func_stripname : : "$1"
3159+ func_to_host_path_tmp1=$func_stripname_result
3160+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
3161+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
3162+ func_to_host_path_result="$func_cygpath_result"
3163+ func_convert_path_check : : \
3164+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3165+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3166+ fi
3167+}
3168+# end func_convert_path_msys_to_cygwin
3169+
3170+
3171+# func_convert_path_nix_to_cygwin ARG
3172+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
3173+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
3174+# func_to_host_file_result.
3175+func_convert_path_nix_to_cygwin ()
3176+{
3177+ $opt_debug
3178+ func_to_host_path_result="$1"
3179+ if test -n "$1"; then
3180+ # Remove leading and trailing path separator characters from
3181+ # ARG. msys behavior is inconsistent here, cygpath turns them
3182+ # into '.;' and ';.', and winepath ignores them completely.
3183+ func_stripname : : "$1"
3184+ func_to_host_path_tmp1=$func_stripname_result
3185+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
3186+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
3187+ func_to_host_path_result="$func_cygpath_result"
3188+ func_convert_path_check : : \
3189+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
3190+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
3191+ fi
3192+}
3193+# end func_convert_path_nix_to_cygwin
3194+
3195+
3196 # func_mode_compile arg...
3197 func_mode_compile ()
3198 {
3199@@ -1314,12 +1985,12 @@ func_mode_compile ()
3200 ;;
3201
3202 -pie | -fpie | -fPIE)
3203- pie_flag="$pie_flag $arg"
3204+ func_append pie_flag " $arg"
3205 continue
3206 ;;
3207
3208 -shared | -static | -prefer-pic | -prefer-non-pic)
3209- later="$later $arg"
3210+ func_append later " $arg"
3211 continue
3212 ;;
3213
3214@@ -1340,15 +2011,14 @@ func_mode_compile ()
3215 save_ifs="$IFS"; IFS=','
3216 for arg in $args; do
3217 IFS="$save_ifs"
3218- func_quote_for_eval "$arg"
3219- lastarg="$lastarg $func_quote_for_eval_result"
3220+ func_append_quoted lastarg "$arg"
3221 done
3222 IFS="$save_ifs"
3223 func_stripname ' ' '' "$lastarg"
3224 lastarg=$func_stripname_result
3225
3226 # Add the arguments to base_compile.
3227- base_compile="$base_compile $lastarg"
3228+ func_append base_compile " $lastarg"
3229 continue
3230 ;;
3231
3232@@ -1364,8 +2034,7 @@ func_mode_compile ()
3233 esac # case $arg_mode
3234
3235 # Aesthetically quote the previous argument.
3236- func_quote_for_eval "$lastarg"
3237- base_compile="$base_compile $func_quote_for_eval_result"
3238+ func_append_quoted base_compile "$lastarg"
3239 done # for arg
3240
3241 case $arg_mode in
3242@@ -1496,17 +2165,16 @@ compiler."
3243 $opt_dry_run || $RM $removelist
3244 exit $EXIT_FAILURE
3245 fi
3246- removelist="$removelist $output_obj"
3247+ func_append removelist " $output_obj"
3248 $ECHO "$srcfile" > "$lockfile"
3249 fi
3250
3251 $opt_dry_run || $RM $removelist
3252- removelist="$removelist $lockfile"
3253+ func_append removelist " $lockfile"
3254 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3255
3256- if test -n "$fix_srcfile_path"; then
3257- eval "srcfile=\"$fix_srcfile_path\""
3258- fi
3259+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3260+ srcfile=$func_to_tool_file_result
3261 func_quote_for_eval "$srcfile"
3262 qsrcfile=$func_quote_for_eval_result
3263
3264@@ -1526,7 +2194,7 @@ compiler."
3265
3266 if test -z "$output_obj"; then
3267 # Place PIC objects in $objdir
3268- command="$command -o $lobj"
3269+ func_append command " -o $lobj"
3270 fi
3271
3272 func_show_eval_locale "$command" \
3273@@ -1573,11 +2241,11 @@ compiler."
3274 command="$base_compile $qsrcfile $pic_flag"
3275 fi
3276 if test "$compiler_c_o" = yes; then
3277- command="$command -o $obj"
3278+ func_append command " -o $obj"
3279 fi
3280
3281 # Suppress compiler output if we already did a PIC compilation.
3282- command="$command$suppress_output"
3283+ func_append command "$suppress_output"
3284 func_show_eval_locale "$command" \
3285 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3286
3287@@ -1622,13 +2290,13 @@ compiler."
3288 }
3289
3290 $opt_help || {
3291- test "$mode" = compile && func_mode_compile ${1+"$@"}
3292+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
3293 }
3294
3295 func_mode_help ()
3296 {
3297 # We need to display help for each of the modes.
3298- case $mode in
3299+ case $opt_mode in
3300 "")
3301 # Generic help is extracted from the usage comments
3302 # at the start of this file.
3303@@ -1659,8 +2327,8 @@ This mode accepts the following addition
3304
3305 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3306 -no-suppress do not suppress compiler output for multiple passes
3307- -prefer-pic try to building PIC objects only
3308- -prefer-non-pic try to building non-PIC objects only
3309+ -prefer-pic try to build PIC objects only
3310+ -prefer-non-pic try to build non-PIC objects only
3311 -shared do not build a \`.o' file suitable for static linking
3312 -static only build a \`.o' file suitable for static linking
3313 -Wc,FLAG pass FLAG directly to the compiler
3314@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted u
3315 ;;
3316
3317 *)
3318- func_fatal_help "invalid operation mode \`$mode'"
3319+ func_fatal_help "invalid operation mode \`$opt_mode'"
3320 ;;
3321 esac
3322
3323@@ -1819,13 +2487,13 @@ if $opt_help; then
3324 else
3325 {
3326 func_help noexit
3327- for mode in compile link execute install finish uninstall clean; do
3328+ for opt_mode in compile link execute install finish uninstall clean; do
3329 func_mode_help
3330 done
3331 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
3332 {
3333 func_help noexit
3334- for mode in compile link execute install finish uninstall clean; do
3335+ for opt_mode in compile link execute install finish uninstall clean; do
3336 echo
3337 func_mode_help
3338 done
3339@@ -1854,13 +2522,16 @@ func_mode_execute ()
3340 func_fatal_help "you must specify a COMMAND"
3341
3342 # Handle -dlopen flags immediately.
3343- for file in $execute_dlfiles; do
3344+ for file in $opt_dlopen; do
3345 test -f "$file" \
3346 || func_fatal_help "\`$file' is not a file"
3347
3348 dir=
3349 case $file in
3350 *.la)
3351+ func_resolve_sysroot "$file"
3352+ file=$func_resolve_sysroot_result
3353+
3354 # Check to see that this really is a libtool archive.
3355 func_lalib_unsafe_p "$file" \
3356 || func_fatal_help "\`$lib' is not a valid libtool archive"
3357@@ -1882,7 +2553,7 @@ func_mode_execute ()
3358 dir="$func_dirname_result"
3359
3360 if test -f "$dir/$objdir/$dlname"; then
3361- dir="$dir/$objdir"
3362+ func_append dir "/$objdir"
3363 else
3364 if test ! -f "$dir/$dlname"; then
3365 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
3366@@ -1907,10 +2578,10 @@ func_mode_execute ()
3367 test -n "$absdir" && dir="$absdir"
3368
3369 # Now add the directory to shlibpath_var.
3370- if eval test -z \"\$$shlibpath_var\"; then
3371- eval $shlibpath_var=\$dir
3372+ if eval "test -z \"\$$shlibpath_var\""; then
3373+ eval "$shlibpath_var=\"\$dir\""
3374 else
3375- eval $shlibpath_var=\$dir:\$$shlibpath_var
3376+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3377 fi
3378 done
3379
3380@@ -1939,8 +2610,7 @@ func_mode_execute ()
3381 ;;
3382 esac
3383 # Quote arguments (to preserve shell metacharacters).
3384- func_quote_for_eval "$file"
3385- args="$args $func_quote_for_eval_result"
3386+ func_append_quoted args "$file"
3387 done
3388
3389 if test "X$opt_dry_run" = Xfalse; then
3390@@ -1972,22 +2642,59 @@ func_mode_execute ()
3391 fi
3392 }
3393
3394-test "$mode" = execute && func_mode_execute ${1+"$@"}
3395+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
3396
3397
3398 # func_mode_finish arg...
3399 func_mode_finish ()
3400 {
3401 $opt_debug
3402- libdirs="$nonopt"
3403+ libs=
3404+ libdirs=
3405 admincmds=
3406
3407- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3408- for dir
3409- do
3410- libdirs="$libdirs $dir"
3411- done
3412+ for opt in "$nonopt" ${1+"$@"}
3413+ do
3414+ if test -d "$opt"; then
3415+ func_append libdirs " $opt"
3416+
3417+ elif test -f "$opt"; then
3418+ if func_lalib_unsafe_p "$opt"; then
3419+ func_append libs " $opt"
3420+ else
3421+ func_warning "\`$opt' is not a valid libtool archive"
3422+ fi
3423+
3424+ else
3425+ func_fatal_error "invalid argument \`$opt'"
3426+ fi
3427+ done
3428+
3429+ if test -n "$libs"; then
3430+ if test -n "$lt_sysroot"; then
3431+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
3432+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
3433+ else
3434+ sysroot_cmd=
3435+ fi
3436+
3437+ # Remove sysroot references
3438+ if $opt_dry_run; then
3439+ for lib in $libs; do
3440+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
3441+ done
3442+ else
3443+ tmpdir=`func_mktempdir`
3444+ for lib in $libs; do
3445+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
3446+ > $tmpdir/tmp-la
3447+ mv -f $tmpdir/tmp-la $lib
3448+ done
3449+ ${RM}r "$tmpdir"
3450+ fi
3451+ fi
3452
3453+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3454 for libdir in $libdirs; do
3455 if test -n "$finish_cmds"; then
3456 # Do each command in the finish commands.
3457@@ -1997,7 +2704,7 @@ func_mode_finish ()
3458 if test -n "$finish_eval"; then
3459 # Do the single finish_eval.
3460 eval cmds=\"$finish_eval\"
3461- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
3462+ $opt_dry_run || eval "$cmds" || func_append admincmds "
3463 $cmds"
3464 fi
3465 done
3466@@ -2006,53 +2713,55 @@ func_mode_finish ()
3467 # Exit here if they wanted silent mode.
3468 $opt_silent && exit $EXIT_SUCCESS
3469
3470- echo "----------------------------------------------------------------------"
3471- echo "Libraries have been installed in:"
3472- for libdir in $libdirs; do
3473- $ECHO " $libdir"
3474- done
3475- echo
3476- echo "If you ever happen to want to link against installed libraries"
3477- echo "in a given directory, LIBDIR, you must either use libtool, and"
3478- echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
3479- echo "flag during linking and do at least one of the following:"
3480- if test -n "$shlibpath_var"; then
3481- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3482- echo " during execution"
3483- fi
3484- if test -n "$runpath_var"; then
3485- echo " - add LIBDIR to the \`$runpath_var' environment variable"
3486- echo " during linking"
3487- fi
3488- if test -n "$hardcode_libdir_flag_spec"; then
3489- libdir=LIBDIR
3490- eval "flag=\"$hardcode_libdir_flag_spec\""
3491+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3492+ echo "----------------------------------------------------------------------"
3493+ echo "Libraries have been installed in:"
3494+ for libdir in $libdirs; do
3495+ $ECHO " $libdir"
3496+ done
3497+ echo
3498+ echo "If you ever happen to want to link against installed libraries"
3499+ echo "in a given directory, LIBDIR, you must either use libtool, and"
3500+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
3501+ echo "flag during linking and do at least one of the following:"
3502+ if test -n "$shlibpath_var"; then
3503+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3504+ echo " during execution"
3505+ fi
3506+ if test -n "$runpath_var"; then
3507+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
3508+ echo " during linking"
3509+ fi
3510+ if test -n "$hardcode_libdir_flag_spec"; then
3511+ libdir=LIBDIR
3512+ eval flag=\"$hardcode_libdir_flag_spec\"
3513
3514- $ECHO " - use the \`$flag' linker flag"
3515- fi
3516- if test -n "$admincmds"; then
3517- $ECHO " - have your system administrator run these commands:$admincmds"
3518- fi
3519- if test -f /etc/ld.so.conf; then
3520- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3521- fi
3522- echo
3523+ $ECHO " - use the \`$flag' linker flag"
3524+ fi
3525+ if test -n "$admincmds"; then
3526+ $ECHO " - have your system administrator run these commands:$admincmds"
3527+ fi
3528+ if test -f /etc/ld.so.conf; then
3529+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3530+ fi
3531+ echo
3532
3533- echo "See any operating system documentation about shared libraries for"
3534- case $host in
3535- solaris2.[6789]|solaris2.1[0-9])
3536- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
3537- echo "pages."
3538- ;;
3539- *)
3540- echo "more information, such as the ld(1) and ld.so(8) manual pages."
3541- ;;
3542- esac
3543- echo "----------------------------------------------------------------------"
3544+ echo "See any operating system documentation about shared libraries for"
3545+ case $host in
3546+ solaris2.[6789]|solaris2.1[0-9])
3547+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
3548+ echo "pages."
3549+ ;;
3550+ *)
3551+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
3552+ ;;
3553+ esac
3554+ echo "----------------------------------------------------------------------"
3555+ fi
3556 exit $EXIT_SUCCESS
3557 }
3558
3559-test "$mode" = finish && func_mode_finish ${1+"$@"}
3560+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
3561
3562
3563 # func_mode_install arg...
3564@@ -2077,7 +2786,7 @@ func_mode_install ()
3565 # The real first argument should be the name of the installation program.
3566 # Aesthetically quote it.
3567 func_quote_for_eval "$arg"
3568- install_prog="$install_prog$func_quote_for_eval_result"
3569+ func_append install_prog "$func_quote_for_eval_result"
3570 install_shared_prog=$install_prog
3571 case " $install_prog " in
3572 *[\\\ /]cp\ *) install_cp=: ;;
3573@@ -2097,7 +2806,7 @@ func_mode_install ()
3574 do
3575 arg2=
3576 if test -n "$dest"; then
3577- files="$files $dest"
3578+ func_append files " $dest"
3579 dest=$arg
3580 continue
3581 fi
3582@@ -2135,11 +2844,11 @@ func_mode_install ()
3583
3584 # Aesthetically quote the argument.
3585 func_quote_for_eval "$arg"
3586- install_prog="$install_prog $func_quote_for_eval_result"
3587+ func_append install_prog " $func_quote_for_eval_result"
3588 if test -n "$arg2"; then
3589 func_quote_for_eval "$arg2"
3590 fi
3591- install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
3592+ func_append install_shared_prog " $func_quote_for_eval_result"
3593 done
3594
3595 test -z "$install_prog" && \
3596@@ -2151,7 +2860,7 @@ func_mode_install ()
3597 if test -n "$install_override_mode" && $no_mode; then
3598 if $install_cp; then :; else
3599 func_quote_for_eval "$install_override_mode"
3600- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
3601+ func_append install_shared_prog " -m $func_quote_for_eval_result"
3602 fi
3603 fi
3604
3605@@ -2209,10 +2918,13 @@ func_mode_install ()
3606 case $file in
3607 *.$libext)
3608 # Do the static libraries later.
3609- staticlibs="$staticlibs $file"
3610+ func_append staticlibs " $file"
3611 ;;
3612
3613 *.la)
3614+ func_resolve_sysroot "$file"
3615+ file=$func_resolve_sysroot_result
3616+
3617 # Check to see that this really is a libtool archive.
3618 func_lalib_unsafe_p "$file" \
3619 || func_fatal_help "\`$file' is not a valid libtool archive"
3620@@ -2226,23 +2938,30 @@ func_mode_install ()
3621 if test "X$destdir" = "X$libdir"; then
3622 case "$current_libdirs " in
3623 *" $libdir "*) ;;
3624- *) current_libdirs="$current_libdirs $libdir" ;;
3625+ *) func_append current_libdirs " $libdir" ;;
3626 esac
3627 else
3628 # Note the libdir as a future libdir.
3629 case "$future_libdirs " in
3630 *" $libdir "*) ;;
3631- *) future_libdirs="$future_libdirs $libdir" ;;
3632+ *) func_append future_libdirs " $libdir" ;;
3633 esac
3634 fi
3635
3636 func_dirname "$file" "/" ""
3637 dir="$func_dirname_result"
3638- dir="$dir$objdir"
3639+ func_append dir "$objdir"
3640
3641 if test -n "$relink_command"; then
3642+ # Strip any trailing slash from the destination.
3643+ func_stripname '' '/' "$libdir"
3644+ destlibdir=$func_stripname_result
3645+
3646+ func_stripname '' '/' "$destdir"
3647+ s_destdir=$func_stripname_result
3648+
3649 # Determine the prefix the user has applied to our future dir.
3650- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
3651+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
3652
3653 # Don't allow the user to place us outside of our expected
3654 # location b/c this prevents finding dependent libraries that
3655@@ -2315,7 +3034,7 @@ func_mode_install ()
3656 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
3657
3658 # Maybe install the static library, too.
3659- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3660+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
3661 ;;
3662
3663 *.lo)
3664@@ -2503,7 +3222,7 @@ func_mode_install ()
3665 test -n "$future_libdirs" && \
3666 func_warning "remember to run \`$progname --finish$future_libdirs'"
3667
3668- if test -n "$current_libdirs" && $opt_finish; then
3669+ if test -n "$current_libdirs"; then
3670 # Maybe just do a dry run.
3671 $opt_dry_run && current_libdirs=" -n$current_libdirs"
3672 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
3673@@ -2512,7 +3231,7 @@ func_mode_install ()
3674 fi
3675 }
3676
3677-test "$mode" = install && func_mode_install ${1+"$@"}
3678+test "$opt_mode" = install && func_mode_install ${1+"$@"}
3679
3680
3681 # func_generate_dlsyms outputname originator pic_p
3682@@ -2559,6 +3278,18 @@ extern \"C\" {
3683 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3684 #endif
3685
3686+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3687+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3688+/* DATA imports from DLLs on WIN32 con't be const, because runtime
3689+ relocations are performed -- see ld's documentation on pseudo-relocs. */
3690+# define LT_DLSYM_CONST
3691+#elif defined(__osf__)
3692+/* This system does not cope well with relocations in const data. */
3693+# define LT_DLSYM_CONST
3694+#else
3695+# define LT_DLSYM_CONST const
3696+#endif
3697+
3698 /* External symbol declarations for the compiler. */\
3699 "
3700
3701@@ -2570,21 +3301,22 @@ extern \"C\" {
3702 # Add our own program objects to the symbol list.
3703 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
3704 for progfile in $progfiles; do
3705- func_verbose "extracting global C symbols from \`$progfile'"
3706- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3707+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3708+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3709+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
3710 done
3711
3712 if test -n "$exclude_expsyms"; then
3713 $opt_dry_run || {
3714- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3715- $MV "$nlist"T "$nlist"
3716+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3717+ eval '$MV "$nlist"T "$nlist"'
3718 }
3719 fi
3720
3721 if test -n "$export_symbols_regex"; then
3722 $opt_dry_run || {
3723- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T
3724- $MV "$nlist"T "$nlist"
3725+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3726+ eval '$MV "$nlist"T "$nlist"'
3727 }
3728 fi
3729
3730@@ -2593,23 +3325,23 @@ extern \"C\" {
3731 export_symbols="$output_objdir/$outputname.exp"
3732 $opt_dry_run || {
3733 $RM $export_symbols
3734- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols"
3735+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3736 case $host in
3737 *cygwin* | *mingw* | *cegcc* )
3738- echo EXPORTS > "$output_objdir/$outputname.def"
3739- cat "$export_symbols" >> "$output_objdir/$outputname.def"
3740+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3741+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
3742 ;;
3743 esac
3744 }
3745 else
3746 $opt_dry_run || {
3747- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp"
3748- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T
3749- $MV "$nlist"T "$nlist"
3750+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
3751+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
3752+ eval '$MV "$nlist"T "$nlist"'
3753 case $host in
3754 *cygwin* | *mingw* | *cegcc* )
3755- echo EXPORTS > "$output_objdir/$outputname.def"
3756- cat "$nlist" >> "$output_objdir/$outputname.def"
3757+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3758+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
3759 ;;
3760 esac
3761 }
3762@@ -2620,10 +3352,52 @@ extern \"C\" {
3763 func_verbose "extracting global C symbols from \`$dlprefile'"
3764 func_basename "$dlprefile"
3765 name="$func_basename_result"
3766- $opt_dry_run || {
3767- $ECHO ": $name " >> "$nlist"
3768- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3769- }
3770+ case $host in
3771+ *cygwin* | *mingw* | *cegcc* )
3772+ # if an import library, we need to obtain dlname
3773+ if func_win32_import_lib_p "$dlprefile"; then
3774+ func_tr_sh "$dlprefile"
3775+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
3776+ dlprefile_dlbasename=""
3777+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3778+ # Use subshell, to avoid clobbering current variable values
3779+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3780+ if test -n "$dlprefile_dlname" ; then
3781+ func_basename "$dlprefile_dlname"
3782+ dlprefile_dlbasename="$func_basename_result"
3783+ else
3784+ # no lafile. user explicitly requested -dlpreopen <import library>.
3785+ $sharedlib_from_linklib_cmd "$dlprefile"
3786+ dlprefile_dlbasename=$sharedlib_from_linklib_result
3787+ fi
3788+ fi
3789+ $opt_dry_run || {
3790+ if test -n "$dlprefile_dlbasename" ; then
3791+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3792+ else
3793+ func_warning "Could not compute DLL name from $name"
3794+ eval '$ECHO ": $name " >> "$nlist"'
3795+ fi
3796+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3797+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3798+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3799+ }
3800+ else # not an import lib
3801+ $opt_dry_run || {
3802+ eval '$ECHO ": $name " >> "$nlist"'
3803+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3804+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3805+ }
3806+ fi
3807+ ;;
3808+ *)
3809+ $opt_dry_run || {
3810+ eval '$ECHO ": $name " >> "$nlist"'
3811+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3812+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3813+ }
3814+ ;;
3815+ esac
3816 done
3817
3818 $opt_dry_run || {
3819@@ -2661,26 +3435,9 @@ typedef struct {
3820 const char *name;
3821 void *address;
3822 } lt_dlsymlist;
3823-"
3824- case $host in
3825- *cygwin* | *mingw* | *cegcc* )
3826- echo >> "$output_objdir/$my_dlsyms" "\
3827-/* DATA imports from DLLs on WIN32 con't be const, because
3828- runtime relocations are performed -- see ld's documentation
3829- on pseudo-relocs. */"
3830- lt_dlsym_const= ;;
3831- *osf5*)
3832- echo >> "$output_objdir/$my_dlsyms" "\
3833-/* This system does not cope well with relocations in const data */"
3834- lt_dlsym_const= ;;
3835- *)
3836- lt_dlsym_const=const ;;
3837- esac
3838-
3839- echo >> "$output_objdir/$my_dlsyms" "\
3840-extern $lt_dlsym_const lt_dlsymlist
3841+extern LT_DLSYM_CONST lt_dlsymlist
3842 lt_${my_prefix}_LTX_preloaded_symbols[];
3843-$lt_dlsym_const lt_dlsymlist
3844+LT_DLSYM_CONST lt_dlsymlist
3845 lt_${my_prefix}_LTX_preloaded_symbols[] =
3846 {\
3847 { \"$my_originator\", (void *) 0 },"
3848@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup()
3849 for arg in $LTCFLAGS; do
3850 case $arg in
3851 -pie | -fpie | -fPIE) ;;
3852- *) symtab_cflags="$symtab_cflags $arg" ;;
3853+ *) func_append symtab_cflags " $arg" ;;
3854 esac
3855 done
3856
3857@@ -2796,9 +3553,11 @@ func_win32_libid ()
3858 win32_libid_type="x86 archive import"
3859 ;;
3860 *ar\ archive*) # could be an import, or static
3861- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null |
3862- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3863- win32_nmres=`$NM -f posix -A "$1" |
3864+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
3865+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
3866+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3867+ func_to_tool_file "$1" func_convert_file_msys_to_w32
3868+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3869 $SED -n -e '
3870 1,100{
3871 / I /{
3872@@ -2827,6 +3586,131 @@ func_win32_libid ()
3873 $ECHO "$win32_libid_type"
3874 }
3875
3876+# func_cygming_dll_for_implib ARG
3877+#
3878+# Platform-specific function to extract the
3879+# name of the DLL associated with the specified
3880+# import library ARG.
3881+# Invoked by eval'ing the libtool variable
3882+# $sharedlib_from_linklib_cmd
3883+# Result is available in the variable
3884+# $sharedlib_from_linklib_result
3885+func_cygming_dll_for_implib ()
3886+{
3887+ $opt_debug
3888+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3889+}
3890+
3891+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3892+#
3893+# The is the core of a fallback implementation of a
3894+# platform-specific function to extract the name of the
3895+# DLL associated with the specified import library LIBNAME.
3896+#
3897+# SECTION_NAME is either .idata$6 or .idata$7, depending
3898+# on the platform and compiler that created the implib.
3899+#
3900+# Echos the name of the DLL associated with the
3901+# specified import library.
3902+func_cygming_dll_for_implib_fallback_core ()
3903+{
3904+ $opt_debug
3905+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3906+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3907+ $SED '/^Contents of section '"$match_literal"':/{
3908+ # Place marker at beginning of archive member dllname section
3909+ s/.*/====MARK====/
3910+ p
3911+ d
3912+ }
3913+ # These lines can sometimes be longer than 43 characters, but
3914+ # are always uninteresting
3915+ /:[ ]*file format pe[i]\{,1\}-/d
3916+ /^In archive [^:]*:/d
3917+ # Ensure marker is printed
3918+ /^====MARK====/p
3919+ # Remove all lines with less than 43 characters
3920+ /^.\{43\}/!d
3921+ # From remaining lines, remove first 43 characters
3922+ s/^.\{43\}//' |
3923+ $SED -n '
3924+ # Join marker and all lines until next marker into a single line
3925+ /^====MARK====/ b para
3926+ H
3927+ $ b para
3928+ b
3929+ :para
3930+ x
3931+ s/\n//g
3932+ # Remove the marker
3933+ s/^====MARK====//
3934+ # Remove trailing dots and whitespace
3935+ s/[\. \t]*$//
3936+ # Print
3937+ /./p' |
3938+ # we now have a list, one entry per line, of the stringified
3939+ # contents of the appropriate section of all members of the
3940+ # archive which possess that section. Heuristic: eliminate
3941+ # all those which have a first or second character that is
3942+ # a '.' (that is, objdump's representation of an unprintable
3943+ # character.) This should work for all archives with less than
3944+ # 0x302f exports -- but will fail for DLLs whose name actually
3945+ # begins with a literal '.' or a single character followed by
3946+ # a '.'.
3947+ #
3948+ # Of those that remain, print the first one.
3949+ $SED -e '/^\./d;/^.\./d;q'
3950+}
3951+
3952+# func_cygming_gnu_implib_p ARG
3953+# This predicate returns with zero status (TRUE) if
3954+# ARG is a GNU/binutils-style import library. Returns
3955+# with nonzero status (FALSE) otherwise.
3956+func_cygming_gnu_implib_p ()
3957+{
3958+ $opt_debug
3959+ func_to_tool_file "$1" func_convert_file_msys_to_w32
3960+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3961+ test -n "$func_cygming_gnu_implib_tmp"
3962+}
3963+
3964+# func_cygming_ms_implib_p ARG
3965+# This predicate returns with zero status (TRUE) if
3966+# ARG is an MS-style import library. Returns
3967+# with nonzero status (FALSE) otherwise.
3968+func_cygming_ms_implib_p ()
3969+{
3970+ $opt_debug
3971+ func_to_tool_file "$1" func_convert_file_msys_to_w32
3972+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3973+ test -n "$func_cygming_ms_implib_tmp"
3974+}
3975+
3976+# func_cygming_dll_for_implib_fallback ARG
3977+# Platform-specific function to extract the
3978+# name of the DLL associated with the specified
3979+# import library ARG.
3980+#
3981+# This fallback implementation is for use when $DLLTOOL
3982+# does not support the --identify-strict option.
3983+# Invoked by eval'ing the libtool variable
3984+# $sharedlib_from_linklib_cmd
3985+# Result is available in the variable
3986+# $sharedlib_from_linklib_result
3987+func_cygming_dll_for_implib_fallback ()
3988+{
3989+ $opt_debug
3990+ if func_cygming_gnu_implib_p "$1" ; then
3991+ # binutils import library
3992+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3993+ elif func_cygming_ms_implib_p "$1" ; then
3994+ # ms-generated import library
3995+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3996+ else
3997+ # unknown
3998+ sharedlib_from_linklib_result=""
3999+ fi
4000+}
4001
4002
4003 # func_extract_an_archive dir oldlib
4004@@ -2917,7 +3801,7 @@ func_extract_archives ()
4005 darwin_file=
4006 darwin_files=
4007 for darwin_file in $darwin_filelist; do
4008- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
4009+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
4010 $LIPO -create -output "$darwin_file" $darwin_files
4011 done # $darwin_filelist
4012 $RM -rf unfat-$$
4013@@ -2932,7 +3816,7 @@ func_extract_archives ()
4014 func_extract_an_archive "$my_xdir" "$my_xabs"
4015 ;;
4016 esac
4017- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4018+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
4019 done
4020
4021 func_extract_archives_result="$my_oldobjs"
4022@@ -3014,7 +3898,110 @@ func_fallback_echo ()
4023 _LTECHO_EOF'
4024 }
4025 ECHO=\"$qECHO\"
4026- fi\
4027+ fi
4028+
4029+# Very basic option parsing. These options are (a) specific to
4030+# the libtool wrapper, (b) are identical between the wrapper
4031+# /script/ and the wrapper /executable/ which is used only on
4032+# windows platforms, and (c) all begin with the string "--lt-"
4033+# (application programs are unlikely to have options which match
4034+# this pattern).
4035+#
4036+# There are only two supported options: --lt-debug and
4037+# --lt-dump-script. There is, deliberately, no --lt-help.
4038+#
4039+# The first argument to this parsing function should be the
4040+# script's $0 value, followed by "$@".
4041+lt_option_debug=
4042+func_parse_lt_options ()
4043+{
4044+ lt_script_arg0=\$0
4045+ shift
4046+ for lt_opt
4047+ do
4048+ case \"\$lt_opt\" in
4049+ --lt-debug) lt_option_debug=1 ;;
4050+ --lt-dump-script)
4051+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
4052+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
4053+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
4054+ cat \"\$lt_dump_D/\$lt_dump_F\"
4055+ exit 0
4056+ ;;
4057+ --lt-*)
4058+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
4059+ exit 1
4060+ ;;
4061+ esac
4062+ done
4063+
4064+ # Print the debug banner immediately:
4065+ if test -n \"\$lt_option_debug\"; then
4066+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
4067+ fi
4068+}
4069+
4070+# Used when --lt-debug. Prints its arguments to stdout
4071+# (redirection is the responsibility of the caller)
4072+func_lt_dump_args ()
4073+{
4074+ lt_dump_args_N=1;
4075+ for lt_arg
4076+ do
4077+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
4078+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
4079+ done
4080+}
4081+
4082+# Core function for launching the target application
4083+func_exec_program_core ()
4084+{
4085+"
4086+ case $host in
4087+ # Backslashes separate directories on plain windows
4088+ *-*-mingw | *-*-os2* | *-cegcc*)
4089+ $ECHO "\
4090+ if test -n \"\$lt_option_debug\"; then
4091+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
4092+ func_lt_dump_args \${1+\"\$@\"} 1>&2
4093+ fi
4094+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
4095+"
4096+ ;;
4097+
4098+ *)
4099+ $ECHO "\
4100+ if test -n \"\$lt_option_debug\"; then
4101+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
4102+ func_lt_dump_args \${1+\"\$@\"} 1>&2
4103+ fi
4104+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
4105+"
4106+ ;;
4107+ esac
4108+ $ECHO "\
4109+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
4110+ exit 1
4111+}
4112+
4113+# A function to encapsulate launching the target application
4114+# Strips options in the --lt-* namespace from \$@ and
4115+# launches target application with the remaining arguments.
4116+func_exec_program ()
4117+{
4118+ for lt_wr_arg
4119+ do
4120+ case \$lt_wr_arg in
4121+ --lt-*) ;;
4122+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
4123+ esac
4124+ shift
4125+ done
4126+ func_exec_program_core \${1+\"\$@\"}
4127+}
4128+
4129+ # Parse options
4130+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4131
4132 # Find the directory that this script lives in.
4133 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4134@@ -3078,7 +4065,7 @@ _LTECHO_EOF'
4135
4136 # relink executable if necessary
4137 if test -n \"\$relink_command\"; then
4138- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then :
4139+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4140 else
4141 $ECHO \"\$relink_command_output\" >&2
4142 $RM \"\$progdir/\$file\"
4143@@ -3102,6 +4089,18 @@ _LTECHO_EOF'
4144
4145 if test -f \"\$progdir/\$program\"; then"
4146
4147+ # fixup the dll searchpath if we need to.
4148+ #
4149+ # Fix the DLL searchpath if we need to. Do this before prepending
4150+ # to shlibpath, because on Windows, both are PATH and uninstalled
4151+ # libraries must come first.
4152+ if test -n "$dllsearchpath"; then
4153+ $ECHO "\
4154+ # Add the dll search path components to the executable PATH
4155+ PATH=$dllsearchpath:\$PATH
4156+"
4157+ fi
4158+
4159 # Export our shlibpath_var if we have one.
4160 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4161 $ECHO "\
4162@@ -3116,35 +4115,10 @@ _LTECHO_EOF'
4163 "
4164 fi
4165
4166- # fixup the dll searchpath if we need to.
4167- if test -n "$dllsearchpath"; then
4168- $ECHO "\
4169- # Add the dll search path components to the executable PATH
4170- PATH=$dllsearchpath:\$PATH
4171-"
4172- fi
4173-
4174 $ECHO "\
4175 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4176 # Run the actual program with our arguments.
4177-"
4178- case $host in
4179- # Backslashes separate directories on plain windows
4180- *-*-mingw | *-*-os2* | *-cegcc*)
4181- $ECHO "\
4182- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
4183-"
4184- ;;
4185-
4186- *)
4187- $ECHO "\
4188- exec \"\$progdir/\$program\" \${1+\"\$@\"}
4189-"
4190- ;;
4191- esac
4192- $ECHO "\
4193- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
4194- exit 1
4195+ func_exec_program \${1+\"\$@\"}
4196 fi
4197 else
4198 # The program doesn't exist.
4199@@ -3158,166 +4132,6 @@ fi\
4200 }
4201
4202
4203-# func_to_host_path arg
4204-#
4205-# Convert paths to host format when used with build tools.
4206-# Intended for use with "native" mingw (where libtool itself
4207-# is running under the msys shell), or in the following cross-
4208-# build environments:
4209-# $build $host
4210-# mingw (msys) mingw [e.g. native]
4211-# cygwin mingw
4212-# *nix + wine mingw
4213-# where wine is equipped with the `winepath' executable.
4214-# In the native mingw case, the (msys) shell automatically
4215-# converts paths for any non-msys applications it launches,
4216-# but that facility isn't available from inside the cwrapper.
4217-# Similar accommodations are necessary for $host mingw and
4218-# $build cygwin. Calling this function does no harm for other
4219-# $host/$build combinations not listed above.
4220-#
4221-# ARG is the path (on $build) that should be converted to
4222-# the proper representation for $host. The result is stored
4223-# in $func_to_host_path_result.
4224-func_to_host_path ()
4225-{
4226- func_to_host_path_result="$1"
4227- if test -n "$1"; then
4228- case $host in
4229- *mingw* )
4230- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
4231- case $build in
4232- *mingw* ) # actually, msys
4233- # awkward: cmd appends spaces to result
4234- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
4235- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
4236- ;;
4237- *cygwin* )
4238- func_to_host_path_result=`cygpath -w "$1" |
4239- $SED -e "$lt_sed_naive_backslashify"`
4240- ;;
4241- * )
4242- # Unfortunately, winepath does not exit with a non-zero
4243- # error code, so we are forced to check the contents of
4244- # stdout. On the other hand, if the command is not
4245- # found, the shell will set an exit code of 127 and print
4246- # *an error message* to stdout. So we must check for both
4247- # error code of zero AND non-empty stdout, which explains
4248- # the odd construction:
4249- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
4250- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
4251- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
4252- $SED -e "$lt_sed_naive_backslashify"`
4253- else
4254- # Allow warning below.
4255- func_to_host_path_result=
4256- fi
4257- ;;
4258- esac
4259- if test -z "$func_to_host_path_result" ; then
4260- func_error "Could not determine host path corresponding to"
4261- func_error " \`$1'"
4262- func_error "Continuing, but uninstalled executables may not work."
4263- # Fallback:
4264- func_to_host_path_result="$1"
4265- fi
4266- ;;
4267- esac
4268- fi
4269-}
4270-# end: func_to_host_path
4271-
4272-# func_to_host_pathlist arg
4273-#
4274-# Convert pathlists to host format when used with build tools.
4275-# See func_to_host_path(), above. This function supports the
4276-# following $build/$host combinations (but does no harm for
4277-# combinations not listed here):
4278-# $build $host
4279-# mingw (msys) mingw [e.g. native]
4280-# cygwin mingw
4281-# *nix + wine mingw
4282-#
4283-# Path separators are also converted from $build format to
4284-# $host format. If ARG begins or ends with a path separator
4285-# character, it is preserved (but converted to $host format)
4286-# on output.
4287-#
4288-# ARG is a pathlist (on $build) that should be converted to
4289-# the proper representation on $host. The result is stored
4290-# in $func_to_host_pathlist_result.
4291-func_to_host_pathlist ()
4292-{
4293- func_to_host_pathlist_result="$1"
4294- if test -n "$1"; then
4295- case $host in
4296- *mingw* )
4297- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
4298- # Remove leading and trailing path separator characters from
4299- # ARG. msys behavior is inconsistent here, cygpath turns them
4300- # into '.;' and ';.', and winepath ignores them completely.
4301- func_stripname : : "$1"
4302- func_to_host_pathlist_tmp1=$func_stripname_result
4303- case $build in
4304- *mingw* ) # Actually, msys.
4305- # Awkward: cmd appends spaces to result.
4306- func_to_host_pathlist_result=`
4307- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
4308- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
4309- ;;
4310- *cygwin* )
4311- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
4312- $SED -e "$lt_sed_naive_backslashify"`
4313- ;;
4314- * )
4315- # unfortunately, winepath doesn't convert pathlists
4316- func_to_host_pathlist_result=""
4317- func_to_host_pathlist_oldIFS=$IFS
4318- IFS=:
4319- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
4320- IFS=$func_to_host_pathlist_oldIFS
4321- if test -n "$func_to_host_pathlist_f" ; then
4322- func_to_host_path "$func_to_host_pathlist_f"
4323- if test -n "$func_to_host_path_result" ; then
4324- if test -z "$func_to_host_pathlist_result" ; then
4325- func_to_host_pathlist_result="$func_to_host_path_result"
4326- else
4327- func_append func_to_host_pathlist_result ";$func_to_host_path_result"
4328- fi
4329- fi
4330- fi
4331- done
4332- IFS=$func_to_host_pathlist_oldIFS
4333- ;;
4334- esac
4335- if test -z "$func_to_host_pathlist_result"; then
4336- func_error "Could not determine the host path(s) corresponding to"
4337- func_error " \`$1'"
4338- func_error "Continuing, but uninstalled executables may not work."
4339- # Fallback. This may break if $1 contains DOS-style drive
4340- # specifications. The fix is not to complicate the expression
4341- # below, but for the user to provide a working wine installation
4342- # with winepath so that path translation in the cross-to-mingw
4343- # case works properly.
4344- lt_replace_pathsep_nix_to_dos="s|:|;|g"
4345- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
4346- $SED -e "$lt_replace_pathsep_nix_to_dos"`
4347- fi
4348- # Now, add the leading and trailing path separators back
4349- case "$1" in
4350- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
4351- ;;
4352- esac
4353- case "$1" in
4354- *: ) func_append func_to_host_pathlist_result ";"
4355- ;;
4356- esac
4357- ;;
4358- esac
4359- fi
4360-}
4361-# end: func_to_host_pathlist
4362-
4363 # func_emit_cwrapperexe_src
4364 # emit the source code for a wrapper executable on stdout
4365 # Must ONLY be called from within func_mode_link because
4366@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src ()
4367
4368 This wrapper executable should never be moved out of the build directory.
4369 If it is, it will not operate correctly.
4370-
4371- Currently, it simply execs the wrapper *script* "$SHELL $output",
4372- but could eventually absorb all of the scripts functionality and
4373- exec $objdir/$outputname directly.
4374 */
4375 EOF
4376 cat <<"EOF"
4377@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *,
4378 if (stale) { free ((void *) stale); stale = 0; } \
4379 } while (0)
4380
4381-#undef LTWRAPPER_DEBUGPRINTF
4382-#if defined LT_DEBUGWRAPPER
4383-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
4384-static void
4385-ltwrapper_debugprintf (const char *fmt, ...)
4386-{
4387- va_list args;
4388- va_start (args, fmt);
4389- (void) vfprintf (stderr, fmt, args);
4390- va_end (args);
4391-}
4392+#if defined(LT_DEBUGWRAPPER)
4393+static int lt_debug = 1;
4394 #else
4395-# define LTWRAPPER_DEBUGPRINTF(args)
4396+static int lt_debug = 0;
4397 #endif
4398
4399-const char *program_name = NULL;
4400+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
4401
4402 void *xmalloc (size_t num);
4403 char *xstrdup (const char *string);
4404@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathsp
4405 int make_executable (const char *path);
4406 int check_executable (const char *path);
4407 char *strendzap (char *str, const char *pat);
4408-void lt_fatal (const char *message, ...);
4409+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4410+void lt_fatal (const char *file, int line, const char *message, ...);
4411+static const char *nonnull (const char *s);
4412+static const char *nonempty (const char *s);
4413 void lt_setenv (const char *name, const char *value);
4414 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
4415 void lt_update_exe_path (const char *name, const char *value);
4416@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f);
4417 EOF
4418
4419 cat <<EOF
4420-const char * MAGIC_EXE = "$magic_exe";
4421+volatile const char * MAGIC_EXE = "$magic_exe";
4422 const char * LIB_PATH_VARNAME = "$shlibpath_var";
4423 EOF
4424
4425 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4426- func_to_host_pathlist "$temp_rpath"
4427+ func_to_host_path "$temp_rpath"
4428 cat <<EOF
4429-const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
4430+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
4431 EOF
4432 else
4433 cat <<"EOF"
4434@@ -3513,10 +4317,10 @@ EOF
4435 fi
4436
4437 if test -n "$dllsearchpath"; then
4438- func_to_host_pathlist "$dllsearchpath:"
4439+ func_to_host_path "$dllsearchpath:"
4440 cat <<EOF
4441 const char * EXE_PATH_VARNAME = "PATH";
4442-const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
4443+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
4444 EOF
4445 else
4446 cat <<"EOF"
4447@@ -3539,12 +4343,10 @@ EOF
4448 cat <<"EOF"
4449
4450 #define LTWRAPPER_OPTION_PREFIX "--lt-"
4451-#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
4452
4453-static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
4454 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
4455-
4456 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
4457+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
4458
4459 int
4460 main (int argc, char *argv[])
4461@@ -3561,10 +4363,13 @@ main (int argc, char *argv[])
4462 int i;
4463
4464 program_name = (char *) xstrdup (base_name (argv[0]));
4465- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
4466- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
4467+ newargz = XMALLOC (char *, argc + 1);
4468
4469- /* very simple arg parsing; don't want to rely on getopt */
4470+ /* very simple arg parsing; don't want to rely on getopt
4471+ * also, copy all non cwrapper options to newargz, except
4472+ * argz[0], which is handled differently
4473+ */
4474+ newargc=0;
4475 for (i = 1; i < argc; i++)
4476 {
4477 if (strcmp (argv[i], dumpscript_opt) == 0)
4478@@ -3581,21 +4386,54 @@ EOF
4479 lt_dump_script (stdout);
4480 return 0;
4481 }
4482+ if (strcmp (argv[i], debug_opt) == 0)
4483+ {
4484+ lt_debug = 1;
4485+ continue;
4486+ }
4487+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4488+ {
4489+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4490+ namespace, but it is not one of the ones we know about and
4491+ have already dealt with, above (inluding dump-script), then
4492+ report an error. Otherwise, targets might begin to believe
4493+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4494+ namespace. The first time any user complains about this, we'll
4495+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4496+ or a configure.ac-settable value.
4497+ */
4498+ lt_fatal (__FILE__, __LINE__,
4499+ "unrecognized %s option: '%s'",
4500+ ltwrapper_option_prefix, argv[i]);
4501+ }
4502+ /* otherwise ... */
4503+ newargz[++newargc] = xstrdup (argv[i]);
4504 }
4505+ newargz[++newargc] = NULL;
4506+
4507+EOF
4508+ cat <<EOF
4509+ /* The GNU banner must be the first non-error debug message */
4510+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4511+EOF
4512+ cat <<"EOF"
4513+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4514+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4515
4516- newargz = XMALLOC (char *, argc + 1);
4517 tmp_pathspec = find_executable (argv[0]);
4518 if (tmp_pathspec == NULL)
4519- lt_fatal ("Couldn't find %s", argv[0]);
4520- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
4521- tmp_pathspec));
4522+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4523+ lt_debugprintf (__FILE__, __LINE__,
4524+ "(main) found exe (before symlink chase) at: %s\n",
4525+ tmp_pathspec);
4526
4527 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
4528- LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
4529- actual_cwrapper_path));
4530+ lt_debugprintf (__FILE__, __LINE__,
4531+ "(main) found exe (after symlink chase) at: %s\n",
4532+ actual_cwrapper_path);
4533 XFREE (tmp_pathspec);
4534
4535- actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
4536+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
4537 strendzap (actual_cwrapper_path, actual_cwrapper_name);
4538
4539 /* wrapper name transforms */
4540@@ -3613,8 +4451,9 @@ EOF
4541 target_name = tmp_pathspec;
4542 tmp_pathspec = 0;
4543
4544- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
4545- target_name));
4546+ lt_debugprintf (__FILE__, __LINE__,
4547+ "(main) libtool target name: %s\n",
4548+ target_name);
4549 EOF
4550
4551 cat <<EOF
4552@@ -3664,35 +4503,19 @@ EOF
4553
4554 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
4555 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4556- lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4557+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4558+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4559+ because on Windows, both *_VARNAMEs are PATH but uninstalled
4560+ libraries must come first. */
4561 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
4562+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4563
4564- newargc=0;
4565- for (i = 1; i < argc; i++)
4566- {
4567- if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
4568- {
4569- /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4570- namespace, but it is not one of the ones we know about and
4571- have already dealt with, above (inluding dump-script), then
4572- report an error. Otherwise, targets might begin to believe
4573- they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4574- namespace. The first time any user complains about this, we'll
4575- need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4576- or a configure.ac-settable value.
4577- */
4578- lt_fatal ("Unrecognized option in %s namespace: '%s'",
4579- ltwrapper_option_prefix, argv[i]);
4580- }
4581- /* otherwise ... */
4582- newargz[++newargc] = xstrdup (argv[i]);
4583- }
4584- newargz[++newargc] = NULL;
4585-
4586- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
4587+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4588+ nonnull (lt_argv_zero));
4589 for (i = 0; i < newargc; i++)
4590 {
4591- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
4592+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4593+ i, nonnull (newargz[i]));
4594 }
4595
4596 EOF
4597@@ -3706,7 +4529,9 @@ EOF
4598 if (rval == -1)
4599 {
4600 /* failed to start process */
4601- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
4602+ lt_debugprintf (__FILE__, __LINE__,
4603+ "(main) failed to launch target \"%s\": %s\n",
4604+ lt_argv_zero, nonnull (strerror (errno)));
4605 return 127;
4606 }
4607 return rval;
4608@@ -3728,7 +4553,7 @@ xmalloc (size_t num)
4609 {
4610 void *p = (void *) malloc (num);
4611 if (!p)
4612- lt_fatal ("Memory exhausted");
4613+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
4614
4615 return p;
4616 }
4617@@ -3762,8 +4587,8 @@ check_executable (const char *path)
4618 {
4619 struct stat st;
4620
4621- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
4622- path ? (*path ? path : "EMPTY!") : "NULL!"));
4623+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4624+ nonempty (path));
4625 if ((!path) || (!*path))
4626 return 0;
4627
4628@@ -3780,8 +4605,8 @@ make_executable (const char *path)
4629 int rval = 0;
4630 struct stat st;
4631
4632- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
4633- path ? (*path ? path : "EMPTY!") : "NULL!"));
4634+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4635+ nonempty (path));
4636 if ((!path) || (!*path))
4637 return 0;
4638
4639@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper)
4640 int tmp_len;
4641 char *concat_name;
4642
4643- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
4644- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
4645+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4646+ nonempty (wrapper));
4647
4648 if ((wrapper == NULL) || (*wrapper == '\0'))
4649 return NULL;
4650@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper)
4651 {
4652 /* empty path: current directory */
4653 if (getcwd (tmp, LT_PATHMAX) == NULL)
4654- lt_fatal ("getcwd failed");
4655+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4656+ nonnull (strerror (errno)));
4657 tmp_len = strlen (tmp);
4658 concat_name =
4659 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4660@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper)
4661 }
4662 /* Relative path | not found in path: prepend cwd */
4663 if (getcwd (tmp, LT_PATHMAX) == NULL)
4664- lt_fatal ("getcwd failed");
4665+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4666+ nonnull (strerror (errno)));
4667 tmp_len = strlen (tmp);
4668 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4669 memcpy (concat_name, tmp, tmp_len);
4670@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec)
4671 int has_symlinks = 0;
4672 while (strlen (tmp_pathspec) && !has_symlinks)
4673 {
4674- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
4675- tmp_pathspec));
4676+ lt_debugprintf (__FILE__, __LINE__,
4677+ "checking path component for symlinks: %s\n",
4678+ tmp_pathspec);
4679 if (lstat (tmp_pathspec, &s) == 0)
4680 {
4681 if (S_ISLNK (s.st_mode) != 0)
4682@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec)
4683 }
4684 else
4685 {
4686- char *errstr = strerror (errno);
4687- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
4688+ lt_fatal (__FILE__, __LINE__,
4689+ "error accessing file \"%s\": %s",
4690+ tmp_pathspec, nonnull (strerror (errno)));
4691 }
4692 }
4693 XFREE (tmp_pathspec);
4694@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec)
4695 tmp_pathspec = realpath (pathspec, buf);
4696 if (tmp_pathspec == 0)
4697 {
4698- lt_fatal ("Could not follow symlinks for %s", pathspec);
4699+ lt_fatal (__FILE__, __LINE__,
4700+ "could not follow symlinks for %s", pathspec);
4701 }
4702 return xstrdup (tmp_pathspec);
4703 #endif
4704@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat)
4705 return str;
4706 }
4707
4708+void
4709+lt_debugprintf (const char *file, int line, const char *fmt, ...)
4710+{
4711+ va_list args;
4712+ if (lt_debug)
4713+ {
4714+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4715+ va_start (args, fmt);
4716+ (void) vfprintf (stderr, fmt, args);
4717+ va_end (args);
4718+ }
4719+}
4720+
4721 static void
4722-lt_error_core (int exit_status, const char *mode,
4723+lt_error_core (int exit_status, const char *file,
4724+ int line, const char *mode,
4725 const char *message, va_list ap)
4726 {
4727- fprintf (stderr, "%s: %s: ", program_name, mode);
4728+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
4729 vfprintf (stderr, message, ap);
4730 fprintf (stderr, ".\n");
4731
4732@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const ch
4733 }
4734
4735 void
4736-lt_fatal (const char *message, ...)
4737+lt_fatal (const char *file, int line, const char *message, ...)
4738 {
4739 va_list ap;
4740 va_start (ap, message);
4741- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4742+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
4743 va_end (ap);
4744 }
4745
4746+static const char *
4747+nonnull (const char *s)
4748+{
4749+ return s ? s : "(null)";
4750+}
4751+
4752+static const char *
4753+nonempty (const char *s)
4754+{
4755+ return (s && !*s) ? "(empty)" : nonnull (s);
4756+}
4757+
4758 void
4759 lt_setenv (const char *name, const char *value)
4760 {
4761- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
4762- (name ? name : "<NULL>"),
4763- (value ? value : "<NULL>")));
4764+ lt_debugprintf (__FILE__, __LINE__,
4765+ "(lt_setenv) setting '%s' to '%s'\n",
4766+ nonnull (name), nonnull (value));
4767 {
4768 #ifdef HAVE_SETENV
4769 /* always make a copy, for consistency with !HAVE_SETENV */
4770@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, c
4771 void
4772 lt_update_exe_path (const char *name, const char *value)
4773 {
4774- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4775- (name ? name : "<NULL>"),
4776- (value ? value : "<NULL>")));
4777+ lt_debugprintf (__FILE__, __LINE__,
4778+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4779+ nonnull (name), nonnull (value));
4780
4781 if (name && *name && value && *value)
4782 {
4783@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, co
4784 void
4785 lt_update_lib_path (const char *name, const char *value)
4786 {
4787- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4788- (name ? name : "<NULL>"),
4789- (value ? value : "<NULL>")));
4790+ lt_debugprintf (__FILE__, __LINE__,
4791+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4792+ nonnull (name), nonnull (value));
4793
4794 if (name && *name && value && *value)
4795 {
4796@@ -4222,7 +5078,7 @@ EOF
4797 func_win32_import_lib_p ()
4798 {
4799 $opt_debug
4800- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in
4801+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
4802 *import*) : ;;
4803 *) false ;;
4804 esac
4805@@ -4401,9 +5257,9 @@ func_mode_link ()
4806 ;;
4807 *)
4808 if test "$prev" = dlfiles; then
4809- dlfiles="$dlfiles $arg"
4810+ func_append dlfiles " $arg"
4811 else
4812- dlprefiles="$dlprefiles $arg"
4813+ func_append dlprefiles " $arg"
4814 fi
4815 prev=
4816 continue
4817@@ -4427,7 +5283,7 @@ func_mode_link ()
4818 *-*-darwin*)
4819 case "$deplibs " in
4820 *" $qarg.ltframework "*) ;;
4821- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
4822+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
4823 ;;
4824 esac
4825 ;;
4826@@ -4446,7 +5302,7 @@ func_mode_link ()
4827 moreargs=
4828 for fil in `cat "$save_arg"`
4829 do
4830-# moreargs="$moreargs $fil"
4831+# func_append moreargs " $fil"
4832 arg=$fil
4833 # A libtool-controlled object.
4834
4835@@ -4475,7 +5331,7 @@ func_mode_link ()
4836
4837 if test "$prev" = dlfiles; then
4838 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4839- dlfiles="$dlfiles $pic_object"
4840+ func_append dlfiles " $pic_object"
4841 prev=
4842 continue
4843 else
4844@@ -4487,7 +5343,7 @@ func_mode_link ()
4845 # CHECK ME: I think I busted this. -Ossama
4846 if test "$prev" = dlprefiles; then
4847 # Preload the old-style object.
4848- dlprefiles="$dlprefiles $pic_object"
4849+ func_append dlprefiles " $pic_object"
4850 prev=
4851 fi
4852
4853@@ -4557,12 +5413,12 @@ func_mode_link ()
4854 if test "$prev" = rpath; then
4855 case "$rpath " in
4856 *" $arg "*) ;;
4857- *) rpath="$rpath $arg" ;;
4858+ *) func_append rpath " $arg" ;;
4859 esac
4860 else
4861 case "$xrpath " in
4862 *" $arg "*) ;;
4863- *) xrpath="$xrpath $arg" ;;
4864+ *) func_append xrpath " $arg" ;;
4865 esac
4866 fi
4867 prev=
4868@@ -4574,28 +5430,28 @@ func_mode_link ()
4869 continue
4870 ;;
4871 weak)
4872- weak_libs="$weak_libs $arg"
4873+ func_append weak_libs " $arg"
4874 prev=
4875 continue
4876 ;;
4877 xcclinker)
4878- linker_flags="$linker_flags $qarg"
4879- compiler_flags="$compiler_flags $qarg"
4880+ func_append linker_flags " $qarg"
4881+ func_append compiler_flags " $qarg"
4882 prev=
4883 func_append compile_command " $qarg"
4884 func_append finalize_command " $qarg"
4885 continue
4886 ;;
4887 xcompiler)
4888- compiler_flags="$compiler_flags $qarg"
4889+ func_append compiler_flags " $qarg"
4890 prev=
4891 func_append compile_command " $qarg"
4892 func_append finalize_command " $qarg"
4893 continue
4894 ;;
4895 xlinker)
4896- linker_flags="$linker_flags $qarg"
4897- compiler_flags="$compiler_flags $wl$qarg"
4898+ func_append linker_flags " $qarg"
4899+ func_append compiler_flags " $wl$qarg"
4900 prev=
4901 func_append compile_command " $wl$qarg"
4902 func_append finalize_command " $wl$qarg"
4903@@ -4686,15 +5542,16 @@ func_mode_link ()
4904 ;;
4905
4906 -L*)
4907- func_stripname '-L' '' "$arg"
4908- dir=$func_stripname_result
4909- if test -z "$dir"; then
4910+ func_stripname "-L" '' "$arg"
4911+ if test -z "$func_stripname_result"; then
4912 if test "$#" -gt 0; then
4913 func_fatal_error "require no space between \`-L' and \`$1'"
4914 else
4915 func_fatal_error "need path for \`-L' option"
4916 fi
4917 fi
4918+ func_resolve_sysroot "$func_stripname_result"
4919+ dir=$func_resolve_sysroot_result
4920 # We need an absolute path.
4921 case $dir in
4922 [\\/]* | [A-Za-z]:[\\/]*) ;;
4923@@ -4706,10 +5563,16 @@ func_mode_link ()
4924 ;;
4925 esac
4926 case "$deplibs " in
4927- *" -L$dir "*) ;;
4928+ *" -L$dir "* | *" $arg "*)
4929+ # Will only happen for absolute or sysroot arguments
4930+ ;;
4931 *)
4932- deplibs="$deplibs -L$dir"
4933- lib_search_path="$lib_search_path $dir"
4934+ # Preserve sysroot, but never include relative directories
4935+ case $dir in
4936+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
4937+ *) func_append deplibs " -L$dir" ;;
4938+ esac
4939+ func_append lib_search_path " $dir"
4940 ;;
4941 esac
4942 case $host in
4943@@ -4718,12 +5581,12 @@ func_mode_link ()
4944 case :$dllsearchpath: in
4945 *":$dir:"*) ;;
4946 ::) dllsearchpath=$dir;;
4947- *) dllsearchpath="$dllsearchpath:$dir";;
4948+ *) func_append dllsearchpath ":$dir";;
4949 esac
4950 case :$dllsearchpath: in
4951 *":$testbindir:"*) ;;
4952 ::) dllsearchpath=$testbindir;;
4953- *) dllsearchpath="$dllsearchpath:$testbindir";;
4954+ *) func_append dllsearchpath ":$testbindir";;
4955 esac
4956 ;;
4957 esac
4958@@ -4747,7 +5610,7 @@ func_mode_link ()
4959 ;;
4960 *-*-rhapsody* | *-*-darwin1.[012])
4961 # Rhapsody C and math libraries are in the System framework
4962- deplibs="$deplibs System.ltframework"
4963+ func_append deplibs " System.ltframework"
4964 continue
4965 ;;
4966 *-*-sco3.2v5* | *-*-sco5v6*)
4967@@ -4758,9 +5621,6 @@ func_mode_link ()
4968 # Compiler inserts libc in the correct place for threads to work
4969 test "X$arg" = "X-lc" && continue
4970 ;;
4971- *-*-linux*)
4972- test "X$arg" = "X-lc" && continue
4973- ;;
4974 esac
4975 elif test "X$arg" = "X-lc_r"; then
4976 case $host in
4977@@ -4770,7 +5630,7 @@ func_mode_link ()
4978 ;;
4979 esac
4980 fi
4981- deplibs="$deplibs $arg"
4982+ func_append deplibs " $arg"
4983 continue
4984 ;;
4985
4986@@ -4782,8 +5642,8 @@ func_mode_link ()
4987 # Tru64 UNIX uses -model [arg] to determine the layout of C++
4988 # classes, name mangling, and exception handling.
4989 # Darwin uses the -arch flag to determine output architecture.
4990- -model|-arch|-isysroot)
4991- compiler_flags="$compiler_flags $arg"
4992+ -model|-arch|-isysroot|--sysroot)
4993+ func_append compiler_flags " $arg"
4994 func_append compile_command " $arg"
4995 func_append finalize_command " $arg"
4996 prev=xcompiler
4997@@ -4791,12 +5651,12 @@ func_mode_link ()
4998 ;;
4999
5000 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5001- compiler_flags="$compiler_flags $arg"
5002+ func_append compiler_flags " $arg"
5003 func_append compile_command " $arg"
5004 func_append finalize_command " $arg"
5005 case "$new_inherited_linker_flags " in
5006 *" $arg "*) ;;
5007- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
5008+ * ) func_append new_inherited_linker_flags " $arg" ;;
5009 esac
5010 continue
5011 ;;
5012@@ -4863,13 +5723,17 @@ func_mode_link ()
5013 # We need an absolute path.
5014 case $dir in
5015 [\\/]* | [A-Za-z]:[\\/]*) ;;
5016+ =*)
5017+ func_stripname '=' '' "$dir"
5018+ dir=$lt_sysroot$func_stripname_result
5019+ ;;
5020 *)
5021 func_fatal_error "only absolute run-paths are allowed"
5022 ;;
5023 esac
5024 case "$xrpath " in
5025 *" $dir "*) ;;
5026- *) xrpath="$xrpath $dir" ;;
5027+ *) func_append xrpath " $dir" ;;
5028 esac
5029 continue
5030 ;;
5031@@ -4922,8 +5786,8 @@ func_mode_link ()
5032 for flag in $args; do
5033 IFS="$save_ifs"
5034 func_quote_for_eval "$flag"
5035- arg="$arg $func_quote_for_eval_result"
5036- compiler_flags="$compiler_flags $func_quote_for_eval_result"
5037+ func_append arg " $func_quote_for_eval_result"
5038+ func_append compiler_flags " $func_quote_for_eval_result"
5039 done
5040 IFS="$save_ifs"
5041 func_stripname ' ' '' "$arg"
5042@@ -4938,9 +5802,9 @@ func_mode_link ()
5043 for flag in $args; do
5044 IFS="$save_ifs"
5045 func_quote_for_eval "$flag"
5046- arg="$arg $wl$func_quote_for_eval_result"
5047- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
5048- linker_flags="$linker_flags $func_quote_for_eval_result"
5049+ func_append arg " $wl$func_quote_for_eval_result"
5050+ func_append compiler_flags " $wl$func_quote_for_eval_result"
5051+ func_append linker_flags " $func_quote_for_eval_result"
5052 done
5053 IFS="$save_ifs"
5054 func_stripname ' ' '' "$arg"
5055@@ -4968,24 +5832,27 @@ func_mode_link ()
5056 arg="$func_quote_for_eval_result"
5057 ;;
5058
5059- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
5060- # -r[0-9][0-9]* specifies the processor on the SGI compiler
5061- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
5062- # +DA*, +DD* enable 64-bit mode on the HP compiler
5063- # -q* pass through compiler args for the IBM compiler
5064- # -m*, -t[45]*, -txscale* pass through architecture-specific
5065- # compiler args for GCC
5066- # -F/path gives path to uninstalled frameworks, gcc on darwin
5067- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
5068- # @file GCC response files
5069- # -tp=* Portland pgcc target processor selection
5070+ # Flags to be passed through unchanged, with rationale:
5071+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5072+ # -r[0-9][0-9]* specify processor for the SGI compiler
5073+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5074+ # +DA*, +DD* enable 64-bit mode for the HP compiler
5075+ # -q* compiler args for the IBM compiler
5076+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5077+ # -F/path path to uninstalled frameworks, gcc on darwin
5078+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5079+ # @file GCC response files
5080+ # -tp=* Portland pgcc target processor selection
5081+ # --sysroot=* for sysroot support
5082+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
5083 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
5084- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
5085+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5086+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
5087 func_quote_for_eval "$arg"
5088 arg="$func_quote_for_eval_result"
5089 func_append compile_command " $arg"
5090 func_append finalize_command " $arg"
5091- compiler_flags="$compiler_flags $arg"
5092+ func_append compiler_flags " $arg"
5093 continue
5094 ;;
5095
5096@@ -4997,7 +5864,7 @@ func_mode_link ()
5097
5098 *.$objext)
5099 # A standard object.
5100- objs="$objs $arg"
5101+ func_append objs " $arg"
5102 ;;
5103
5104 *.lo)
5105@@ -5028,7 +5895,7 @@ func_mode_link ()
5106
5107 if test "$prev" = dlfiles; then
5108 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5109- dlfiles="$dlfiles $pic_object"
5110+ func_append dlfiles " $pic_object"
5111 prev=
5112 continue
5113 else
5114@@ -5040,7 +5907,7 @@ func_mode_link ()
5115 # CHECK ME: I think I busted this. -Ossama
5116 if test "$prev" = dlprefiles; then
5117 # Preload the old-style object.
5118- dlprefiles="$dlprefiles $pic_object"
5119+ func_append dlprefiles " $pic_object"
5120 prev=
5121 fi
5122
5123@@ -5085,24 +5952,25 @@ func_mode_link ()
5124
5125 *.$libext)
5126 # An archive.
5127- deplibs="$deplibs $arg"
5128- old_deplibs="$old_deplibs $arg"
5129+ func_append deplibs " $arg"
5130+ func_append old_deplibs " $arg"
5131 continue
5132 ;;
5133
5134 *.la)
5135 # A libtool-controlled library.
5136
5137+ func_resolve_sysroot "$arg"
5138 if test "$prev" = dlfiles; then
5139 # This library was specified with -dlopen.
5140- dlfiles="$dlfiles $arg"
5141+ func_append dlfiles " $func_resolve_sysroot_result"
5142 prev=
5143 elif test "$prev" = dlprefiles; then
5144 # The library was specified with -dlpreopen.
5145- dlprefiles="$dlprefiles $arg"
5146+ func_append dlprefiles " $func_resolve_sysroot_result"
5147 prev=
5148 else
5149- deplibs="$deplibs $arg"
5150+ func_append deplibs " $func_resolve_sysroot_result"
5151 fi
5152 continue
5153 ;;
5154@@ -5127,7 +5995,7 @@ func_mode_link ()
5155 func_fatal_help "the \`$prevarg' option requires an argument"
5156
5157 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
5158- eval "arg=\"$export_dynamic_flag_spec\""
5159+ eval arg=\"$export_dynamic_flag_spec\"
5160 func_append compile_command " $arg"
5161 func_append finalize_command " $arg"
5162 fi
5163@@ -5144,11 +6012,13 @@ func_mode_link ()
5164 else
5165 shlib_search_path=
5166 fi
5167- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\""
5168- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\""
5169+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
5170+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
5171
5172 func_dirname "$output" "/" ""
5173 output_objdir="$func_dirname_result$objdir"
5174+ func_to_tool_file "$output_objdir/"
5175+ tool_output_objdir=$func_to_tool_file_result
5176 # Create the object directory.
5177 func_mkdir_p "$output_objdir"
5178
5179@@ -5169,12 +6039,12 @@ func_mode_link ()
5180 # Find all interdependent deplibs by searching for libraries
5181 # that are linked more than once (e.g. -la -lb -la)
5182 for deplib in $deplibs; do
5183- if $opt_duplicate_deps ; then
5184+ if $opt_preserve_dup_deps ; then
5185 case "$libs " in
5186- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5187+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
5188 esac
5189 fi
5190- libs="$libs $deplib"
5191+ func_append libs " $deplib"
5192 done
5193
5194 if test "$linkmode" = lib; then
5195@@ -5187,9 +6057,9 @@ func_mode_link ()
5196 if $opt_duplicate_compiler_generated_deps; then
5197 for pre_post_dep in $predeps $postdeps; do
5198 case "$pre_post_deps " in
5199- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
5200+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
5201 esac
5202- pre_post_deps="$pre_post_deps $pre_post_dep"
5203+ func_append pre_post_deps " $pre_post_dep"
5204 done
5205 fi
5206 pre_post_deps=
5207@@ -5256,8 +6126,9 @@ func_mode_link ()
5208 for lib in $dlprefiles; do
5209 # Ignore non-libtool-libs
5210 dependency_libs=
5211+ func_resolve_sysroot "$lib"
5212 case $lib in
5213- *.la) func_source "$lib" ;;
5214+ *.la) func_source "$func_resolve_sysroot_result" ;;
5215 esac
5216
5217 # Collect preopened libtool deplibs, except any this library
5218@@ -5267,7 +6138,7 @@ func_mode_link ()
5219 deplib_base=$func_basename_result
5220 case " $weak_libs " in
5221 *" $deplib_base "*) ;;
5222- *) deplibs="$deplibs $deplib" ;;
5223+ *) func_append deplibs " $deplib" ;;
5224 esac
5225 done
5226 done
5227@@ -5288,11 +6159,11 @@ func_mode_link ()
5228 compile_deplibs="$deplib $compile_deplibs"
5229 finalize_deplibs="$deplib $finalize_deplibs"
5230 else
5231- compiler_flags="$compiler_flags $deplib"
5232+ func_append compiler_flags " $deplib"
5233 if test "$linkmode" = lib ; then
5234 case "$new_inherited_linker_flags " in
5235 *" $deplib "*) ;;
5236- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5237+ * ) func_append new_inherited_linker_flags " $deplib" ;;
5238 esac
5239 fi
5240 fi
5241@@ -5377,7 +6248,7 @@ func_mode_link ()
5242 if test "$linkmode" = lib ; then
5243 case "$new_inherited_linker_flags " in
5244 *" $deplib "*) ;;
5245- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5246+ * ) func_append new_inherited_linker_flags " $deplib" ;;
5247 esac
5248 fi
5249 fi
5250@@ -5390,7 +6261,8 @@ func_mode_link ()
5251 test "$pass" = conv && continue
5252 newdependency_libs="$deplib $newdependency_libs"
5253 func_stripname '-L' '' "$deplib"
5254- newlib_search_path="$newlib_search_path $func_stripname_result"
5255+ func_resolve_sysroot "$func_stripname_result"
5256+ func_append newlib_search_path " $func_resolve_sysroot_result"
5257 ;;
5258 prog)
5259 if test "$pass" = conv; then
5260@@ -5404,7 +6276,8 @@ func_mode_link ()
5261 finalize_deplibs="$deplib $finalize_deplibs"
5262 fi
5263 func_stripname '-L' '' "$deplib"
5264- newlib_search_path="$newlib_search_path $func_stripname_result"
5265+ func_resolve_sysroot "$func_stripname_result"
5266+ func_append newlib_search_path " $func_resolve_sysroot_result"
5267 ;;
5268 *)
5269 func_warning "\`-L' is ignored for archives/objects"
5270@@ -5415,17 +6288,21 @@ func_mode_link ()
5271 -R*)
5272 if test "$pass" = link; then
5273 func_stripname '-R' '' "$deplib"
5274- dir=$func_stripname_result
5275+ func_resolve_sysroot "$func_stripname_result"
5276+ dir=$func_resolve_sysroot_result
5277 # Make sure the xrpath contains only unique directories.
5278 case "$xrpath " in
5279 *" $dir "*) ;;
5280- *) xrpath="$xrpath $dir" ;;
5281+ *) func_append xrpath " $dir" ;;
5282 esac
5283 fi
5284 deplibs="$deplib $deplibs"
5285 continue
5286 ;;
5287- *.la) lib="$deplib" ;;
5288+ *.la)
5289+ func_resolve_sysroot "$deplib"
5290+ lib=$func_resolve_sysroot_result
5291+ ;;
5292 *.$libext)
5293 if test "$pass" = conv; then
5294 deplibs="$deplib $deplibs"
5295@@ -5488,11 +6365,11 @@ func_mode_link ()
5296 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5297 # If there is no dlopen support or we're linking statically,
5298 # we need to preload.
5299- newdlprefiles="$newdlprefiles $deplib"
5300+ func_append newdlprefiles " $deplib"
5301 compile_deplibs="$deplib $compile_deplibs"
5302 finalize_deplibs="$deplib $finalize_deplibs"
5303 else
5304- newdlfiles="$newdlfiles $deplib"
5305+ func_append newdlfiles " $deplib"
5306 fi
5307 fi
5308 continue
5309@@ -5538,7 +6415,7 @@ func_mode_link ()
5310 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
5311 case " $new_inherited_linker_flags " in
5312 *" $tmp_inherited_linker_flag "*) ;;
5313- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
5314+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
5315 esac
5316 done
5317 fi
5318@@ -5546,8 +6423,8 @@ func_mode_link ()
5319 if test "$linkmode,$pass" = "lib,link" ||
5320 test "$linkmode,$pass" = "prog,scan" ||
5321 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5322- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5323- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
5324+ test -n "$dlopen" && func_append dlfiles " $dlopen"
5325+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
5326 fi
5327
5328 if test "$pass" = conv; then
5329@@ -5558,20 +6435,20 @@ func_mode_link ()
5330 func_fatal_error "cannot find name of link library for \`$lib'"
5331 fi
5332 # It is a libtool convenience library, so add in its objects.
5333- convenience="$convenience $ladir/$objdir/$old_library"
5334- old_convenience="$old_convenience $ladir/$objdir/$old_library"
5335+ func_append convenience " $ladir/$objdir/$old_library"
5336+ func_append old_convenience " $ladir/$objdir/$old_library"
5337 elif test "$linkmode" != prog && test "$linkmode" != lib; then
5338 func_fatal_error "\`$lib' is not a convenience library"
5339 fi
5340 tmp_libs=
5341 for deplib in $dependency_libs; do
5342 deplibs="$deplib $deplibs"
5343- if $opt_duplicate_deps ; then
5344+ if $opt_preserve_dup_deps ; then
5345 case "$tmp_libs " in
5346- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5347+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
5348 esac
5349 fi
5350- tmp_libs="$tmp_libs $deplib"
5351+ func_append tmp_libs " $deplib"
5352 done
5353 continue
5354 fi # $pass = conv
5355@@ -5579,9 +6456,15 @@ func_mode_link ()
5356
5357 # Get the name of the library we link against.
5358 linklib=
5359- for l in $old_library $library_names; do
5360- linklib="$l"
5361- done
5362+ if test -n "$old_library" &&
5363+ { test "$prefer_static_libs" = yes ||
5364+ test "$prefer_static_libs,$installed" = "built,no"; }; then
5365+ linklib=$old_library
5366+ else
5367+ for l in $old_library $library_names; do
5368+ linklib="$l"
5369+ done
5370+ fi
5371 if test -z "$linklib"; then
5372 func_fatal_error "cannot find name of link library for \`$lib'"
5373 fi
5374@@ -5598,9 +6481,9 @@ func_mode_link ()
5375 # statically, we need to preload. We also need to preload any
5376 # dependent libraries so libltdl's deplib preloader doesn't
5377 # bomb out in the load deplibs phase.
5378- dlprefiles="$dlprefiles $lib $dependency_libs"
5379+ func_append dlprefiles " $lib $dependency_libs"
5380 else
5381- newdlfiles="$newdlfiles $lib"
5382+ func_append newdlfiles " $lib"
5383 fi
5384 continue
5385 fi # $pass = dlopen
5386@@ -5622,14 +6505,14 @@ func_mode_link ()
5387
5388 # Find the relevant object directory and library name.
5389 if test "X$installed" = Xyes; then
5390- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5391+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5392 func_warning "library \`$lib' was moved."
5393 dir="$ladir"
5394 absdir="$abs_ladir"
5395 libdir="$abs_ladir"
5396 else
5397- dir="$libdir"
5398- absdir="$libdir"
5399+ dir="$lt_sysroot$libdir"
5400+ absdir="$lt_sysroot$libdir"
5401 fi
5402 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5403 else
5404@@ -5637,12 +6520,12 @@ func_mode_link ()
5405 dir="$ladir"
5406 absdir="$abs_ladir"
5407 # Remove this search path later
5408- notinst_path="$notinst_path $abs_ladir"
5409+ func_append notinst_path " $abs_ladir"
5410 else
5411 dir="$ladir/$objdir"
5412 absdir="$abs_ladir/$objdir"
5413 # Remove this search path later
5414- notinst_path="$notinst_path $abs_ladir"
5415+ func_append notinst_path " $abs_ladir"
5416 fi
5417 fi # $installed = yes
5418 func_stripname 'lib' '.la' "$laname"
5419@@ -5653,20 +6536,46 @@ func_mode_link ()
5420 if test -z "$libdir" && test "$linkmode" = prog; then
5421 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
5422 fi
5423- # Prefer using a static library (so that no silly _DYNAMIC symbols
5424- # are required to link).
5425- if test -n "$old_library"; then
5426- newdlprefiles="$newdlprefiles $dir/$old_library"
5427- # Keep a list of preopened convenience libraries to check
5428- # that they are being used correctly in the link pass.
5429- test -z "$libdir" && \
5430- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5431- # Otherwise, use the dlname, so that lt_dlopen finds it.
5432- elif test -n "$dlname"; then
5433- newdlprefiles="$newdlprefiles $dir/$dlname"
5434- else
5435- newdlprefiles="$newdlprefiles $dir/$linklib"
5436- fi
5437+ case "$host" in
5438+ # special handling for platforms with PE-DLLs.
5439+ *cygwin* | *mingw* | *cegcc* )
5440+ # Linker will automatically link against shared library if both
5441+ # static and shared are present. Therefore, ensure we extract
5442+ # symbols from the import library if a shared library is present
5443+ # (otherwise, the dlopen module name will be incorrect). We do
5444+ # this by putting the import library name into $newdlprefiles.
5445+ # We recover the dlopen module name by 'saving' the la file
5446+ # name in a special purpose variable, and (later) extracting the
5447+ # dlname from the la file.
5448+ if test -n "$dlname"; then
5449+ func_tr_sh "$dir/$linklib"
5450+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
5451+ func_append newdlprefiles " $dir/$linklib"
5452+ else
5453+ func_append newdlprefiles " $dir/$old_library"
5454+ # Keep a list of preopened convenience libraries to check
5455+ # that they are being used correctly in the link pass.
5456+ test -z "$libdir" && \
5457+ func_append dlpreconveniencelibs " $dir/$old_library"
5458+ fi
5459+ ;;
5460+ * )
5461+ # Prefer using a static library (so that no silly _DYNAMIC symbols
5462+ # are required to link).
5463+ if test -n "$old_library"; then
5464+ func_append newdlprefiles " $dir/$old_library"
5465+ # Keep a list of preopened convenience libraries to check
5466+ # that they are being used correctly in the link pass.
5467+ test -z "$libdir" && \
5468+ func_append dlpreconveniencelibs " $dir/$old_library"
5469+ # Otherwise, use the dlname, so that lt_dlopen finds it.
5470+ elif test -n "$dlname"; then
5471+ func_append newdlprefiles " $dir/$dlname"
5472+ else
5473+ func_append newdlprefiles " $dir/$linklib"
5474+ fi
5475+ ;;
5476+ esac
5477 fi # $pass = dlpreopen
5478
5479 if test -z "$libdir"; then
5480@@ -5684,7 +6593,7 @@ func_mode_link ()
5481
5482
5483 if test "$linkmode" = prog && test "$pass" != link; then
5484- newlib_search_path="$newlib_search_path $ladir"
5485+ func_append newlib_search_path " $ladir"
5486 deplibs="$lib $deplibs"
5487
5488 linkalldeplibs=no
5489@@ -5697,7 +6606,8 @@ func_mode_link ()
5490 for deplib in $dependency_libs; do
5491 case $deplib in
5492 -L*) func_stripname '-L' '' "$deplib"
5493- newlib_search_path="$newlib_search_path $func_stripname_result"
5494+ func_resolve_sysroot "$func_stripname_result"
5495+ func_append newlib_search_path " $func_resolve_sysroot_result"
5496 ;;
5497 esac
5498 # Need to link against all dependency_libs?
5499@@ -5708,12 +6618,12 @@ func_mode_link ()
5500 # or/and link against static libraries
5501 newdependency_libs="$deplib $newdependency_libs"
5502 fi
5503- if $opt_duplicate_deps ; then
5504+ if $opt_preserve_dup_deps ; then
5505 case "$tmp_libs " in
5506- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5507+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
5508 esac
5509 fi
5510- tmp_libs="$tmp_libs $deplib"
5511+ func_append tmp_libs " $deplib"
5512 done # for deplib
5513 continue
5514 fi # $linkmode = prog...
5515@@ -5728,7 +6638,7 @@ func_mode_link ()
5516 # Make sure the rpath contains only unique directories.
5517 case "$temp_rpath:" in
5518 *"$absdir:"*) ;;
5519- *) temp_rpath="$temp_rpath$absdir:" ;;
5520+ *) func_append temp_rpath "$absdir:" ;;
5521 esac
5522 fi
5523
5524@@ -5740,7 +6650,7 @@ func_mode_link ()
5525 *)
5526 case "$compile_rpath " in
5527 *" $absdir "*) ;;
5528- *) compile_rpath="$compile_rpath $absdir"
5529+ *) func_append compile_rpath " $absdir" ;;
5530 esac
5531 ;;
5532 esac
5533@@ -5749,7 +6659,7 @@ func_mode_link ()
5534 *)
5535 case "$finalize_rpath " in
5536 *" $libdir "*) ;;
5537- *) finalize_rpath="$finalize_rpath $libdir"
5538+ *) func_append finalize_rpath " $libdir" ;;
5539 esac
5540 ;;
5541 esac
5542@@ -5774,12 +6684,12 @@ func_mode_link ()
5543 case $host in
5544 *cygwin* | *mingw* | *cegcc*)
5545 # No point in relinking DLLs because paths are not encoded
5546- notinst_deplibs="$notinst_deplibs $lib"
5547+ func_append notinst_deplibs " $lib"
5548 need_relink=no
5549 ;;
5550 *)
5551 if test "$installed" = no; then
5552- notinst_deplibs="$notinst_deplibs $lib"
5553+ func_append notinst_deplibs " $lib"
5554 need_relink=yes
5555 fi
5556 ;;
5557@@ -5814,7 +6724,7 @@ func_mode_link ()
5558 *)
5559 case "$compile_rpath " in
5560 *" $absdir "*) ;;
5561- *) compile_rpath="$compile_rpath $absdir"
5562+ *) func_append compile_rpath " $absdir" ;;
5563 esac
5564 ;;
5565 esac
5566@@ -5823,7 +6733,7 @@ func_mode_link ()
5567 *)
5568 case "$finalize_rpath " in
5569 *" $libdir "*) ;;
5570- *) finalize_rpath="$finalize_rpath $libdir"
5571+ *) func_append finalize_rpath " $libdir" ;;
5572 esac
5573 ;;
5574 esac
5575@@ -5835,7 +6745,7 @@ func_mode_link ()
5576 shift
5577 realname="$1"
5578 shift
5579- eval "libname=\"$libname_spec\""
5580+ libname=`eval "\\$ECHO \"$libname_spec\""`
5581 # use dlname if we got it. it's perfectly good, no?
5582 if test -n "$dlname"; then
5583 soname="$dlname"
5584@@ -5848,7 +6758,7 @@ func_mode_link ()
5585 versuffix="-$major"
5586 ;;
5587 esac
5588- eval "soname=\"$soname_spec\""
5589+ eval soname=\"$soname_spec\"
5590 else
5591 soname="$realname"
5592 fi
5593@@ -5877,7 +6787,7 @@ func_mode_link ()
5594 linklib=$newlib
5595 fi # test -n "$old_archive_from_expsyms_cmds"
5596
5597- if test "$linkmode" = prog || test "$mode" != relink; then
5598+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
5599 add_shlibpath=
5600 add_dir=
5601 add=
5602@@ -5933,7 +6843,7 @@ func_mode_link ()
5603 if test -n "$inst_prefix_dir"; then
5604 case $libdir in
5605 [\\/]*)
5606- add_dir="$add_dir -L$inst_prefix_dir$libdir"
5607+ func_append add_dir " -L$inst_prefix_dir$libdir"
5608 ;;
5609 esac
5610 fi
5611@@ -5955,7 +6865,7 @@ func_mode_link ()
5612 if test -n "$add_shlibpath"; then
5613 case :$compile_shlibpath: in
5614 *":$add_shlibpath:"*) ;;
5615- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
5616+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
5617 esac
5618 fi
5619 if test "$linkmode" = prog; then
5620@@ -5969,13 +6879,13 @@ func_mode_link ()
5621 test "$hardcode_shlibpath_var" = yes; then
5622 case :$finalize_shlibpath: in
5623 *":$libdir:"*) ;;
5624- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5625+ *) func_append finalize_shlibpath "$libdir:" ;;
5626 esac
5627 fi
5628 fi
5629 fi
5630
5631- if test "$linkmode" = prog || test "$mode" = relink; then
5632+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
5633 add_shlibpath=
5634 add_dir=
5635 add=
5636@@ -5989,7 +6899,7 @@ func_mode_link ()
5637 elif test "$hardcode_shlibpath_var" = yes; then
5638 case :$finalize_shlibpath: in
5639 *":$libdir:"*) ;;
5640- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5641+ *) func_append finalize_shlibpath "$libdir:" ;;
5642 esac
5643 add="-l$name"
5644 elif test "$hardcode_automatic" = yes; then
5645@@ -6001,12 +6911,12 @@ func_mode_link ()
5646 fi
5647 else
5648 # We cannot seem to hardcode it, guess we'll fake it.
5649- add_dir="-L$libdir"
5650+ add_dir="-L$lt_sysroot$libdir"
5651 # Try looking first in the location we're being installed to.
5652 if test -n "$inst_prefix_dir"; then
5653 case $libdir in
5654 [\\/]*)
5655- add_dir="$add_dir -L$inst_prefix_dir$libdir"
5656+ func_append add_dir " -L$inst_prefix_dir$libdir"
5657 ;;
5658 esac
5659 fi
5660@@ -6083,27 +6993,33 @@ func_mode_link ()
5661 temp_xrpath=$func_stripname_result
5662 case " $xrpath " in
5663 *" $temp_xrpath "*) ;;
5664- *) xrpath="$xrpath $temp_xrpath";;
5665+ *) func_append xrpath " $temp_xrpath";;
5666 esac;;
5667- *) temp_deplibs="$temp_deplibs $libdir";;
5668+ *) func_append temp_deplibs " $libdir";;
5669 esac
5670 done
5671 dependency_libs="$temp_deplibs"
5672 fi
5673
5674- newlib_search_path="$newlib_search_path $absdir"
5675+ func_append newlib_search_path " $absdir"
5676 # Link against this library
5677 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
5678 # ... and its dependency_libs
5679 tmp_libs=
5680 for deplib in $dependency_libs; do
5681 newdependency_libs="$deplib $newdependency_libs"
5682- if $opt_duplicate_deps ; then
5683+ case $deplib in
5684+ -L*) func_stripname '-L' '' "$deplib"
5685+ func_resolve_sysroot "$func_stripname_result";;
5686+ *) func_resolve_sysroot "$deplib" ;;
5687+ esac
5688+ if $opt_preserve_dup_deps ; then
5689 case "$tmp_libs " in
5690- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5691+ *" $func_resolve_sysroot_result "*)
5692+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
5693 esac
5694 fi
5695- tmp_libs="$tmp_libs $deplib"
5696+ func_append tmp_libs " $func_resolve_sysroot_result"
5697 done
5698
5699 if test "$link_all_deplibs" != no; then
5700@@ -6113,8 +7029,10 @@ func_mode_link ()
5701 case $deplib in
5702 -L*) path="$deplib" ;;
5703 *.la)
5704+ func_resolve_sysroot "$deplib"
5705+ deplib=$func_resolve_sysroot_result
5706 func_dirname "$deplib" "" "."
5707- dir="$func_dirname_result"
5708+ dir=$func_dirname_result
5709 # We need an absolute path.
5710 case $dir in
5711 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
5712@@ -6130,7 +7048,7 @@ func_mode_link ()
5713 case $host in
5714 *-*-darwin*)
5715 depdepl=
5716- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
5717+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
5718 if test -n "$deplibrary_names" ; then
5719 for tmp in $deplibrary_names ; do
5720 depdepl=$tmp
5721@@ -6141,8 +7059,8 @@ func_mode_link ()
5722 if test -z "$darwin_install_name"; then
5723 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5724 fi
5725- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5726- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
5727+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5728+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
5729 path=
5730 fi
5731 fi
5732@@ -6152,7 +7070,7 @@ func_mode_link ()
5733 ;;
5734 esac
5735 else
5736- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5737+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5738 test -z "$libdir" && \
5739 func_fatal_error "\`$deplib' is not a valid libtool archive"
5740 test "$absdir" != "$libdir" && \
5741@@ -6192,7 +7110,7 @@ func_mode_link ()
5742 for dir in $newlib_search_path; do
5743 case "$lib_search_path " in
5744 *" $dir "*) ;;
5745- *) lib_search_path="$lib_search_path $dir" ;;
5746+ *) func_append lib_search_path " $dir" ;;
5747 esac
5748 done
5749 newlib_search_path=
5750@@ -6205,7 +7123,7 @@ func_mode_link ()
5751 fi
5752 for var in $vars dependency_libs; do
5753 # Add libraries to $var in reverse order
5754- eval tmp_libs=\$$var
5755+ eval tmp_libs=\"\$$var\"
5756 new_libs=
5757 for deplib in $tmp_libs; do
5758 # FIXME: Pedantically, this is the right thing to do, so
5759@@ -6250,13 +7168,13 @@ func_mode_link ()
5760 -L*)
5761 case " $tmp_libs " in
5762 *" $deplib "*) ;;
5763- *) tmp_libs="$tmp_libs $deplib" ;;
5764+ *) func_append tmp_libs " $deplib" ;;
5765 esac
5766 ;;
5767- *) tmp_libs="$tmp_libs $deplib" ;;
5768+ *) func_append tmp_libs " $deplib" ;;
5769 esac
5770 done
5771- eval $var=\$tmp_libs
5772+ eval $var=\"$tmp_libs\"
5773 done # for var
5774 fi
5775 # Last step: remove runtime libs from dependency_libs
5776@@ -6269,7 +7187,7 @@ func_mode_link ()
5777 ;;
5778 esac
5779 if test -n "$i" ; then
5780- tmp_libs="$tmp_libs $i"
5781+ func_append tmp_libs " $i"
5782 fi
5783 done
5784 dependency_libs=$tmp_libs
5785@@ -6310,7 +7228,7 @@ func_mode_link ()
5786 # Now set the variables for building old libraries.
5787 build_libtool_libs=no
5788 oldlibs="$output"
5789- objs="$objs$old_deplibs"
5790+ func_append objs "$old_deplibs"
5791 ;;
5792
5793 lib)
5794@@ -6319,8 +7237,8 @@ func_mode_link ()
5795 lib*)
5796 func_stripname 'lib' '.la' "$outputname"
5797 name=$func_stripname_result
5798- eval "shared_ext=\"$shrext_cmds\""
5799- eval "libname=\"$libname_spec\""
5800+ eval shared_ext=\"$shrext_cmds\"
5801+ eval libname=\"$libname_spec\"
5802 ;;
5803 *)
5804 test "$module" = no && \
5805@@ -6330,8 +7248,8 @@ func_mode_link ()
5806 # Add the "lib" prefix for modules if required
5807 func_stripname '' '.la' "$outputname"
5808 name=$func_stripname_result
5809- eval "shared_ext=\"$shrext_cmds\""
5810- eval "libname=\"$libname_spec\""
5811+ eval shared_ext=\"$shrext_cmds\"
5812+ eval libname=\"$libname_spec\"
5813 else
5814 func_stripname '' '.la' "$outputname"
5815 libname=$func_stripname_result
5816@@ -6346,7 +7264,7 @@ func_mode_link ()
5817 echo
5818 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
5819 $ECHO "*** objects $objs is not portable!"
5820- libobjs="$libobjs $objs"
5821+ func_append libobjs " $objs"
5822 fi
5823 fi
5824
5825@@ -6544,7 +7462,7 @@ func_mode_link ()
5826 done
5827
5828 # Make executables depend on our current version.
5829- verstring="$verstring:${current}.0"
5830+ func_append verstring ":${current}.0"
5831 ;;
5832
5833 qnx)
5834@@ -6612,10 +7530,10 @@ func_mode_link ()
5835 fi
5836
5837 func_generate_dlsyms "$libname" "$libname" "yes"
5838- libobjs="$libobjs $symfileobj"
5839+ func_append libobjs " $symfileobj"
5840 test "X$libobjs" = "X " && libobjs=
5841
5842- if test "$mode" != relink; then
5843+ if test "$opt_mode" != relink; then
5844 # Remove our outputs, but don't remove object files since they
5845 # may have been created when compiling PIC objects.
5846 removelist=
5847@@ -6631,7 +7549,7 @@ func_mode_link ()
5848 continue
5849 fi
5850 fi
5851- removelist="$removelist $p"
5852+ func_append removelist " $p"
5853 ;;
5854 *) ;;
5855 esac
5856@@ -6642,7 +7560,7 @@ func_mode_link ()
5857
5858 # Now set the variables for building old libraries.
5859 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
5860- oldlibs="$oldlibs $output_objdir/$libname.$libext"
5861+ func_append oldlibs " $output_objdir/$libname.$libext"
5862
5863 # Transform .lo files to .o files.
5864 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
5865@@ -6659,10 +7577,11 @@ func_mode_link ()
5866 # If the user specified any rpath flags, then add them.
5867 temp_xrpath=
5868 for libdir in $xrpath; do
5869- temp_xrpath="$temp_xrpath -R$libdir"
5870+ func_replace_sysroot "$libdir"
5871+ func_append temp_xrpath " -R$func_replace_sysroot_result"
5872 case "$finalize_rpath " in
5873 *" $libdir "*) ;;
5874- *) finalize_rpath="$finalize_rpath $libdir" ;;
5875+ *) func_append finalize_rpath " $libdir" ;;
5876 esac
5877 done
5878 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
5879@@ -6676,7 +7595,7 @@ func_mode_link ()
5880 for lib in $old_dlfiles; do
5881 case " $dlprefiles $dlfiles " in
5882 *" $lib "*) ;;
5883- *) dlfiles="$dlfiles $lib" ;;
5884+ *) func_append dlfiles " $lib" ;;
5885 esac
5886 done
5887
5888@@ -6686,7 +7605,7 @@ func_mode_link ()
5889 for lib in $old_dlprefiles; do
5890 case "$dlprefiles " in
5891 *" $lib "*) ;;
5892- *) dlprefiles="$dlprefiles $lib" ;;
5893+ *) func_append dlprefiles " $lib" ;;
5894 esac
5895 done
5896
5897@@ -6698,7 +7617,7 @@ func_mode_link ()
5898 ;;
5899 *-*-rhapsody* | *-*-darwin1.[012])
5900 # Rhapsody C library is in the System framework
5901- deplibs="$deplibs System.ltframework"
5902+ func_append deplibs " System.ltframework"
5903 ;;
5904 *-*-netbsd*)
5905 # Don't link with libc until the a.out ld.so is fixed.
5906@@ -6715,7 +7634,7 @@ func_mode_link ()
5907 *)
5908 # Add libc to deplibs on all other systems if necessary.
5909 if test "$build_libtool_need_lc" = "yes"; then
5910- deplibs="$deplibs -lc"
5911+ func_append deplibs " -lc"
5912 fi
5913 ;;
5914 esac
5915@@ -6764,18 +7683,18 @@ EOF
5916 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5917 case " $predeps $postdeps " in
5918 *" $i "*)
5919- newdeplibs="$newdeplibs $i"
5920+ func_append newdeplibs " $i"
5921 i=""
5922 ;;
5923 esac
5924 fi
5925 if test -n "$i" ; then
5926- eval "libname=\"$libname_spec\""
5927- eval "deplib_matches=\"$library_names_spec\""
5928+ libname=`eval "\\$ECHO \"$libname_spec\""`
5929+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
5930 set dummy $deplib_matches; shift
5931 deplib_match=$1
5932 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
5933- newdeplibs="$newdeplibs $i"
5934+ func_append newdeplibs " $i"
5935 else
5936 droppeddeps=yes
5937 echo
5938@@ -6789,7 +7708,7 @@ EOF
5939 fi
5940 ;;
5941 *)
5942- newdeplibs="$newdeplibs $i"
5943+ func_append newdeplibs " $i"
5944 ;;
5945 esac
5946 done
5947@@ -6807,18 +7726,18 @@ EOF
5948 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5949 case " $predeps $postdeps " in
5950 *" $i "*)
5951- newdeplibs="$newdeplibs $i"
5952+ func_append newdeplibs " $i"
5953 i=""
5954 ;;
5955 esac
5956 fi
5957 if test -n "$i" ; then
5958- eval "libname=\"$libname_spec\""
5959- eval "deplib_matches=\"$library_names_spec\""
5960+ libname=`eval "\\$ECHO \"$libname_spec\""`
5961+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
5962 set dummy $deplib_matches; shift
5963 deplib_match=$1
5964 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
5965- newdeplibs="$newdeplibs $i"
5966+ func_append newdeplibs " $i"
5967 else
5968 droppeddeps=yes
5969 echo
5970@@ -6840,7 +7759,7 @@ EOF
5971 fi
5972 ;;
5973 *)
5974- newdeplibs="$newdeplibs $i"
5975+ func_append newdeplibs " $i"
5976 ;;
5977 esac
5978 done
5979@@ -6857,15 +7776,27 @@ EOF
5980 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5981 case " $predeps $postdeps " in
5982 *" $a_deplib "*)
5983- newdeplibs="$newdeplibs $a_deplib"
5984+ func_append newdeplibs " $a_deplib"
5985 a_deplib=""
5986 ;;
5987 esac
5988 fi
5989 if test -n "$a_deplib" ; then
5990- eval "libname=\"$libname_spec\""
5991+ libname=`eval "\\$ECHO \"$libname_spec\""`
5992+ if test -n "$file_magic_glob"; then
5993+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
5994+ else
5995+ libnameglob=$libname
5996+ fi
5997+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
5998 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
5999- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6000+ if test "$want_nocaseglob" = yes; then
6001+ shopt -s nocaseglob
6002+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
6003+ $nocaseglob
6004+ else
6005+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
6006+ fi
6007 for potent_lib in $potential_libs; do
6008 # Follow soft links.
6009 if ls -lLd "$potent_lib" 2>/dev/null |
6010@@ -6885,10 +7816,10 @@ EOF
6011 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
6012 esac
6013 done
6014- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null |
6015+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
6016 $SED -e 10q |
6017 $EGREP "$file_magic_regex" > /dev/null; then
6018- newdeplibs="$newdeplibs $a_deplib"
6019+ func_append newdeplibs " $a_deplib"
6020 a_deplib=""
6021 break 2
6022 fi
6023@@ -6913,7 +7844,7 @@ EOF
6024 ;;
6025 *)
6026 # Add a -L argument.
6027- newdeplibs="$newdeplibs $a_deplib"
6028+ func_append newdeplibs " $a_deplib"
6029 ;;
6030 esac
6031 done # Gone through all deplibs.
6032@@ -6929,20 +7860,20 @@ EOF
6033 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6034 case " $predeps $postdeps " in
6035 *" $a_deplib "*)
6036- newdeplibs="$newdeplibs $a_deplib"
6037+ func_append newdeplibs " $a_deplib"
6038 a_deplib=""
6039 ;;
6040 esac
6041 fi
6042 if test -n "$a_deplib" ; then
6043- eval "libname=\"$libname_spec\""
6044+ libname=`eval "\\$ECHO \"$libname_spec\""`
6045 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6046 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6047 for potent_lib in $potential_libs; do
6048 potlib="$potent_lib" # see symlink-check above in file_magic test
6049 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
6050 $EGREP "$match_pattern_regex" > /dev/null; then
6051- newdeplibs="$newdeplibs $a_deplib"
6052+ func_append newdeplibs " $a_deplib"
6053 a_deplib=""
6054 break 2
6055 fi
6056@@ -6967,7 +7898,7 @@ EOF
6057 ;;
6058 *)
6059 # Add a -L argument.
6060- newdeplibs="$newdeplibs $a_deplib"
6061+ func_append newdeplibs " $a_deplib"
6062 ;;
6063 esac
6064 done # Gone through all deplibs.
6065@@ -7071,7 +8002,7 @@ EOF
6066 *)
6067 case " $deplibs " in
6068 *" -L$path/$objdir "*)
6069- new_libs="$new_libs -L$path/$objdir" ;;
6070+ func_append new_libs " -L$path/$objdir" ;;
6071 esac
6072 ;;
6073 esac
6074@@ -7081,10 +8012,10 @@ EOF
6075 -L*)
6076 case " $new_libs " in
6077 *" $deplib "*) ;;
6078- *) new_libs="$new_libs $deplib" ;;
6079+ *) func_append new_libs " $deplib" ;;
6080 esac
6081 ;;
6082- *) new_libs="$new_libs $deplib" ;;
6083+ *) func_append new_libs " $deplib" ;;
6084 esac
6085 done
6086 deplibs="$new_libs"
6087@@ -7101,10 +8032,12 @@ EOF
6088 hardcode_libdirs=
6089 dep_rpath=
6090 rpath="$finalize_rpath"
6091- test "$mode" != relink && rpath="$compile_rpath$rpath"
6092+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
6093 for libdir in $rpath; do
6094 if test -n "$hardcode_libdir_flag_spec"; then
6095 if test -n "$hardcode_libdir_separator"; then
6096+ func_replace_sysroot "$libdir"
6097+ libdir=$func_replace_sysroot_result
6098 if test -z "$hardcode_libdirs"; then
6099 hardcode_libdirs="$libdir"
6100 else
6101@@ -7113,18 +8046,18 @@ EOF
6102 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
6103 ;;
6104 *)
6105- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
6106+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
6107 ;;
6108 esac
6109 fi
6110 else
6111- eval "flag=\"$hardcode_libdir_flag_spec\""
6112- dep_rpath="$dep_rpath $flag"
6113+ eval flag=\"$hardcode_libdir_flag_spec\"
6114+ func_append dep_rpath " $flag"
6115 fi
6116 elif test -n "$runpath_var"; then
6117 case "$perm_rpath " in
6118 *" $libdir "*) ;;
6119- *) perm_rpath="$perm_rpath $libdir" ;;
6120+ *) func_apped perm_rpath " $libdir" ;;
6121 esac
6122 fi
6123 done
6124@@ -7133,40 +8066,38 @@ EOF
6125 test -n "$hardcode_libdirs"; then
6126 libdir="$hardcode_libdirs"
6127 if test -n "$hardcode_libdir_flag_spec_ld"; then
6128- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\""
6129+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6130 else
6131- eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
6132+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6133 fi
6134 fi
6135 if test -n "$runpath_var" && test -n "$perm_rpath"; then
6136 # We should set the runpath_var.
6137 rpath=
6138 for dir in $perm_rpath; do
6139- rpath="$rpath$dir:"
6140+ func_append rpath "$dir:"
6141 done
6142- eval $runpath_var=\$rpath\$$runpath_var
6143- export $runpath_var
6144+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
6145 fi
6146 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
6147 fi
6148
6149 shlibpath="$finalize_shlibpath"
6150- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
6151+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
6152 if test -n "$shlibpath"; then
6153- eval $shlibpath_var=\$shlibpath\$$shlibpath_var
6154- export $shlibpath_var
6155+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
6156 fi
6157
6158 # Get the real and link names of the library.
6159- eval "shared_ext=\"$shrext_cmds\""
6160- eval "library_names=\"$library_names_spec\""
6161+ eval shared_ext=\"$shrext_cmds\"
6162+ eval library_names=\"$library_names_spec\"
6163 set dummy $library_names
6164 shift
6165 realname="$1"
6166 shift
6167
6168 if test -n "$soname_spec"; then
6169- eval "soname=\"$soname_spec\""
6170+ eval soname=\"$soname_spec\"
6171 else
6172 soname="$realname"
6173 fi
6174@@ -7178,7 +8109,7 @@ EOF
6175 linknames=
6176 for link
6177 do
6178- linknames="$linknames $link"
6179+ func_append linknames " $link"
6180 done
6181
6182 # Use standard objects if they are pic
6183@@ -7189,7 +8120,7 @@ EOF
6184 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6185 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
6186 export_symbols="$output_objdir/$libname.uexp"
6187- delfiles="$delfiles $export_symbols"
6188+ func_append delfiles " $export_symbols"
6189 fi
6190
6191 orig_export_symbols=
6192@@ -7220,13 +8151,45 @@ EOF
6193 $opt_dry_run || $RM $export_symbols
6194 cmds=$export_symbols_cmds
6195 save_ifs="$IFS"; IFS='~'
6196- for cmd in $cmds; do
6197+ for cmd1 in $cmds; do
6198 IFS="$save_ifs"
6199- eval "cmd=\"$cmd\""
6200- func_len " $cmd"
6201- len=$func_len_result
6202- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
6203+ # Take the normal branch if the nm_file_list_spec branch
6204+ # doesn't work or if tool conversion is not needed.
6205+ case $nm_file_list_spec~$to_tool_file_cmd in
6206+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
6207+ try_normal_branch=yes
6208+ eval cmd=\"$cmd1\"
6209+ func_len " $cmd"
6210+ len=$func_len_result
6211+ ;;
6212+ *)
6213+ try_normal_branch=no
6214+ ;;
6215+ esac
6216+ if test "$try_normal_branch" = yes \
6217+ && { test "$len" -lt "$max_cmd_len" \
6218+ || test "$max_cmd_len" -le -1; }
6219+ then
6220+ func_show_eval "$cmd" 'exit $?'
6221+ skipped_export=false
6222+ elif test -n "$nm_file_list_spec"; then
6223+ func_basename "$output"
6224+ output_la=$func_basename_result
6225+ save_libobjs=$libobjs
6226+ save_output=$output
6227+ output=${output_objdir}/${output_la}.nm
6228+ func_to_tool_file "$output"
6229+ libobjs=$nm_file_list_spec$func_to_tool_file_result
6230+ func_append delfiles " $output"
6231+ func_verbose "creating $NM input file list: $output"
6232+ for obj in $save_libobjs; do
6233+ func_to_tool_file "$obj"
6234+ $ECHO "$func_to_tool_file_result"
6235+ done > "$output"
6236+ eval cmd=\"$cmd1\"
6237 func_show_eval "$cmd" 'exit $?'
6238+ output=$save_output
6239+ libobjs=$save_libobjs
6240 skipped_export=false
6241 else
6242 # The command line is too long to execute in one step.
6243@@ -7248,7 +8211,7 @@ EOF
6244 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6245 tmp_export_symbols="$export_symbols"
6246 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
6247- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"
6248+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
6249 fi
6250
6251 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
6252@@ -7260,7 +8223,7 @@ EOF
6253 # global variables. join(1) would be nice here, but unfortunately
6254 # isn't a blessed tool.
6255 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
6256- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
6257+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
6258 export_symbols=$output_objdir/$libname.def
6259 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
6260 fi
6261@@ -7270,7 +8233,7 @@ EOF
6262 case " $convenience " in
6263 *" $test_deplib "*) ;;
6264 *)
6265- tmp_deplibs="$tmp_deplibs $test_deplib"
6266+ func_append tmp_deplibs " $test_deplib"
6267 ;;
6268 esac
6269 done
6270@@ -7286,43 +8249,43 @@ EOF
6271 fi
6272 if test -n "$whole_archive_flag_spec"; then
6273 save_libobjs=$libobjs
6274- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\""
6275+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
6276 test "X$libobjs" = "X " && libobjs=
6277 else
6278 gentop="$output_objdir/${outputname}x"
6279- generated="$generated $gentop"
6280+ func_append generated " $gentop"
6281
6282 func_extract_archives $gentop $convenience
6283- libobjs="$libobjs $func_extract_archives_result"
6284+ func_append libobjs " $func_extract_archives_result"
6285 test "X$libobjs" = "X " && libobjs=
6286 fi
6287 fi
6288
6289 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
6290- eval "flag=\"$thread_safe_flag_spec\""
6291- linker_flags="$linker_flags $flag"
6292+ eval flag=\"$thread_safe_flag_spec\"
6293+ func_append linker_flags " $flag"
6294 fi
6295
6296 # Make a backup of the uninstalled library when relinking
6297- if test "$mode" = relink; then
6298- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $?
6299+ if test "$opt_mode" = relink; then
6300+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
6301 fi
6302
6303 # Do each of the archive commands.
6304 if test "$module" = yes && test -n "$module_cmds" ; then
6305 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
6306- eval "test_cmds=\"$module_expsym_cmds\""
6307+ eval test_cmds=\"$module_expsym_cmds\"
6308 cmds=$module_expsym_cmds
6309 else
6310- eval "test_cmds=\"$module_cmds\""
6311+ eval test_cmds=\"$module_cmds\"
6312 cmds=$module_cmds
6313 fi
6314 else
6315 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
6316- eval "test_cmds=\"$archive_expsym_cmds\""
6317+ eval test_cmds=\"$archive_expsym_cmds\"
6318 cmds=$archive_expsym_cmds
6319 else
6320- eval "test_cmds=\"$archive_cmds\""
6321+ eval test_cmds=\"$archive_cmds\"
6322 cmds=$archive_cmds
6323 fi
6324 fi
6325@@ -7366,10 +8329,13 @@ EOF
6326 echo 'INPUT (' > $output
6327 for obj in $save_libobjs
6328 do
6329- $ECHO "$obj" >> $output
6330+ func_to_tool_file "$obj"
6331+ $ECHO "$func_to_tool_file_result" >> $output
6332 done
6333 echo ')' >> $output
6334- delfiles="$delfiles $output"
6335+ func_append delfiles " $output"
6336+ func_to_tool_file "$output"
6337+ output=$func_to_tool_file_result
6338 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
6339 output=${output_objdir}/${output_la}.lnk
6340 func_verbose "creating linker input file list: $output"
6341@@ -7383,15 +8349,17 @@ EOF
6342 fi
6343 for obj
6344 do
6345- $ECHO "$obj" >> $output
6346+ func_to_tool_file "$obj"
6347+ $ECHO "$func_to_tool_file_result" >> $output
6348 done
6349- delfiles="$delfiles $output"
6350- output=$firstobj\"$file_list_spec$output\"
6351+ func_append delfiles " $output"
6352+ func_to_tool_file "$output"
6353+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
6354 else
6355 if test -n "$save_libobjs"; then
6356 func_verbose "creating reloadable object files..."
6357 output=$output_objdir/$output_la-${k}.$objext
6358- eval "test_cmds=\"$reload_cmds\""
6359+ eval test_cmds=\"$reload_cmds\"
6360 func_len " $test_cmds"
6361 len0=$func_len_result
6362 len=$len0
6363@@ -7411,12 +8379,12 @@ EOF
6364 if test "$k" -eq 1 ; then
6365 # The first file doesn't have a previous command to add.
6366 reload_objs=$objlist
6367- eval "concat_cmds=\"$reload_cmds\""
6368+ eval concat_cmds=\"$reload_cmds\"
6369 else
6370 # All subsequent reloadable object files will link in
6371 # the last one created.
6372 reload_objs="$objlist $last_robj"
6373- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\""
6374+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
6375 fi
6376 last_robj=$output_objdir/$output_la-${k}.$objext
6377 func_arith $k + 1
6378@@ -7433,11 +8401,11 @@ EOF
6379 # files will link in the last one created.
6380 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
6381 reload_objs="$objlist $last_robj"
6382- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\""
6383+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
6384 if test -n "$last_robj"; then
6385- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\""
6386+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
6387 fi
6388- delfiles="$delfiles $output"
6389+ func_append delfiles " $output"
6390
6391 else
6392 output=
6393@@ -7450,9 +8418,9 @@ EOF
6394 libobjs=$output
6395 # Append the command to create the export file.
6396 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
6397- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\""
6398+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
6399 if test -n "$last_robj"; then
6400- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\""
6401+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
6402 fi
6403 fi
6404
6405@@ -7471,7 +8439,7 @@ EOF
6406 lt_exit=$?
6407
6408 # Restore the uninstalled library and exit
6409- if test "$mode" = relink; then
6410+ if test "$opt_mode" = relink; then
6411 ( cd "$output_objdir" && \
6412 $RM "${realname}T" && \
6413 $MV "${realname}U" "$realname" )
6414@@ -7492,7 +8460,7 @@ EOF
6415 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6416 tmp_export_symbols="$export_symbols"
6417 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
6418- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"
6419+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
6420 fi
6421
6422 if test -n "$orig_export_symbols"; then
6423@@ -7504,7 +8472,7 @@ EOF
6424 # global variables. join(1) would be nice here, but unfortunately
6425 # isn't a blessed tool.
6426 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
6427- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
6428+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
6429 export_symbols=$output_objdir/$libname.def
6430 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
6431 fi
6432@@ -7515,7 +8483,7 @@ EOF
6433 output=$save_output
6434
6435 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
6436- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\""
6437+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
6438 test "X$libobjs" = "X " && libobjs=
6439 fi
6440 # Expand the library linking commands again to reset the
6441@@ -7539,23 +8507,23 @@ EOF
6442
6443 if test -n "$delfiles"; then
6444 # Append the command to remove temporary files to $cmds.
6445- eval "cmds=\"\$cmds~\$RM $delfiles\""
6446+ eval cmds=\"\$cmds~\$RM $delfiles\"
6447 fi
6448
6449 # Add any objects from preloaded convenience libraries
6450 if test -n "$dlprefiles"; then
6451 gentop="$output_objdir/${outputname}x"
6452- generated="$generated $gentop"
6453+ func_append generated " $gentop"
6454
6455 func_extract_archives $gentop $dlprefiles
6456- libobjs="$libobjs $func_extract_archives_result"
6457+ func_append libobjs " $func_extract_archives_result"
6458 test "X$libobjs" = "X " && libobjs=
6459 fi
6460
6461 save_ifs="$IFS"; IFS='~'
6462 for cmd in $cmds; do
6463 IFS="$save_ifs"
6464- eval "cmd=\"$cmd\""
6465+ eval cmd=\"$cmd\"
6466 $opt_silent || {
6467 func_quote_for_expand "$cmd"
6468 eval "func_echo $func_quote_for_expand_result"
6469@@ -7564,7 +8532,7 @@ EOF
6470 lt_exit=$?
6471
6472 # Restore the uninstalled library and exit
6473- if test "$mode" = relink; then
6474+ if test "$opt_mode" = relink; then
6475 ( cd "$output_objdir" && \
6476 $RM "${realname}T" && \
6477 $MV "${realname}U" "$realname" )
6478@@ -7576,8 +8544,8 @@ EOF
6479 IFS="$save_ifs"
6480
6481 # Restore the uninstalled library and exit
6482- if test "$mode" = relink; then
6483- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $?
6484+ if test "$opt_mode" = relink; then
6485+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
6486
6487 if test -n "$convenience"; then
6488 if test -z "$whole_archive_flag_spec"; then
6489@@ -7656,17 +8624,20 @@ EOF
6490
6491 if test -n "$convenience"; then
6492 if test -n "$whole_archive_flag_spec"; then
6493- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\""
6494+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
6495 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
6496 else
6497 gentop="$output_objdir/${obj}x"
6498- generated="$generated $gentop"
6499+ func_append generated " $gentop"
6500
6501 func_extract_archives $gentop $convenience
6502 reload_conv_objs="$reload_objs $func_extract_archives_result"
6503 fi
6504 fi
6505
6506+ # If we're not building shared, we need to use non_pic_objs
6507+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
6508+
6509 # Create the old-style object.
6510 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
6511
6512@@ -7690,7 +8661,7 @@ EOF
6513 # Create an invalid libtool object if no PIC, so that we don't
6514 # accidentally link it into a program.
6515 # $show "echo timestamp > $libobj"
6516- # $opt_dry_run || echo timestamp > $libobj || exit $?
6517+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
6518 exit $EXIT_SUCCESS
6519 fi
6520
6521@@ -7740,8 +8711,8 @@ EOF
6522 if test "$tagname" = CXX ; then
6523 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
6524 10.[0123])
6525- compile_command="$compile_command ${wl}-bind_at_load"
6526- finalize_command="$finalize_command ${wl}-bind_at_load"
6527+ func_append compile_command " ${wl}-bind_at_load"
6528+ func_append finalize_command " ${wl}-bind_at_load"
6529 ;;
6530 esac
6531 fi
6532@@ -7761,7 +8732,7 @@ EOF
6533 *)
6534 case " $compile_deplibs " in
6535 *" -L$path/$objdir "*)
6536- new_libs="$new_libs -L$path/$objdir" ;;
6537+ func_append new_libs " -L$path/$objdir" ;;
6538 esac
6539 ;;
6540 esac
6541@@ -7771,17 +8742,17 @@ EOF
6542 -L*)
6543 case " $new_libs " in
6544 *" $deplib "*) ;;
6545- *) new_libs="$new_libs $deplib" ;;
6546+ *) func_append new_libs " $deplib" ;;
6547 esac
6548 ;;
6549- *) new_libs="$new_libs $deplib" ;;
6550+ *) func_append new_libs " $deplib" ;;
6551 esac
6552 done
6553 compile_deplibs="$new_libs"
6554
6555
6556- compile_command="$compile_command $compile_deplibs"
6557- finalize_command="$finalize_command $finalize_deplibs"
6558+ func_append compile_command " $compile_deplibs"
6559+ func_append finalize_command " $finalize_deplibs"
6560
6561 if test -n "$rpath$xrpath"; then
6562 # If the user specified any rpath flags, then add them.
6563@@ -7789,7 +8760,7 @@ EOF
6564 # This is the magic to use -rpath.
6565 case "$finalize_rpath " in
6566 *" $libdir "*) ;;
6567- *) finalize_rpath="$finalize_rpath $libdir" ;;
6568+ *) func_append finalize_rpath " $libdir" ;;
6569 esac
6570 done
6571 fi
6572@@ -7808,18 +8779,18 @@ EOF
6573 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
6574 ;;
6575 *)
6576- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
6577+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
6578 ;;
6579 esac
6580 fi
6581 else
6582- eval "flag=\"$hardcode_libdir_flag_spec\""
6583- rpath="$rpath $flag"
6584+ eval flag=\"$hardcode_libdir_flag_spec\"
6585+ func_append rpath " $flag"
6586 fi
6587 elif test -n "$runpath_var"; then
6588 case "$perm_rpath " in
6589 *" $libdir "*) ;;
6590- *) perm_rpath="$perm_rpath $libdir" ;;
6591+ *) func_append perm_rpath " $libdir" ;;
6592 esac
6593 fi
6594 case $host in
6595@@ -7828,12 +8799,12 @@ EOF
6596 case :$dllsearchpath: in
6597 *":$libdir:"*) ;;
6598 ::) dllsearchpath=$libdir;;
6599- *) dllsearchpath="$dllsearchpath:$libdir";;
6600+ *) func_append dllsearchpath ":$libdir";;
6601 esac
6602 case :$dllsearchpath: in
6603 *":$testbindir:"*) ;;
6604 ::) dllsearchpath=$testbindir;;
6605- *) dllsearchpath="$dllsearchpath:$testbindir";;
6606+ *) func_append dllsearchpath ":$testbindir";;
6607 esac
6608 ;;
6609 esac
6610@@ -7842,7 +8813,7 @@ EOF
6611 if test -n "$hardcode_libdir_separator" &&
6612 test -n "$hardcode_libdirs"; then
6613 libdir="$hardcode_libdirs"
6614- eval "rpath=\" $hardcode_libdir_flag_spec\""
6615+ eval rpath=\" $hardcode_libdir_flag_spec\"
6616 fi
6617 compile_rpath="$rpath"
6618
6619@@ -7859,18 +8830,18 @@ EOF
6620 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
6621 ;;
6622 *)
6623- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
6624+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
6625 ;;
6626 esac
6627 fi
6628 else
6629- eval "flag=\"$hardcode_libdir_flag_spec\""
6630- rpath="$rpath $flag"
6631+ eval flag=\"$hardcode_libdir_flag_spec\"
6632+ func_append rpath " $flag"
6633 fi
6634 elif test -n "$runpath_var"; then
6635 case "$finalize_perm_rpath " in
6636 *" $libdir "*) ;;
6637- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
6638+ *) func_append finalize_perm_rpath " $libdir" ;;
6639 esac
6640 fi
6641 done
6642@@ -7878,7 +8849,7 @@ EOF
6643 if test -n "$hardcode_libdir_separator" &&
6644 test -n "$hardcode_libdirs"; then
6645 libdir="$hardcode_libdirs"
6646- eval "rpath=\" $hardcode_libdir_flag_spec\""
6647+ eval rpath=\" $hardcode_libdir_flag_spec\"
6648 fi
6649 finalize_rpath="$rpath"
6650
6651@@ -7921,6 +8892,12 @@ EOF
6652 exit_status=0
6653 func_show_eval "$link_command" 'exit_status=$?'
6654
6655+ if test -n "$postlink_cmds"; then
6656+ func_to_tool_file "$output"
6657+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
6658+ func_execute_cmds "$postlink_cmds" 'exit $?'
6659+ fi
6660+
6661 # Delete the generated files.
6662 if test -f "$output_objdir/${outputname}S.${objext}"; then
6663 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
6664@@ -7943,7 +8920,7 @@ EOF
6665 # We should set the runpath_var.
6666 rpath=
6667 for dir in $perm_rpath; do
6668- rpath="$rpath$dir:"
6669+ func_append rpath "$dir:"
6670 done
6671 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
6672 fi
6673@@ -7951,7 +8928,7 @@ EOF
6674 # We should set the runpath_var.
6675 rpath=
6676 for dir in $finalize_perm_rpath; do
6677- rpath="$rpath$dir:"
6678+ func_append rpath "$dir:"
6679 done
6680 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
6681 fi
6682@@ -7966,6 +8943,13 @@ EOF
6683 $opt_dry_run || $RM $output
6684 # Link the executable and exit
6685 func_show_eval "$link_command" 'exit $?'
6686+
6687+ if test -n "$postlink_cmds"; then
6688+ func_to_tool_file "$output"
6689+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
6690+ func_execute_cmds "$postlink_cmds" 'exit $?'
6691+ fi
6692+
6693 exit $EXIT_SUCCESS
6694 fi
6695
6696@@ -7999,6 +8983,12 @@ EOF
6697
6698 func_show_eval "$link_command" 'exit $?'
6699
6700+ if test -n "$postlink_cmds"; then
6701+ func_to_tool_file "$output_objdir/$outputname"
6702+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
6703+ func_execute_cmds "$postlink_cmds" 'exit $?'
6704+ fi
6705+
6706 # Now create the wrapper script.
6707 func_verbose "creating $output"
6708
6709@@ -8096,7 +9086,7 @@ EOF
6710 else
6711 oldobjs="$old_deplibs $non_pic_objects"
6712 if test "$preload" = yes && test -f "$symfileobj"; then
6713- oldobjs="$oldobjs $symfileobj"
6714+ func_append oldobjs " $symfileobj"
6715 fi
6716 fi
6717 addlibs="$old_convenience"
6718@@ -8104,10 +9094,10 @@ EOF
6719
6720 if test -n "$addlibs"; then
6721 gentop="$output_objdir/${outputname}x"
6722- generated="$generated $gentop"
6723+ func_append generated " $gentop"
6724
6725 func_extract_archives $gentop $addlibs
6726- oldobjs="$oldobjs $func_extract_archives_result"
6727+ func_append oldobjs " $func_extract_archives_result"
6728 fi
6729
6730 # Do each command in the archive commands.
6731@@ -8118,10 +9108,10 @@ EOF
6732 # Add any objects from preloaded convenience libraries
6733 if test -n "$dlprefiles"; then
6734 gentop="$output_objdir/${outputname}x"
6735- generated="$generated $gentop"
6736+ func_append generated " $gentop"
6737
6738 func_extract_archives $gentop $dlprefiles
6739- oldobjs="$oldobjs $func_extract_archives_result"
6740+ func_append oldobjs " $func_extract_archives_result"
6741 fi
6742
6743 # POSIX demands no paths to be encoded in archives. We have
6744@@ -8139,7 +9129,7 @@ EOF
6745 else
6746 echo "copying selected object files to avoid basename conflicts..."
6747 gentop="$output_objdir/${outputname}x"
6748- generated="$generated $gentop"
6749+ func_append generated " $gentop"
6750 func_mkdir_p "$gentop"
6751 save_oldobjs=$oldobjs
6752 oldobjs=
6753@@ -8163,18 +9153,28 @@ EOF
6754 esac
6755 done
6756 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
6757- oldobjs="$oldobjs $gentop/$newobj"
6758+ func_append oldobjs " $gentop/$newobj"
6759 ;;
6760- *) oldobjs="$oldobjs $obj" ;;
6761+ *) func_append oldobjs " $obj" ;;
6762 esac
6763 done
6764 fi
6765- eval "cmds=\"$old_archive_cmds\""
6766+ eval cmds=\"$old_archive_cmds\"
6767
6768 func_len " $cmds"
6769 len=$func_len_result
6770 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
6771 cmds=$old_archive_cmds
6772+ elif test -n "$archiver_list_spec"; then
6773+ func_verbose "using command file archive linking..."
6774+ for obj in $oldobjs
6775+ do
6776+ func_to_tool_file "$obj"
6777+ $ECHO "$func_to_tool_file_result"
6778+ done > $output_objdir/$libname.libcmd
6779+ func_to_tool_file "$output_objdir/$libname.libcmd"
6780+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
6781+ cmds=$old_archive_cmds
6782 else
6783 # the command line is too long to link in one step, link in parts
6784 func_verbose "using piecewise archive linking..."
6785@@ -8189,7 +9189,7 @@ EOF
6786 do
6787 last_oldobj=$obj
6788 done
6789- eval "test_cmds=\"$old_archive_cmds\""
6790+ eval test_cmds=\"$old_archive_cmds\"
6791 func_len " $test_cmds"
6792 len0=$func_len_result
6793 len=$len0
6794@@ -8208,7 +9208,7 @@ EOF
6795 RANLIB=$save_RANLIB
6796 fi
6797 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
6798- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\""
6799+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
6800 objlist=
6801 len=$len0
6802 fi
6803@@ -8216,9 +9216,9 @@ EOF
6804 RANLIB=$save_RANLIB
6805 oldobjs=$objlist
6806 if test "X$oldobjs" = "X" ; then
6807- eval "cmds=\"\$concat_cmds\""
6808+ eval cmds=\"\$concat_cmds\"
6809 else
6810- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\""
6811+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
6812 fi
6813 fi
6814 fi
6815@@ -8268,12 +9268,23 @@ EOF
6816 *.la)
6817 func_basename "$deplib"
6818 name="$func_basename_result"
6819- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6820+ func_resolve_sysroot "$deplib"
6821+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
6822 test -z "$libdir" && \
6823 func_fatal_error "\`$deplib' is not a valid libtool archive"
6824- newdependency_libs="$newdependency_libs $libdir/$name"
6825+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
6826+ ;;
6827+ -L*)
6828+ func_stripname -L '' "$deplib"
6829+ func_replace_sysroot "$func_stripname_result"
6830+ func_append newdependency_libs " -L$func_replace_sysroot_result"
6831 ;;
6832- *) newdependency_libs="$newdependency_libs $deplib" ;;
6833+ -R*)
6834+ func_stripname -R '' "$deplib"
6835+ func_replace_sysroot "$func_stripname_result"
6836+ func_append newdependency_libs " -R$func_replace_sysroot_result"
6837+ ;;
6838+ *) func_append newdependency_libs " $deplib" ;;
6839 esac
6840 done
6841 dependency_libs="$newdependency_libs"
6842@@ -8284,12 +9295,14 @@ EOF
6843 *.la)
6844 func_basename "$lib"
6845 name="$func_basename_result"
6846- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6847+ func_resolve_sysroot "$lib"
6848+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
6849+
6850 test -z "$libdir" && \
6851 func_fatal_error "\`$lib' is not a valid libtool archive"
6852- newdlfiles="$newdlfiles $libdir/$name"
6853+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
6854 ;;
6855- *) newdlfiles="$newdlfiles $lib" ;;
6856+ *) func_append newdlfiles " $lib" ;;
6857 esac
6858 done
6859 dlfiles="$newdlfiles"
6860@@ -8303,10 +9316,11 @@ EOF
6861 # the library:
6862 func_basename "$lib"
6863 name="$func_basename_result"
6864- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6865+ func_resolve_sysroot "$lib"
6866+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
6867 test -z "$libdir" && \
6868 func_fatal_error "\`$lib' is not a valid libtool archive"
6869- newdlprefiles="$newdlprefiles $libdir/$name"
6870+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
6871 ;;
6872 esac
6873 done
6874@@ -8318,7 +9332,7 @@ EOF
6875 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6876 *) abs=`pwd`"/$lib" ;;
6877 esac
6878- newdlfiles="$newdlfiles $abs"
6879+ func_append newdlfiles " $abs"
6880 done
6881 dlfiles="$newdlfiles"
6882 newdlprefiles=
6883@@ -8327,7 +9341,7 @@ EOF
6884 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6885 *) abs=`pwd`"/$lib" ;;
6886 esac
6887- newdlprefiles="$newdlprefiles $abs"
6888+ func_append newdlprefiles " $abs"
6889 done
6890 dlprefiles="$newdlprefiles"
6891 fi
6892@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\""
6893 exit $EXIT_SUCCESS
6894 }
6895
6896-{ test "$mode" = link || test "$mode" = relink; } &&
6897+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
6898 func_mode_link ${1+"$@"}
6899
6900
6901@@ -8432,9 +9446,9 @@ func_mode_uninstall ()
6902 for arg
6903 do
6904 case $arg in
6905- -f) RM="$RM $arg"; rmforce=yes ;;
6906- -*) RM="$RM $arg" ;;
6907- *) files="$files $arg" ;;
6908+ -f) func_append RM " $arg"; rmforce=yes ;;
6909+ -*) func_append RM " $arg" ;;
6910+ *) func_append files " $arg" ;;
6911 esac
6912 done
6913
6914@@ -8443,24 +9457,23 @@ func_mode_uninstall ()
6915
6916 rmdirs=
6917
6918- origobjdir="$objdir"
6919 for file in $files; do
6920 func_dirname "$file" "" "."
6921 dir="$func_dirname_result"
6922 if test "X$dir" = X.; then
6923- objdir="$origobjdir"
6924+ odir="$objdir"
6925 else
6926- objdir="$dir/$origobjdir"
6927+ odir="$dir/$objdir"
6928 fi
6929 func_basename "$file"
6930 name="$func_basename_result"
6931- test "$mode" = uninstall && objdir="$dir"
6932+ test "$opt_mode" = uninstall && odir="$dir"
6933
6934- # Remember objdir for removal later, being careful to avoid duplicates
6935- if test "$mode" = clean; then
6936+ # Remember odir for removal later, being careful to avoid duplicates
6937+ if test "$opt_mode" = clean; then
6938 case " $rmdirs " in
6939- *" $objdir "*) ;;
6940- *) rmdirs="$rmdirs $objdir" ;;
6941+ *" $odir "*) ;;
6942+ *) func_append rmdirs " $odir" ;;
6943 esac
6944 fi
6945
6946@@ -8486,18 +9499,17 @@ func_mode_uninstall ()
6947
6948 # Delete the libtool libraries and symlinks.
6949 for n in $library_names; do
6950- rmfiles="$rmfiles $objdir/$n"
6951+ func_append rmfiles " $odir/$n"
6952 done
6953- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6954+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
6955
6956- case "$mode" in
6957+ case "$opt_mode" in
6958 clean)
6959- case " $library_names " in
6960- # " " in the beginning catches empty $dlname
6961+ case " $library_names " in
6962 *" $dlname "*) ;;
6963- *) rmfiles="$rmfiles $objdir/$dlname" ;;
6964+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
6965 esac
6966- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6967+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
6968 ;;
6969 uninstall)
6970 if test -n "$library_names"; then
6971@@ -8525,19 +9537,19 @@ func_mode_uninstall ()
6972 # Add PIC object to the list of files to remove.
6973 if test -n "$pic_object" &&
6974 test "$pic_object" != none; then
6975- rmfiles="$rmfiles $dir/$pic_object"
6976+ func_append rmfiles " $dir/$pic_object"
6977 fi
6978
6979 # Add non-PIC object to the list of files to remove.
6980 if test -n "$non_pic_object" &&
6981 test "$non_pic_object" != none; then
6982- rmfiles="$rmfiles $dir/$non_pic_object"
6983+ func_append rmfiles " $dir/$non_pic_object"
6984 fi
6985 fi
6986 ;;
6987
6988 *)
6989- if test "$mode" = clean ; then
6990+ if test "$opt_mode" = clean ; then
6991 noexename=$name
6992 case $file in
6993 *.exe)
6994@@ -8547,7 +9559,7 @@ func_mode_uninstall ()
6995 noexename=$func_stripname_result
6996 # $file with .exe has already been added to rmfiles,
6997 # add $file without .exe
6998- rmfiles="$rmfiles $file"
6999+ func_append rmfiles " $file"
7000 ;;
7001 esac
7002 # Do a test to see if this is a libtool program.
7003@@ -8556,7 +9568,7 @@ func_mode_uninstall ()
7004 func_ltwrapper_scriptname "$file"
7005 relink_command=
7006 func_source $func_ltwrapper_scriptname_result
7007- rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
7008+ func_append rmfiles " $func_ltwrapper_scriptname_result"
7009 else
7010 relink_command=
7011 func_source $dir/$noexename
7012@@ -8564,12 +9576,12 @@ func_mode_uninstall ()
7013
7014 # note $name still contains .exe if it was in $file originally
7015 # as does the version of $file that was added into $rmfiles
7016- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7017+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
7018 if test "$fast_install" = yes && test -n "$relink_command"; then
7019- rmfiles="$rmfiles $objdir/lt-$name"
7020+ func_append rmfiles " $odir/lt-$name"
7021 fi
7022 if test "X$noexename" != "X$name" ; then
7023- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
7024+ func_append rmfiles " $odir/lt-${noexename}.c"
7025 fi
7026 fi
7027 fi
7028@@ -8577,7 +9589,6 @@ func_mode_uninstall ()
7029 esac
7030 func_show_eval "$RM $rmfiles" 'exit_status=1'
7031 done
7032- objdir="$origobjdir"
7033
7034 # Try to remove the ${objdir}s in the directories where we deleted files
7035 for dir in $rmdirs; do
7036@@ -8589,16 +9600,16 @@ func_mode_uninstall ()
7037 exit $exit_status
7038 }
7039
7040-{ test "$mode" = uninstall || test "$mode" = clean; } &&
7041+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
7042 func_mode_uninstall ${1+"$@"}
7043
7044-test -z "$mode" && {
7045+test -z "$opt_mode" && {
7046 help="$generic_help"
7047 func_fatal_help "you must specify a MODE"
7048 }
7049
7050 test -z "$exec_cmd" && \
7051- func_fatal_help "invalid operation mode \`$mode'"
7052+ func_fatal_help "invalid operation mode \`$opt_mode'"
7053
7054 if test -n "$exec_cmd"; then
7055 eval exec "$exec_cmd"
7056Index: binutils-2.21.1/ltoptions.m4
7057===================================================================
7058--- binutils-2.21.1.orig/ltoptions.m4
7059+++ binutils-2.21.1/ltoptions.m4
7060@@ -8,7 +8,7 @@
7061 # unlimited permission to copy and/or distribute it, with or without
7062 # modifications, as long as this notice is preserved.
7063
7064-# serial 6 ltoptions.m4
7065+# serial 7 ltoptions.m4
7066
7067 # This is to help aclocal find these macros, as it can't see m4_define.
7068 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7069Index: binutils-2.21.1/ltversion.m4
7070===================================================================
7071--- binutils-2.21.1.orig/ltversion.m4
7072+++ binutils-2.21.1/ltversion.m4
7073@@ -7,17 +7,17 @@
7074 # unlimited permission to copy and/or distribute it, with or without
7075 # modifications, as long as this notice is preserved.
7076
7077-# Generated from ltversion.in.
7078+# @configure_input@
7079
7080-# serial 3134 ltversion.m4
7081+# serial 3293 ltversion.m4
7082 # This file is part of GNU Libtool
7083
7084-m4_define([LT_PACKAGE_VERSION], [2.2.7a])
7085-m4_define([LT_PACKAGE_REVISION], [1.3134])
7086+m4_define([LT_PACKAGE_VERSION], [2.4])
7087+m4_define([LT_PACKAGE_REVISION], [1.3293])
7088
7089 AC_DEFUN([LTVERSION_VERSION],
7090-[macro_version='2.2.7a'
7091-macro_revision='1.3134'
7092+[macro_version='2.4'
7093+macro_revision='1.3293'
7094 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7095 _LT_DECL(, macro_revision, 0)
7096 ])
7097Index: binutils-2.21.1/lt~obsolete.m4
7098===================================================================
7099--- binutils-2.21.1.orig/lt~obsolete.m4
7100+++ binutils-2.21.1/lt~obsolete.m4
7101@@ -7,7 +7,7 @@
7102 # unlimited permission to copy and/or distribute it, with or without
7103 # modifications, as long as this notice is preserved.
7104
7105-# serial 4 lt~obsolete.m4
7106+# serial 5 lt~obsolete.m4
7107
7108 # These exist entirely to fool aclocal when bootstrapping libtool.
7109 #
7110Index: binutils-2.21.1/configure
7111===================================================================
7112--- binutils-2.21.1.orig/configure
7113+++ binutils-2.21.1/configure
7114@@ -2670,7 +2670,7 @@ host_libs="intl mmalloc libiberty opcode
7115 # binutils, gas and ld appear in that order because it makes sense to run
7116 # "make check" in that particular order.
7117 # If --enable-gold is used, "gold" may replace "ld".
7118-host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
7119+host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
7120
7121 # libgcj represents the runtime libraries only used by gcj.
7122 libgcj="target-libffi \
7123@@ -7597,7 +7597,7 @@ case " $build_configdirs " in
7124 # For an installed makeinfo, we require it to be from texinfo 4.7 or
7125 # higher, else we use the "missing" dummy.
7126 if ${MAKEINFO} --version \
7127- | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
7128+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4.[4-9]|4.[1-9][0-9]+|[5-9])' >/dev/null 2>&1; then
7129 :
7130 else
7131 MAKEINFO="$MISSING makeinfo"
7132Index: binutils-2.21.1/bfd/configure
7133===================================================================
7134--- binutils-2.21.1.orig/bfd/configure
7135+++ binutils-2.21.1/bfd/configure
7136@@ -667,6 +667,9 @@ OTOOL
7137 LIPO
7138 NMEDIT
7139 DSYMUTIL
7140+MANIFEST_TOOL
7141+ac_ct_AR
7142+DLLTOOL
7143 OBJDUMP
7144 LN_S
7145 NM
7146@@ -779,6 +782,7 @@ enable_static
7147 with_pic
7148 enable_fast_install
7149 with_gnu_ld
7150+with_libtool_sysroot
7151 enable_libtool_lock
7152 enable_plugins
7153 enable_largefile
7154@@ -1453,6 +1457,8 @@ Optional Packages:
7155 --with-pic try to use only PIC/non-PIC objects [default=use
7156 both]
7157 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
7158+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
7159+ (or the compiler's sysroot if not specified).
7160 --with-mmap try using mmap for BFD input files if available
7161 --with-separate-debug-dir=DIR
7162 Look for global separate debug info in DIR
7163@@ -5383,8 +5389,8 @@ esac
7164
7165
7166
7167-macro_version='2.2.7a'
7168-macro_revision='1.3134'
7169+macro_version='2.4'
7170+macro_revision='1.3293'
7171
7172
7173
7174@@ -5424,7 +5430,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7176 $as_echo_n "checking how to print strings... " >&6; }
7177 # Test print first, because it will be a builtin if present.
7178-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
7179+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7180 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7181 ECHO='print -r --'
7182 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7183@@ -6110,8 +6116,8 @@ $as_echo_n "checking whether the shell u
7184 # Try some XSI features
7185 xsi_shell=no
7186 ( _lt_dummy="a/b/c"
7187- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7188- = c,a/b,, \
7189+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7190+ = c,a/b,b/c, \
7191 && eval 'test $(( 1 + 1 )) -eq 2 \
7192 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7193 && xsi_shell=yes
7194@@ -6160,6 +6166,80 @@ esac
7195
7196
7197
7198+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7199+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7200+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
7201+ $as_echo_n "(cached) " >&6
7202+else
7203+ case $host in
7204+ *-*-mingw* )
7205+ case $build in
7206+ *-*-mingw* ) # actually msys
7207+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7208+ ;;
7209+ *-*-cygwin* )
7210+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7211+ ;;
7212+ * ) # otherwise, assume *nix
7213+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7214+ ;;
7215+ esac
7216+ ;;
7217+ *-*-cygwin* )
7218+ case $build in
7219+ *-*-mingw* ) # actually msys
7220+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7221+ ;;
7222+ *-*-cygwin* )
7223+ lt_cv_to_host_file_cmd=func_convert_file_noop
7224+ ;;
7225+ * ) # otherwise, assume *nix
7226+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7227+ ;;
7228+ esac
7229+ ;;
7230+ * ) # unhandled hosts (and "normal" native builds)
7231+ lt_cv_to_host_file_cmd=func_convert_file_noop
7232+ ;;
7233+esac
7234+
7235+fi
7236+
7237+to_host_file_cmd=$lt_cv_to_host_file_cmd
7238+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7239+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
7240+
7241+
7242+
7243+
7244+
7245+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7246+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7247+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
7248+ $as_echo_n "(cached) " >&6
7249+else
7250+ #assume ordinary cross tools, or native build.
7251+lt_cv_to_tool_file_cmd=func_convert_file_noop
7252+case $host in
7253+ *-*-mingw* )
7254+ case $build in
7255+ *-*-mingw* ) # actually msys
7256+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7257+ ;;
7258+ esac
7259+ ;;
7260+esac
7261+
7262+fi
7263+
7264+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7265+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7266+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7267+
7268+
7269+
7270+
7271+
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7273 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7274 if test "${lt_cv_ld_reload_flag+set}" = set; then :
7275@@ -6176,6 +6256,11 @@ case $reload_flag in
7276 esac
7277 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7278 case $host_os in
7279+ cygwin* | mingw* | pw32* | cegcc*)
7280+ if test "$GCC" != yes; then
7281+ reload_cmds=false
7282+ fi
7283+ ;;
7284 darwin*)
7285 if test "$GCC" = yes; then
7286 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
7287@@ -6344,7 +6429,8 @@ mingw* | pw32*)
7288 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7289 lt_cv_file_magic_cmd='func_win32_libid'
7290 else
7291- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
7292+ # Keep this pattern in sync with the one in func_win32_libid.
7293+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7294 lt_cv_file_magic_cmd='$OBJDUMP -f'
7295 fi
7296 ;;
7297@@ -6498,6 +6584,21 @@ esac
7298 fi
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7300 $as_echo "$lt_cv_deplibs_check_method" >&6; }
7301+
7302+file_magic_glob=
7303+want_nocaseglob=no
7304+if test "$build" = "$host"; then
7305+ case $host_os in
7306+ mingw* | pw32*)
7307+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7308+ want_nocaseglob=yes
7309+ else
7310+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7311+ fi
7312+ ;;
7313+ esac
7314+fi
7315+
7316 file_magic_cmd=$lt_cv_file_magic_cmd
7317 deplibs_check_method=$lt_cv_deplibs_check_method
7318 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7319@@ -6513,9 +6614,162 @@ test -z "$deplibs_check_method" && depli
7320
7321
7322
7323+
7324+
7325+
7326+
7327+
7328+
7329+
7330+
7331+
7332+
7333 if test -n "$ac_tool_prefix"; then
7334- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7335-set dummy ${ac_tool_prefix}ar; ac_word=$2
7336+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7337+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7338+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7339+$as_echo_n "checking for $ac_word... " >&6; }
7340+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7341+ $as_echo_n "(cached) " >&6
7342+else
7343+ if test -n "$DLLTOOL"; then
7344+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7345+else
7346+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7347+for as_dir in $PATH
7348+do
7349+ IFS=$as_save_IFS
7350+ test -z "$as_dir" && as_dir=.
7351+ for ac_exec_ext in '' $ac_executable_extensions; do
7352+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7353+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7354+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7355+ break 2
7356+ fi
7357+done
7358+ done
7359+IFS=$as_save_IFS
7360+
7361+fi
7362+fi
7363+DLLTOOL=$ac_cv_prog_DLLTOOL
7364+if test -n "$DLLTOOL"; then
7365+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7366+$as_echo "$DLLTOOL" >&6; }
7367+else
7368+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7369+$as_echo "no" >&6; }
7370+fi
7371+
7372+
7373+fi
7374+if test -z "$ac_cv_prog_DLLTOOL"; then
7375+ ac_ct_DLLTOOL=$DLLTOOL
7376+ # Extract the first word of "dlltool", so it can be a program name with args.
7377+set dummy dlltool; ac_word=$2
7378+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7379+$as_echo_n "checking for $ac_word... " >&6; }
7380+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7381+ $as_echo_n "(cached) " >&6
7382+else
7383+ if test -n "$ac_ct_DLLTOOL"; then
7384+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7385+else
7386+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387+for as_dir in $PATH
7388+do
7389+ IFS=$as_save_IFS
7390+ test -z "$as_dir" && as_dir=.
7391+ for ac_exec_ext in '' $ac_executable_extensions; do
7392+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7393+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7394+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7395+ break 2
7396+ fi
7397+done
7398+ done
7399+IFS=$as_save_IFS
7400+
7401+fi
7402+fi
7403+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7404+if test -n "$ac_ct_DLLTOOL"; then
7405+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7406+$as_echo "$ac_ct_DLLTOOL" >&6; }
7407+else
7408+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409+$as_echo "no" >&6; }
7410+fi
7411+
7412+ if test "x$ac_ct_DLLTOOL" = x; then
7413+ DLLTOOL="false"
7414+ else
7415+ case $cross_compiling:$ac_tool_warned in
7416+yes:)
7417+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7418+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7419+ac_tool_warned=yes ;;
7420+esac
7421+ DLLTOOL=$ac_ct_DLLTOOL
7422+ fi
7423+else
7424+ DLLTOOL="$ac_cv_prog_DLLTOOL"
7425+fi
7426+
7427+test -z "$DLLTOOL" && DLLTOOL=dlltool
7428+
7429+
7430+
7431+
7432+
7433+
7434+
7435+
7436+
7437+
7438+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
7439+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
7440+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
7441+ $as_echo_n "(cached) " >&6
7442+else
7443+ lt_cv_sharedlib_from_linklib_cmd='unknown'
7444+
7445+case $host_os in
7446+cygwin* | mingw* | pw32* | cegcc*)
7447+ # two different shell functions defined in ltmain.sh
7448+ # decide which to use based on capabilities of $DLLTOOL
7449+ case `$DLLTOOL --help 2>&1` in
7450+ *--identify-strict*)
7451+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7452+ ;;
7453+ *)
7454+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7455+ ;;
7456+ esac
7457+ ;;
7458+*)
7459+ # fallback: assume linklib IS sharedlib
7460+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
7461+ ;;
7462+esac
7463+
7464+fi
7465+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
7466+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
7467+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7468+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7469+
7470+
7471+
7472+
7473+
7474+
7475+
7476+if test -n "$ac_tool_prefix"; then
7477+ for ac_prog in ar
7478+ do
7479+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7480+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7482 $as_echo_n "checking for $ac_word... " >&6; }
7483 if test "${ac_cv_prog_AR+set}" = set; then :
7484@@ -6531,7 +6785,7 @@ do
7485 test -z "$as_dir" && as_dir=.
7486 for ac_exec_ext in '' $ac_executable_extensions; do
7487 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7488- ac_cv_prog_AR="${ac_tool_prefix}ar"
7489+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7491 break 2
7492 fi
7493@@ -6551,11 +6805,15 @@ $as_echo "no" >&6; }
7494 fi
7495
7496
7497+ test -n "$AR" && break
7498+ done
7499 fi
7500-if test -z "$ac_cv_prog_AR"; then
7501+if test -z "$AR"; then
7502 ac_ct_AR=$AR
7503- # Extract the first word of "ar", so it can be a program name with args.
7504-set dummy ar; ac_word=$2
7505+ for ac_prog in ar
7506+do
7507+ # Extract the first word of "$ac_prog", so it can be a program name with args.
7508+set dummy $ac_prog; ac_word=$2
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7510 $as_echo_n "checking for $ac_word... " >&6; }
7511 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7512@@ -6571,7 +6829,7 @@ do
7513 test -z "$as_dir" && as_dir=.
7514 for ac_exec_ext in '' $ac_executable_extensions; do
7515 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7516- ac_cv_prog_ac_ct_AR="ar"
7517+ ac_cv_prog_ac_ct_AR="$ac_prog"
7518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519 break 2
7520 fi
7521@@ -6590,6 +6848,10 @@ else
7522 $as_echo "no" >&6; }
7523 fi
7524
7525+
7526+ test -n "$ac_ct_AR" && break
7527+done
7528+
7529 if test "x$ac_ct_AR" = x; then
7530 AR="false"
7531 else
7532@@ -6601,16 +6863,72 @@ ac_tool_warned=yes ;;
7533 esac
7534 AR=$ac_ct_AR
7535 fi
7536-else
7537- AR="$ac_cv_prog_AR"
7538 fi
7539
7540-test -z "$AR" && AR=ar
7541-test -z "$AR_FLAGS" && AR_FLAGS=cru
7542+: ${AR=ar}
7543+: ${AR_FLAGS=cru}
7544+
7545+
7546+
7547+
7548+
7549+
7550+
7551+
7552+
7553+
7554
7555+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
7556+$as_echo_n "checking for archiver @FILE support... " >&6; }
7557+if test "${lt_cv_ar_at_file+set}" = set; then :
7558+ $as_echo_n "(cached) " >&6
7559+else
7560+ lt_cv_ar_at_file=no
7561+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7562+/* end confdefs.h. */
7563
7564+int
7565+main ()
7566+{
7567
7568+ ;
7569+ return 0;
7570+}
7571+_ACEOF
7572+if ac_fn_c_try_compile "$LINENO"; then :
7573+ echo conftest.$ac_objext > conftest.lst
7574+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
7575+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7576+ (eval $lt_ar_try) 2>&5
7577+ ac_status=$?
7578+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7579+ test $ac_status = 0; }
7580+ if test "$ac_status" -eq 0; then
7581+ # Ensure the archiver fails upon bogus file names.
7582+ rm -f conftest.$ac_objext libconftest.a
7583+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7584+ (eval $lt_ar_try) 2>&5
7585+ ac_status=$?
7586+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7587+ test $ac_status = 0; }
7588+ if test "$ac_status" -ne 0; then
7589+ lt_cv_ar_at_file=@
7590+ fi
7591+ fi
7592+ rm -f conftest.* libconftest.a
7593
7594+fi
7595+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7596+
7597+fi
7598+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
7599+$as_echo "$lt_cv_ar_at_file" >&6; }
7600+
7601+if test "x$lt_cv_ar_at_file" = xno; then
7602+ archiver_list_spec=
7603+else
7604+ archiver_list_spec=$lt_cv_ar_at_file
7605+fi
7606
7607
7608
7609@@ -6952,8 +7270,8 @@ esac
7610 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7611
7612 # Transform an extracted symbol line into symbol name and symbol address
7613-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
7614-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
7615+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
7616+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
7617
7618 # Handle CRLF in mingw tool chain
7619 opt_cr=
7620@@ -6989,6 +7307,7 @@ for ac_symprfx in "" "_"; do
7621 else
7622 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7623 fi
7624+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7625
7626 # Check to see that the pipe works correctly.
7627 pipe_works=no
7628@@ -7030,6 +7349,18 @@ _LT_EOF
7629 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7630 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7631 cat <<_LT_EOF > conftest.$ac_ext
7632+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
7633+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
7634+/* DATA imports from DLLs on WIN32 con't be const, because runtime
7635+ relocations are performed -- see ld's documentation on pseudo-relocs. */
7636+# define LT_DLSYM_CONST
7637+#elif defined(__osf__)
7638+/* This system does not cope well with relocations in const data. */
7639+# define LT_DLSYM_CONST
7640+#else
7641+# define LT_DLSYM_CONST const
7642+#endif
7643+
7644 #ifdef __cplusplus
7645 extern "C" {
7646 #endif
7647@@ -7041,7 +7372,7 @@ _LT_EOF
7648 cat <<_LT_EOF >> conftest.$ac_ext
7649
7650 /* The mapping between symbol names and symbols. */
7651-const struct {
7652+LT_DLSYM_CONST struct {
7653 const char *name;
7654 void *address;
7655 }
7656@@ -7067,8 +7398,8 @@ static const void *lt_preloaded_setup()
7657 _LT_EOF
7658 # Now try linking the two files.
7659 mv conftest.$ac_objext conftstm.$ac_objext
7660- lt_save_LIBS="$LIBS"
7661- lt_save_CFLAGS="$CFLAGS"
7662+ lt_globsym_save_LIBS=$LIBS
7663+ lt_globsym_save_CFLAGS=$CFLAGS
7664 LIBS="conftstm.$ac_objext"
7665 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7666 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7667@@ -7078,8 +7409,8 @@ _LT_EOF
7668 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7669 pipe_works=yes
7670 fi
7671- LIBS="$lt_save_LIBS"
7672- CFLAGS="$lt_save_CFLAGS"
7673+ LIBS=$lt_globsym_save_LIBS
7674+ CFLAGS=$lt_globsym_save_CFLAGS
7675 else
7676 echo "cannot find nm_test_func in $nlist" >&5
7677 fi
7678@@ -7116,6 +7447,20 @@ else
7679 $as_echo "ok" >&6; }
7680 fi
7681
7682+# Response file support.
7683+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7684+ nm_file_list_spec='@'
7685+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7686+ nm_file_list_spec='@'
7687+fi
7688+
7689+
7690+
7691+
7692+
7693+
7694+
7695+
7696
7697
7698
7699@@ -7135,6 +7480,41 @@ fi
7700
7701
7702
7703+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7704+$as_echo_n "checking for sysroot... " >&6; }
7705+
7706+# Check whether --with-libtool-sysroot was given.
7707+if test "${with_libtool_sysroot+set}" = set; then :
7708+ withval=$with_libtool_sysroot;
7709+else
7710+ with_libtool_sysroot=no
7711+fi
7712+
7713+
7714+lt_sysroot=
7715+case ${with_libtool_sysroot} in #(
7716+ yes)
7717+ if test "$GCC" = yes; then
7718+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7719+ fi
7720+ ;; #(
7721+ /*)
7722+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
7723+ ;; #(
7724+ no|'')
7725+ ;; #(
7726+ *)
7727+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
7728+$as_echo "${with_libtool_sysroot}" >&6; }
7729+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
7730+ ;;
7731+esac
7732+
7733+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7734+$as_echo "${lt_sysroot:-no}" >&6; }
7735+
7736+
7737+
7738
7739
7740 # Check whether --enable-libtool-lock was given.
7741@@ -7330,6 +7710,123 @@ esac
7742
7743 need_locks="$enable_libtool_lock"
7744
7745+if test -n "$ac_tool_prefix"; then
7746+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
7747+set dummy ${ac_tool_prefix}mt; ac_word=$2
7748+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7749+$as_echo_n "checking for $ac_word... " >&6; }
7750+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
7751+ $as_echo_n "(cached) " >&6
7752+else
7753+ if test -n "$MANIFEST_TOOL"; then
7754+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
7755+else
7756+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7757+for as_dir in $PATH
7758+do
7759+ IFS=$as_save_IFS
7760+ test -z "$as_dir" && as_dir=.
7761+ for ac_exec_ext in '' $ac_executable_extensions; do
7762+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7763+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
7764+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7765+ break 2
7766+ fi
7767+done
7768+ done
7769+IFS=$as_save_IFS
7770+
7771+fi
7772+fi
7773+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
7774+if test -n "$MANIFEST_TOOL"; then
7775+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
7776+$as_echo "$MANIFEST_TOOL" >&6; }
7777+else
7778+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7779+$as_echo "no" >&6; }
7780+fi
7781+
7782+
7783+fi
7784+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
7785+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
7786+ # Extract the first word of "mt", so it can be a program name with args.
7787+set dummy mt; ac_word=$2
7788+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7789+$as_echo_n "checking for $ac_word... " >&6; }
7790+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
7791+ $as_echo_n "(cached) " >&6
7792+else
7793+ if test -n "$ac_ct_MANIFEST_TOOL"; then
7794+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
7795+else
7796+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7797+for as_dir in $PATH
7798+do
7799+ IFS=$as_save_IFS
7800+ test -z "$as_dir" && as_dir=.
7801+ for ac_exec_ext in '' $ac_executable_extensions; do
7802+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7803+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
7804+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7805+ break 2
7806+ fi
7807+done
7808+ done
7809+IFS=$as_save_IFS
7810+
7811+fi
7812+fi
7813+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
7814+if test -n "$ac_ct_MANIFEST_TOOL"; then
7815+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
7816+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
7817+else
7818+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819+$as_echo "no" >&6; }
7820+fi
7821+
7822+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
7823+ MANIFEST_TOOL=":"
7824+ else
7825+ case $cross_compiling:$ac_tool_warned in
7826+yes:)
7827+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7828+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7829+ac_tool_warned=yes ;;
7830+esac
7831+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
7832+ fi
7833+else
7834+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
7835+fi
7836+
7837+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7838+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
7839+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
7840+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
7841+ $as_echo_n "(cached) " >&6
7842+else
7843+ lt_cv_path_mainfest_tool=no
7844+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
7845+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7846+ cat conftest.err >&5
7847+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7848+ lt_cv_path_mainfest_tool=yes
7849+ fi
7850+ rm -f conftest*
7851+fi
7852+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7853+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
7854+if test "x$lt_cv_path_mainfest_tool" != xyes; then
7855+ MANIFEST_TOOL=:
7856+fi
7857+
7858+
7859+
7860+
7861+
7862
7863 case $host_os in
7864 rhapsody* | darwin*)
7865@@ -7893,6 +8390,8 @@ _LT_EOF
7866 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
7867 echo "$AR cru libconftest.a conftest.o" >&5
7868 $AR cru libconftest.a conftest.o 2>&5
7869+ echo "$RANLIB libconftest.a" >&5
7870+ $RANLIB libconftest.a 2>&5
7871 cat > conftest.c << _LT_EOF
7872 int main() { return 0;}
7873 _LT_EOF
7874@@ -8057,7 +8556,8 @@ fi
7875 LIBTOOL_DEPS="$ltmain"
7876
7877 # Always use our own libtool.
7878-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7879+LIBTOOL='$(SHELL) $(top_builddir)'
7880+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
7881
7882
7883
7884@@ -8146,7 +8646,7 @@ aix3*)
7885 esac
7886
7887 # Global variables:
7888-ofile=libtool
7889+ofile=${host_alias}-libtool
7890 can_build_shared=yes
7891
7892 # All known linkers require a `.a' archive for static linking (except MSVC,
7893@@ -8444,8 +8944,6 @@ fi
7894 lt_prog_compiler_pic=
7895 lt_prog_compiler_static=
7896
7897-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7898-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
7899
7900 if test "$GCC" = yes; then
7901 lt_prog_compiler_wl='-Wl,'
7902@@ -8610,6 +9108,12 @@ $as_echo_n "checking for $compiler optio
7903 lt_prog_compiler_pic='--shared'
7904 lt_prog_compiler_static='--static'
7905 ;;
7906+ nagfor*)
7907+ # NAG Fortran compiler
7908+ lt_prog_compiler_wl='-Wl,-Wl,,'
7909+ lt_prog_compiler_pic='-PIC'
7910+ lt_prog_compiler_static='-Bstatic'
7911+ ;;
7912 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
7913 # Portland Group compilers (*not* the Pentium gcc compiler,
7914 # which looks to be a dead project)
7915@@ -8672,7 +9176,7 @@ $as_echo_n "checking for $compiler optio
7916 lt_prog_compiler_pic='-KPIC'
7917 lt_prog_compiler_static='-Bstatic'
7918 case $cc_basename in
7919- f77* | f90* | f95*)
7920+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
7921 lt_prog_compiler_wl='-Qoption ld ';;
7922 *)
7923 lt_prog_compiler_wl='-Wl,';;
7924@@ -8729,13 +9233,17 @@ case $host_os in
7925 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7926 ;;
7927 esac
7928-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
7929-$as_echo "$lt_prog_compiler_pic" >&6; }
7930-
7931-
7932-
7933-
7934
7935+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7936+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
7937+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
7938+ $as_echo_n "(cached) " >&6
7939+else
7940+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
7941+fi
7942+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
7943+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
7944+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
7945
7946 #
7947 # Check to make sure the PIC flag actually works.
7948@@ -8796,6 +9304,11 @@ fi
7949
7950
7951
7952+
7953+
7954+
7955+
7956+
7957 #
7958 # Check to make sure the static flag actually works.
7959 #
7960@@ -9146,7 +9659,8 @@ _LT_EOF
7961 allow_undefined_flag=unsupported
7962 always_export_symbols=no
7963 enable_shared_with_static_runtimes=yes
7964- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
7965+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
7966+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
7967
7968 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7969 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7970@@ -9194,7 +9708,7 @@ _LT_EOF
7971 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7972 && test "$tmp_diet" = no
7973 then
7974- tmp_addflag=
7975+ tmp_addflag=' $pic_flag'
7976 tmp_sharedflag='-shared'
7977 case $cc_basename,$host_cpu in
7978 pgcc*) # Portland Group C compiler
7979@@ -9245,12 +9759,12 @@ _LT_EOF
7980 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
7981 hardcode_libdir_flag_spec=
7982 hardcode_libdir_flag_spec_ld='-rpath $libdir'
7983- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
7984+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7985 if test "x$supports_anon_versioning" = xyes; then
7986 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
7987 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7988 echo "local: *; };" >> $output_objdir/$libname.ver~
7989- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7990+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7991 fi
7992 ;;
7993 esac
7994@@ -9264,8 +9778,8 @@ _LT_EOF
7995 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7996 wlarc=
7997 else
7998- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7999- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8000+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8001+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8002 fi
8003 ;;
8004
8005@@ -9283,8 +9797,8 @@ _LT_EOF
8006
8007 _LT_EOF
8008 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8009- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8010- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8011+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8012+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8013 else
8014 ld_shlibs=no
8015 fi
8016@@ -9330,8 +9844,8 @@ _LT_EOF
8017
8018 *)
8019 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8020- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8021- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8022+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8023+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8024 else
8025 ld_shlibs=no
8026 fi
8027@@ -9461,7 +9975,13 @@ _LT_EOF
8028 allow_undefined_flag='-berok'
8029 # Determine the default libpath from the value encoded in an
8030 # empty executable.
8031- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8032+ if test "${lt_cv_aix_libpath+set}" = set; then
8033+ aix_libpath=$lt_cv_aix_libpath
8034+else
8035+ if test "${lt_cv_aix_libpath_+set}" = set; then :
8036+ $as_echo_n "(cached) " >&6
8037+else
8038+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8039 /* end confdefs.h. */
8040
8041 int
8042@@ -9474,22 +9994,29 @@ main ()
8043 _ACEOF
8044 if ac_fn_c_try_link "$LINENO"; then :
8045
8046-lt_aix_libpath_sed='
8047- /Import File Strings/,/^$/ {
8048- /^0/ {
8049- s/^0 *\(.*\)$/\1/
8050- p
8051- }
8052- }'
8053-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8054-# Check for a 64-bit object if we didn't find anything.
8055-if test -z "$aix_libpath"; then
8056- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8057-fi
8058+ lt_aix_libpath_sed='
8059+ /Import File Strings/,/^$/ {
8060+ /^0/ {
8061+ s/^0 *\([^ ]*\) *$/\1/
8062+ p
8063+ }
8064+ }'
8065+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8066+ # Check for a 64-bit object if we didn't find anything.
8067+ if test -z "$lt_cv_aix_libpath_"; then
8068+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8069+ fi
8070 fi
8071 rm -f core conftest.err conftest.$ac_objext \
8072 conftest$ac_exeext conftest.$ac_ext
8073-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8074+ if test -z "$lt_cv_aix_libpath_"; then
8075+ lt_cv_aix_libpath_="/usr/lib:/lib"
8076+ fi
8077+
8078+fi
8079+
8080+ aix_libpath=$lt_cv_aix_libpath_
8081+fi
8082
8083 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8084 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8085@@ -9501,7 +10028,13 @@ if test -z "$aix_libpath"; then aix_libp
8086 else
8087 # Determine the default libpath from the value encoded in an
8088 # empty executable.
8089- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8090+ if test "${lt_cv_aix_libpath+set}" = set; then
8091+ aix_libpath=$lt_cv_aix_libpath
8092+else
8093+ if test "${lt_cv_aix_libpath_+set}" = set; then :
8094+ $as_echo_n "(cached) " >&6
8095+else
8096+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8097 /* end confdefs.h. */
8098
8099 int
8100@@ -9514,22 +10047,29 @@ main ()
8101 _ACEOF
8102 if ac_fn_c_try_link "$LINENO"; then :
8103
8104-lt_aix_libpath_sed='
8105- /Import File Strings/,/^$/ {
8106- /^0/ {
8107- s/^0 *\(.*\)$/\1/
8108- p
8109- }
8110- }'
8111-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8112-# Check for a 64-bit object if we didn't find anything.
8113-if test -z "$aix_libpath"; then
8114- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8115-fi
8116+ lt_aix_libpath_sed='
8117+ /Import File Strings/,/^$/ {
8118+ /^0/ {
8119+ s/^0 *\([^ ]*\) *$/\1/
8120+ p
8121+ }
8122+ }'
8123+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8124+ # Check for a 64-bit object if we didn't find anything.
8125+ if test -z "$lt_cv_aix_libpath_"; then
8126+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8127+ fi
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext \
8130 conftest$ac_exeext conftest.$ac_ext
8131-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8132+ if test -z "$lt_cv_aix_libpath_"; then
8133+ lt_cv_aix_libpath_="/usr/lib:/lib"
8134+ fi
8135+
8136+fi
8137+
8138+ aix_libpath=$lt_cv_aix_libpath_
8139+fi
8140
8141 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8142 # Warning - without using the other run time loading flags,
8143@@ -9574,20 +10114,63 @@ if test -z "$aix_libpath"; then aix_libp
8144 # Microsoft Visual C++.
8145 # hardcode_libdir_flag_spec is actually meaningless, as there is
8146 # no search path for DLLs.
8147- hardcode_libdir_flag_spec=' '
8148- allow_undefined_flag=unsupported
8149- # Tell ltmain to make .lib files, not .a files.
8150- libext=lib
8151- # Tell ltmain to make .dll files, not .so files.
8152- shrext_cmds=".dll"
8153- # FIXME: Setting linknames here is a bad hack.
8154- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
8155- # The linker will automatically build a .lib file if we build a DLL.
8156- old_archive_from_new_cmds='true'
8157- # FIXME: Should let the user specify the lib program.
8158- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8159- fix_srcfile_path='`cygpath -w "$srcfile"`'
8160- enable_shared_with_static_runtimes=yes
8161+ case $cc_basename in
8162+ cl*)
8163+ # Native MSVC
8164+ hardcode_libdir_flag_spec=' '
8165+ allow_undefined_flag=unsupported
8166+ always_export_symbols=yes
8167+ file_list_spec='@'
8168+ # Tell ltmain to make .lib files, not .a files.
8169+ libext=lib
8170+ # Tell ltmain to make .dll files, not .so files.
8171+ shrext_cmds=".dll"
8172+ # FIXME: Setting linknames here is a bad hack.
8173+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8174+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8175+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8176+ else
8177+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8178+ fi~
8179+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8180+ linknames='
8181+ # The linker will not automatically build a static lib if we build a DLL.
8182+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
8183+ enable_shared_with_static_runtimes=yes
8184+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8185+ # Don't use ranlib
8186+ old_postinstall_cmds='chmod 644 $oldlib'
8187+ postlink_cmds='lt_outputfile="@OUTPUT@"~
8188+ lt_tool_outputfile="@TOOL_OUTPUT@"~
8189+ case $lt_outputfile in
8190+ *.exe|*.EXE) ;;
8191+ *)
8192+ lt_outputfile="$lt_outputfile.exe"
8193+ lt_tool_outputfile="$lt_tool_outputfile.exe"
8194+ ;;
8195+ esac~
8196+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8197+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8198+ $RM "$lt_outputfile.manifest";
8199+ fi'
8200+ ;;
8201+ *)
8202+ # Assume MSVC wrapper
8203+ hardcode_libdir_flag_spec=' '
8204+ allow_undefined_flag=unsupported
8205+ # Tell ltmain to make .lib files, not .a files.
8206+ libext=lib
8207+ # Tell ltmain to make .dll files, not .so files.
8208+ shrext_cmds=".dll"
8209+ # FIXME: Setting linknames here is a bad hack.
8210+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
8211+ # The linker will automatically build a .lib file if we build a DLL.
8212+ old_archive_from_new_cmds='true'
8213+ # FIXME: Should let the user specify the lib program.
8214+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8215+ enable_shared_with_static_runtimes=yes
8216+ ;;
8217+ esac
8218 ;;
8219
8220 darwin* | rhapsody*)
8221@@ -9652,7 +10235,7 @@ if test -z "$aix_libpath"; then aix_libp
8222
8223 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8224 freebsd* | dragonfly*)
8225- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8226+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8227 hardcode_libdir_flag_spec='-R$libdir'
8228 hardcode_direct=yes
8229 hardcode_shlibpath_var=no
8230@@ -9660,7 +10243,7 @@ if test -z "$aix_libpath"; then aix_libp
8231
8232 hpux9*)
8233 if test "$GCC" = yes; then
8234- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8235+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8236 else
8237 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8238 fi
8239@@ -9676,7 +10259,7 @@ if test -z "$aix_libpath"; then aix_libp
8240
8241 hpux10*)
8242 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
8243- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8244+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8245 else
8246 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8247 fi
8248@@ -9700,10 +10283,10 @@ if test -z "$aix_libpath"; then aix_libp
8249 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8250 ;;
8251 ia64*)
8252- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8253+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8254 ;;
8255 *)
8256- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8257+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8258 ;;
8259 esac
8260 else
8261@@ -9782,23 +10365,36 @@ fi
8262
8263 irix5* | irix6* | nonstopux*)
8264 if test "$GCC" = yes; then
8265- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8266+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8267 # Try to use the -exported_symbol ld option, if it does not
8268 # work, assume that -exports_file does not work either and
8269 # implicitly export all symbols.
8270- save_LDFLAGS="$LDFLAGS"
8271- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8272- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8273+ # This should be the same for all languages, so no per-tag cache variable.
8274+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
8275+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
8276+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
8277+ $as_echo_n "(cached) " >&6
8278+else
8279+ save_LDFLAGS="$LDFLAGS"
8280+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8281+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8282 /* end confdefs.h. */
8283-int foo(void) {}
8284+int foo (void) { return 0; }
8285 _ACEOF
8286 if ac_fn_c_try_link "$LINENO"; then :
8287- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
8288-
8289+ lt_cv_irix_exported_symbol=yes
8290+else
8291+ lt_cv_irix_exported_symbol=no
8292 fi
8293 rm -f core conftest.err conftest.$ac_objext \
8294 conftest$ac_exeext conftest.$ac_ext
8295- LDFLAGS="$save_LDFLAGS"
8296+ LDFLAGS="$save_LDFLAGS"
8297+fi
8298+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
8299+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
8300+ if test "$lt_cv_irix_exported_symbol" = yes; then
8301+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
8302+ fi
8303 else
8304 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8305 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
8306@@ -9883,7 +10479,7 @@ rm -f core conftest.err conftest.$ac_obj
8307 osf4* | osf5*) # as osf3* with the addition of -msym flag
8308 if test "$GCC" = yes; then
8309 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8310- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8311+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8312 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8313 else
8314 allow_undefined_flag=' -expect_unresolved \*'
8315@@ -9902,9 +10498,9 @@ rm -f core conftest.err conftest.$ac_obj
8316 no_undefined_flag=' -z defs'
8317 if test "$GCC" = yes; then
8318 wlarc='${wl}'
8319- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8320+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8321 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8322- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8323+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8324 else
8325 case `$CC -V 2>&1` in
8326 *"Compilers 5.0"*)
8327@@ -10480,8 +11076,9 @@ cygwin* | mingw* | pw32* | cegcc*)
8328 need_version=no
8329 need_lib_prefix=no
8330
8331- case $GCC,$host_os in
8332- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
8333+ case $GCC,$cc_basename in
8334+ yes,*)
8335+ # gcc
8336 library_names_spec='$libname.dll.a'
8337 # DLL is installed to $(libdir)/../bin by postinstall_cmds
8338 postinstall_cmds='base_file=`basename \${file}`~
8339@@ -10514,13 +11111,71 @@ cygwin* | mingw* | pw32* | cegcc*)
8340 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8341 ;;
8342 esac
8343+ dynamic_linker='Win32 ld.exe'
8344+ ;;
8345+
8346+ *,cl*)
8347+ # Native MSVC
8348+ libname_spec='$name'
8349+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8350+ library_names_spec='${libname}.dll.lib'
8351+
8352+ case $build_os in
8353+ mingw*)
8354+ sys_lib_search_path_spec=
8355+ lt_save_ifs=$IFS
8356+ IFS=';'
8357+ for lt_path in $LIB
8358+ do
8359+ IFS=$lt_save_ifs
8360+ # Let DOS variable expansion print the short 8.3 style file name.
8361+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
8362+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
8363+ done
8364+ IFS=$lt_save_ifs
8365+ # Convert to MSYS style.
8366+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
8367+ ;;
8368+ cygwin*)
8369+ # Convert to unix form, then to dos form, then back to unix form
8370+ # but this time dos style (no spaces!) so that the unix form looks
8371+ # like /cygdrive/c/PROGRA~1:/cygdr...
8372+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
8373+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
8374+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8375+ ;;
8376+ *)
8377+ sys_lib_search_path_spec="$LIB"
8378+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
8379+ # It is most probably a Windows format PATH.
8380+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8381+ else
8382+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8383+ fi
8384+ # FIXME: find the short name or the path components, as spaces are
8385+ # common. (e.g. "Program Files" -> "PROGRA~1")
8386+ ;;
8387+ esac
8388+
8389+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
8390+ postinstall_cmds='base_file=`basename \${file}`~
8391+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
8392+ dldir=$destdir/`dirname \$dlpath`~
8393+ test -d \$dldir || mkdir -p \$dldir~
8394+ $install_prog $dir/$dlname \$dldir/$dlname'
8395+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
8396+ dlpath=$dir/\$dldll~
8397+ $RM \$dlpath'
8398+ shlibpath_overrides_runpath=yes
8399+ dynamic_linker='Win32 link.exe'
8400 ;;
8401
8402 *)
8403+ # Assume MSVC wrapper
8404 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
8405+ dynamic_linker='Win32 ld.exe'
8406 ;;
8407 esac
8408- dynamic_linker='Win32 ld.exe'
8409 # FIXME: first we should search . and the directory the executable is in
8410 shlibpath_var=PATH
8411 ;;
8412@@ -10616,7 +11271,7 @@ haiku*)
8413 soname_spec='${libname}${release}${shared_ext}$major'
8414 shlibpath_var=LIBRARY_PATH
8415 shlibpath_overrides_runpath=yes
8416- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
8417+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
8418 hardcode_into_libs=yes
8419 ;;
8420
8421@@ -11412,7 +12067,7 @@ else
8422 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8423 lt_status=$lt_dlunknown
8424 cat > conftest.$ac_ext <<_LT_EOF
8425-#line 11415 "configure"
8426+#line $LINENO "configure"
8427 #include "confdefs.h"
8428
8429 #if HAVE_DLFCN_H
8430@@ -11456,10 +12111,10 @@ else
8431 /* When -fvisbility=hidden is used, assume the code has been annotated
8432 correspondingly for the symbols needed. */
8433 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
8434-void fnord () __attribute__((visibility("default")));
8435+int fnord () __attribute__((visibility("default")));
8436 #endif
8437
8438-void fnord () { int i=42; }
8439+int fnord () { return 42; }
8440 int main ()
8441 {
8442 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
8443@@ -11518,7 +12173,7 @@ else
8444 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8445 lt_status=$lt_dlunknown
8446 cat > conftest.$ac_ext <<_LT_EOF
8447-#line 11521 "configure"
8448+#line $LINENO "configure"
8449 #include "confdefs.h"
8450
8451 #if HAVE_DLFCN_H
8452@@ -11562,10 +12217,10 @@ else
8453 /* When -fvisbility=hidden is used, assume the code has been annotated
8454 correspondingly for the symbols needed. */
8455 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
8456-void fnord () __attribute__((visibility("default")));
8457+int fnord () __attribute__((visibility("default")));
8458 #endif
8459
8460-void fnord () { int i=42; }
8461+int fnord () { return 42; }
8462 int main ()
8463 {
8464 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
8465@@ -15045,7 +15700,7 @@ SHARED_LDFLAGS=
8466 if test "$enable_shared" = "yes"; then
8467 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
8468 if test -n "$x"; then
8469- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
8470+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a"
8471 fi
8472
8473 # More hacks to build DLLs on Windows.
8474@@ -16619,13 +17274,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
8475 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
8476 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
8477 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
8478+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
8479+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
8480 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
8481 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
8482 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
8483 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
8484 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
8485+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
8486+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
8487+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
8488+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
8489 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
8490 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
8491+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
8492 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
8493 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
8494 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
8495@@ -16640,14 +17302,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
8496 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
8497 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
8498 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
8499+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
8500+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
8501 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
8502 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
8503 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
8504-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
8505 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
8506+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
8507 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
8508 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
8509 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
8510+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
8511 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
8512 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
8513 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
8514@@ -16680,12 +17345,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
8515 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
8516 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
8517 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
8518-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
8519 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
8520 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
8521 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
8522 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
8523 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
8524+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
8525 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
8526 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
8527 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
8528@@ -16740,8 +17405,13 @@ reload_flag \
8529 OBJDUMP \
8530 deplibs_check_method \
8531 file_magic_cmd \
8532+file_magic_glob \
8533+want_nocaseglob \
8534+DLLTOOL \
8535+sharedlib_from_linklib_cmd \
8536 AR \
8537 AR_FLAGS \
8538+archiver_list_spec \
8539 STRIP \
8540 RANLIB \
8541 CC \
8542@@ -16751,12 +17421,14 @@ lt_cv_sys_global_symbol_pipe \
8543 lt_cv_sys_global_symbol_to_cdecl \
8544 lt_cv_sys_global_symbol_to_c_name_address \
8545 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
8546+nm_file_list_spec \
8547 lt_prog_compiler_no_builtin_flag \
8548-lt_prog_compiler_wl \
8549 lt_prog_compiler_pic \
8550+lt_prog_compiler_wl \
8551 lt_prog_compiler_static \
8552 lt_cv_prog_compiler_c_o \
8553 need_locks \
8554+MANIFEST_TOOL \
8555 DSYMUTIL \
8556 NMEDIT \
8557 LIPO \
8558@@ -16772,7 +17444,6 @@ no_undefined_flag \
8559 hardcode_libdir_flag_spec \
8560 hardcode_libdir_flag_spec_ld \
8561 hardcode_libdir_separator \
8562-fix_srcfile_path \
8563 exclude_expsyms \
8564 include_expsyms \
8565 file_list_spec \
8566@@ -16808,6 +17479,7 @@ module_cmds \
8567 module_expsym_cmds \
8568 export_symbols_cmds \
8569 prelink_cmds \
8570+postlink_cmds \
8571 postinstall_cmds \
8572 postuninstall_cmds \
8573 finish_cmds \
8574@@ -17587,7 +18259,8 @@ $as_echo X"$file" |
8575 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
8576 #
8577 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
8578-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
8579+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
8580+# Inc.
8581 # Written by Gordon Matzigkeit, 1996
8582 #
8583 # This file is part of GNU Libtool.
8584@@ -17690,19 +18363,42 @@ SP2NL=$lt_lt_SP2NL
8585 # turn newlines into spaces.
8586 NL2SP=$lt_lt_NL2SP
8587
8588+# convert \$build file names to \$host format.
8589+to_host_file_cmd=$lt_cv_to_host_file_cmd
8590+
8591+# convert \$build files to toolchain format.
8592+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8593+
8594 # An object symbol dumper.
8595 OBJDUMP=$lt_OBJDUMP
8596
8597 # Method to check whether dependent libraries are shared objects.
8598 deplibs_check_method=$lt_deplibs_check_method
8599
8600-# Command to use when deplibs_check_method == "file_magic".
8601+# Command to use when deplibs_check_method = "file_magic".
8602 file_magic_cmd=$lt_file_magic_cmd
8603
8604+# How to find potential files when deplibs_check_method = "file_magic".
8605+file_magic_glob=$lt_file_magic_glob
8606+
8607+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
8608+want_nocaseglob=$lt_want_nocaseglob
8609+
8610+# DLL creation program.
8611+DLLTOOL=$lt_DLLTOOL
8612+
8613+# Command to associate shared and link libraries.
8614+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
8615+
8616 # The archiver.
8617 AR=$lt_AR
8618+
8619+# Flags to create an archive.
8620 AR_FLAGS=$lt_AR_FLAGS
8621
8622+# How to feed a file listing to the archiver.
8623+archiver_list_spec=$lt_archiver_list_spec
8624+
8625 # A symbol stripping program.
8626 STRIP=$lt_STRIP
8627
8628@@ -17732,6 +18428,12 @@ global_symbol_to_c_name_address=$lt_lt_c
8629 # Transform the output of nm in a C name address pair when lib prefix is needed.
8630 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
8631
8632+# Specify filename containing input files for \$NM.
8633+nm_file_list_spec=$lt_nm_file_list_spec
8634+
8635+# The root where to search for dependent libraries,and in which our libraries should be installed.
8636+lt_sysroot=$lt_sysroot
8637+
8638 # The name of the directory that contains temporary libtool files.
8639 objdir=$objdir
8640
8641@@ -17741,6 +18443,9 @@ MAGIC_CMD=$MAGIC_CMD
8642 # Must we lock files when doing compilation?
8643 need_locks=$lt_need_locks
8644
8645+# Manifest tool.
8646+MANIFEST_TOOL=$lt_MANIFEST_TOOL
8647+
8648 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
8649 DSYMUTIL=$lt_DSYMUTIL
8650
8651@@ -17855,12 +18560,12 @@ with_gcc=$GCC
8652 # Compiler flag to turn off builtin functions.
8653 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
8654
8655-# How to pass a linker flag through the compiler.
8656-wl=$lt_lt_prog_compiler_wl
8657-
8658 # Additional compiler flags for building library objects.
8659 pic_flag=$lt_lt_prog_compiler_pic
8660
8661+# How to pass a linker flag through the compiler.
8662+wl=$lt_lt_prog_compiler_wl
8663+
8664 # Compiler flag to prevent dynamic linking.
8665 link_static_flag=$lt_lt_prog_compiler_static
8666
8667@@ -17947,9 +18652,6 @@ inherit_rpath=$inherit_rpath
8668 # Whether libtool must link a program against all its dependency libraries.
8669 link_all_deplibs=$link_all_deplibs
8670
8671-# Fix the shell variable \$srcfile for the compiler.
8672-fix_srcfile_path=$lt_fix_srcfile_path
8673-
8674 # Set to "yes" if exported symbols are required.
8675 always_export_symbols=$always_export_symbols
8676
8677@@ -17965,6 +18667,9 @@ include_expsyms=$lt_include_expsyms
8678 # Commands necessary for linking programs (against libraries) with templates.
8679 prelink_cmds=$lt_prelink_cmds
8680
8681+# Commands necessary for finishing linking programs.
8682+postlink_cmds=$lt_postlink_cmds
8683+
8684 # Specify filename containing input files.
8685 file_list_spec=$lt_file_list_spec
8686
8687@@ -17997,210 +18702,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
8688 # if finds mixed CR/LF and LF-only lines. Since sed operates in
8689 # text mode, it properly converts lines to CR/LF. This bash problem
8690 # is reportedly fixed, but why not run on old versions too?
8691- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
8692- || (rm -f "$cfgfile"; exit 1)
8693-
8694- case $xsi_shell in
8695- yes)
8696- cat << \_LT_EOF >> "$cfgfile"
8697-
8698-# func_dirname file append nondir_replacement
8699-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8700-# otherwise set result to NONDIR_REPLACEMENT.
8701-func_dirname ()
8702-{
8703- case ${1} in
8704- */*) func_dirname_result="${1%/*}${2}" ;;
8705- * ) func_dirname_result="${3}" ;;
8706- esac
8707-}
8708-
8709-# func_basename file
8710-func_basename ()
8711-{
8712- func_basename_result="${1##*/}"
8713-}
8714-
8715-# func_dirname_and_basename file append nondir_replacement
8716-# perform func_basename and func_dirname in a single function
8717-# call:
8718-# dirname: Compute the dirname of FILE. If nonempty,
8719-# add APPEND to the result, otherwise set result
8720-# to NONDIR_REPLACEMENT.
8721-# value returned in "$func_dirname_result"
8722-# basename: Compute filename of FILE.
8723-# value retuned in "$func_basename_result"
8724-# Implementation must be kept synchronized with func_dirname
8725-# and func_basename. For efficiency, we do not delegate to
8726-# those functions but instead duplicate the functionality here.
8727-func_dirname_and_basename ()
8728-{
8729- case ${1} in
8730- */*) func_dirname_result="${1%/*}${2}" ;;
8731- * ) func_dirname_result="${3}" ;;
8732- esac
8733- func_basename_result="${1##*/}"
8734-}
8735-
8736-# func_stripname prefix suffix name
8737-# strip PREFIX and SUFFIX off of NAME.
8738-# PREFIX and SUFFIX must not contain globbing or regex special
8739-# characters, hashes, percent signs, but SUFFIX may contain a leading
8740-# dot (in which case that matches only a dot).
8741-func_stripname ()
8742-{
8743- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8744- # positional parameters, so assign one to ordinary parameter first.
8745- func_stripname_result=${3}
8746- func_stripname_result=${func_stripname_result#"${1}"}
8747- func_stripname_result=${func_stripname_result%"${2}"}
8748-}
8749-
8750-# func_opt_split
8751-func_opt_split ()
8752-{
8753- func_opt_split_opt=${1%%=*}
8754- func_opt_split_arg=${1#*=}
8755-}
8756-
8757-# func_lo2o object
8758-func_lo2o ()
8759-{
8760- case ${1} in
8761- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8762- *) func_lo2o_result=${1} ;;
8763- esac
8764-}
8765-
8766-# func_xform libobj-or-source
8767-func_xform ()
8768-{
8769- func_xform_result=${1%.*}.lo
8770-}
8771-
8772-# func_arith arithmetic-term...
8773-func_arith ()
8774-{
8775- func_arith_result=$(( $* ))
8776-}
8777-
8778-# func_len string
8779-# STRING may not start with a hyphen.
8780-func_len ()
8781-{
8782- func_len_result=${#1}
8783-}
8784-
8785-_LT_EOF
8786- ;;
8787- *) # Bourne compatible functions.
8788- cat << \_LT_EOF >> "$cfgfile"
8789-
8790-# func_dirname file append nondir_replacement
8791-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
8792-# otherwise set result to NONDIR_REPLACEMENT.
8793-func_dirname ()
8794-{
8795- # Extract subdirectory from the argument.
8796- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8797- if test "X$func_dirname_result" = "X${1}"; then
8798- func_dirname_result="${3}"
8799- else
8800- func_dirname_result="$func_dirname_result${2}"
8801- fi
8802-}
8803-
8804-# func_basename file
8805-func_basename ()
8806-{
8807- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8808-}
8809-
8810-
8811-# func_stripname prefix suffix name
8812-# strip PREFIX and SUFFIX off of NAME.
8813-# PREFIX and SUFFIX must not contain globbing or regex special
8814-# characters, hashes, percent signs, but SUFFIX may contain a leading
8815-# dot (in which case that matches only a dot).
8816-# func_strip_suffix prefix name
8817-func_stripname ()
8818-{
8819- case ${2} in
8820- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8821- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8822- esac
8823-}
8824-
8825-# sed scripts:
8826-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
8827-my_sed_long_arg='1s/^-[^=]*=//'
8828-
8829-# func_opt_split
8830-func_opt_split ()
8831-{
8832- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8833- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8834-}
8835-
8836-# func_lo2o object
8837-func_lo2o ()
8838-{
8839- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8840-}
8841-
8842-# func_xform libobj-or-source
8843-func_xform ()
8844-{
8845- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
8846-}
8847-
8848-# func_arith arithmetic-term...
8849-func_arith ()
8850-{
8851- func_arith_result=`expr "$@"`
8852-}
8853-
8854-# func_len string
8855-# STRING may not start with a hyphen.
8856-func_len ()
8857-{
8858- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
8859-}
8860-
8861-_LT_EOF
8862-esac
8863-
8864-case $lt_shell_append in
8865- yes)
8866- cat << \_LT_EOF >> "$cfgfile"
8867-
8868-# func_append var value
8869-# Append VALUE to the end of shell variable VAR.
8870-func_append ()
8871-{
8872- eval "$1+=\$2"
8873-}
8874-_LT_EOF
8875- ;;
8876- *)
8877- cat << \_LT_EOF >> "$cfgfile"
8878-
8879-# func_append var value
8880-# Append VALUE to the end of shell variable VAR.
8881-func_append ()
8882-{
8883- eval "$1=\$$1\$2"
8884-}
8885-
8886-_LT_EOF
8887- ;;
8888- esac
8889+ sed '$q' "$ltmain" >> "$cfgfile" \
8890+ || (rm -f "$cfgfile"; exit 1)
8891
8892+ if test x"$xsi_shell" = xyes; then
8893+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
8894+func_dirname ()\
8895+{\
8896+\ case ${1} in\
8897+\ */*) func_dirname_result="${1%/*}${2}" ;;\
8898+\ * ) func_dirname_result="${3}" ;;\
8899+\ esac\
8900+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
8901+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8902+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8903+test 0 -eq $? || _lt_function_replace_fail=:
8904+
8905+
8906+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
8907+func_basename ()\
8908+{\
8909+\ func_basename_result="${1##*/}"\
8910+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
8911+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8912+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8913+test 0 -eq $? || _lt_function_replace_fail=:
8914+
8915+
8916+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
8917+func_dirname_and_basename ()\
8918+{\
8919+\ case ${1} in\
8920+\ */*) func_dirname_result="${1%/*}${2}" ;;\
8921+\ * ) func_dirname_result="${3}" ;;\
8922+\ esac\
8923+\ func_basename_result="${1##*/}"\
8924+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
8925+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8926+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8927+test 0 -eq $? || _lt_function_replace_fail=:
8928+
8929+
8930+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
8931+func_stripname ()\
8932+{\
8933+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
8934+\ # positional parameters, so assign one to ordinary parameter first.\
8935+\ func_stripname_result=${3}\
8936+\ func_stripname_result=${func_stripname_result#"${1}"}\
8937+\ func_stripname_result=${func_stripname_result%"${2}"}\
8938+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
8939+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8940+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8941+test 0 -eq $? || _lt_function_replace_fail=:
8942+
8943+
8944+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
8945+func_split_long_opt ()\
8946+{\
8947+\ func_split_long_opt_name=${1%%=*}\
8948+\ func_split_long_opt_arg=${1#*=}\
8949+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
8950+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8951+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8952+test 0 -eq $? || _lt_function_replace_fail=:
8953+
8954+
8955+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
8956+func_split_short_opt ()\
8957+{\
8958+\ func_split_short_opt_arg=${1#??}\
8959+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
8960+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
8961+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8962+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8963+test 0 -eq $? || _lt_function_replace_fail=:
8964+
8965+
8966+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
8967+func_lo2o ()\
8968+{\
8969+\ case ${1} in\
8970+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
8971+\ *) func_lo2o_result=${1} ;;\
8972+\ esac\
8973+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
8974+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8975+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8976+test 0 -eq $? || _lt_function_replace_fail=:
8977+
8978+
8979+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
8980+func_xform ()\
8981+{\
8982+ func_xform_result=${1%.*}.lo\
8983+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
8984+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8985+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8986+test 0 -eq $? || _lt_function_replace_fail=:
8987+
8988+
8989+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
8990+func_arith ()\
8991+{\
8992+ func_arith_result=$(( $* ))\
8993+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
8994+ && mv -f "$cfgfile.tmp" "$cfgfile" \
8995+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8996+test 0 -eq $? || _lt_function_replace_fail=:
8997+
8998+
8999+ sed -e '/^func_len ()$/,/^} # func_len /c\
9000+func_len ()\
9001+{\
9002+ func_len_result=${#1}\
9003+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
9004+ && mv -f "$cfgfile.tmp" "$cfgfile" \
9005+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9006+test 0 -eq $? || _lt_function_replace_fail=:
9007+
9008+fi
9009+
9010+if test x"$lt_shell_append" = xyes; then
9011+ sed -e '/^func_append ()$/,/^} # func_append /c\
9012+func_append ()\
9013+{\
9014+ eval "${1}+=\\${2}"\
9015+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
9016+ && mv -f "$cfgfile.tmp" "$cfgfile" \
9017+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9018+test 0 -eq $? || _lt_function_replace_fail=:
9019+
9020+
9021+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
9022+func_append_quoted ()\
9023+{\
9024+\ func_quote_for_eval "${2}"\
9025+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
9026+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
9027+ && mv -f "$cfgfile.tmp" "$cfgfile" \
9028+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9029+test 0 -eq $? || _lt_function_replace_fail=:
9030+
9031+
9032+ # Save a `func_append' function call where possible by direct use of '+='
9033+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9034+ && mv -f "$cfgfile.tmp" "$cfgfile" \
9035+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9036+ test 0 -eq $? || _lt_function_replace_fail=:
9037+else
9038+ # Save a `func_append' function call even when '+=' is not available
9039+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9040+ && mv -f "$cfgfile.tmp" "$cfgfile" \
9041+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9042+ test 0 -eq $? || _lt_function_replace_fail=:
9043+fi
9044+
9045+if test x"$_lt_function_replace_fail" = x":"; then
9046+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
9047+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
9048+fi
9049
9050- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
9051- || (rm -f "$cfgfile"; exit 1)
9052
9053- mv -f "$cfgfile" "$ofile" ||
9054+ mv -f "$cfgfile" "$ofile" ||
9055 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9056 chmod +x "$ofile"
9057
9058Index: binutils-2.21.1/opcodes/configure
9059===================================================================
9060--- binutils-2.21.1.orig/opcodes/configure
9061+++ binutils-2.21.1/opcodes/configure
9062@@ -647,6 +647,9 @@ OTOOL
9063 LIPO
9064 NMEDIT
9065 DSYMUTIL
9066+MANIFEST_TOOL
9067+ac_ct_AR
9068+DLLTOOL
9069 OBJDUMP
9070 LN_S
9071 NM
9072@@ -759,6 +762,7 @@ enable_static
9073 with_pic
9074 enable_fast_install
9075 with_gnu_ld
9076+with_libtool_sysroot
9077 enable_libtool_lock
9078 enable_targets
9079 enable_werror
9080@@ -1417,6 +1421,8 @@ Optional Packages:
9081 --with-pic try to use only PIC/non-PIC objects [default=use
9082 both]
9083 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
9084+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
9085+ (or the compiler's sysroot if not specified).
9086
9087 Some influential environment variables:
9088 CC C compiler command
9089@@ -5112,8 +5118,8 @@ esac
9090
9091
9092
9093-macro_version='2.2.7a'
9094-macro_revision='1.3134'
9095+macro_version='2.4'
9096+macro_revision='1.3293'
9097
9098
9099
9100@@ -5153,7 +5159,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
9102 $as_echo_n "checking how to print strings... " >&6; }
9103 # Test print first, because it will be a builtin if present.
9104-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
9105+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
9106 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
9107 ECHO='print -r --'
9108 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
9109@@ -5839,8 +5845,8 @@ $as_echo_n "checking whether the shell u
9110 # Try some XSI features
9111 xsi_shell=no
9112 ( _lt_dummy="a/b/c"
9113- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9114- = c,a/b,, \
9115+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9116+ = c,a/b,b/c, \
9117 && eval 'test $(( 1 + 1 )) -eq 2 \
9118 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9119 && xsi_shell=yes
9120@@ -5889,6 +5895,80 @@ esac
9121
9122
9123
9124+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
9125+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
9126+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
9127+ $as_echo_n "(cached) " >&6
9128+else
9129+ case $host in
9130+ *-*-mingw* )
9131+ case $build in
9132+ *-*-mingw* ) # actually msys
9133+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9134+ ;;
9135+ *-*-cygwin* )
9136+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9137+ ;;
9138+ * ) # otherwise, assume *nix
9139+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9140+ ;;
9141+ esac
9142+ ;;
9143+ *-*-cygwin* )
9144+ case $build in
9145+ *-*-mingw* ) # actually msys
9146+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9147+ ;;
9148+ *-*-cygwin* )
9149+ lt_cv_to_host_file_cmd=func_convert_file_noop
9150+ ;;
9151+ * ) # otherwise, assume *nix
9152+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9153+ ;;
9154+ esac
9155+ ;;
9156+ * ) # unhandled hosts (and "normal" native builds)
9157+ lt_cv_to_host_file_cmd=func_convert_file_noop
9158+ ;;
9159+esac
9160+
9161+fi
9162+
9163+to_host_file_cmd=$lt_cv_to_host_file_cmd
9164+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
9165+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
9166+
9167+
9168+
9169+
9170+
9171+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
9172+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
9173+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
9174+ $as_echo_n "(cached) " >&6
9175+else
9176+ #assume ordinary cross tools, or native build.
9177+lt_cv_to_tool_file_cmd=func_convert_file_noop
9178+case $host in
9179+ *-*-mingw* )
9180+ case $build in
9181+ *-*-mingw* ) # actually msys
9182+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9183+ ;;
9184+ esac
9185+ ;;
9186+esac
9187+
9188+fi
9189+
9190+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9191+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
9192+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
9193+
9194+
9195+
9196+
9197+
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
9199 $as_echo_n "checking for $LD option to reload object files... " >&6; }
9200 if test "${lt_cv_ld_reload_flag+set}" = set; then :
9201@@ -5905,6 +5985,11 @@ case $reload_flag in
9202 esac
9203 reload_cmds='$LD$reload_flag -o $output$reload_objs'
9204 case $host_os in
9205+ cygwin* | mingw* | pw32* | cegcc*)
9206+ if test "$GCC" != yes; then
9207+ reload_cmds=false
9208+ fi
9209+ ;;
9210 darwin*)
9211 if test "$GCC" = yes; then
9212 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
9213@@ -6073,7 +6158,8 @@ mingw* | pw32*)
9214 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
9215 lt_cv_file_magic_cmd='func_win32_libid'
9216 else
9217- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
9218+ # Keep this pattern in sync with the one in func_win32_libid.
9219+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
9220 lt_cv_file_magic_cmd='$OBJDUMP -f'
9221 fi
9222 ;;
9223@@ -6227,6 +6313,21 @@ esac
9224 fi
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
9226 $as_echo "$lt_cv_deplibs_check_method" >&6; }
9227+
9228+file_magic_glob=
9229+want_nocaseglob=no
9230+if test "$build" = "$host"; then
9231+ case $host_os in
9232+ mingw* | pw32*)
9233+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
9234+ want_nocaseglob=yes
9235+ else
9236+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
9237+ fi
9238+ ;;
9239+ esac
9240+fi
9241+
9242 file_magic_cmd=$lt_cv_file_magic_cmd
9243 deplibs_check_method=$lt_cv_deplibs_check_method
9244 test -z "$deplibs_check_method" && deplibs_check_method=unknown
9245@@ -6242,9 +6343,162 @@ test -z "$deplibs_check_method" && depli
9246
9247
9248
9249+
9250+
9251+
9252+
9253+
9254+
9255+
9256+
9257+
9258+
9259 if test -n "$ac_tool_prefix"; then
9260- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9261-set dummy ${ac_tool_prefix}ar; ac_word=$2
9262+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9263+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9264+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9265+$as_echo_n "checking for $ac_word... " >&6; }
9266+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
9267+ $as_echo_n "(cached) " >&6
9268+else
9269+ if test -n "$DLLTOOL"; then
9270+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9271+else
9272+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9273+for as_dir in $PATH
9274+do
9275+ IFS=$as_save_IFS
9276+ test -z "$as_dir" && as_dir=.
9277+ for ac_exec_ext in '' $ac_executable_extensions; do
9278+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9279+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9280+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9281+ break 2
9282+ fi
9283+done
9284+ done
9285+IFS=$as_save_IFS
9286+
9287+fi
9288+fi
9289+DLLTOOL=$ac_cv_prog_DLLTOOL
9290+if test -n "$DLLTOOL"; then
9291+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9292+$as_echo "$DLLTOOL" >&6; }
9293+else
9294+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9295+$as_echo "no" >&6; }
9296+fi
9297+
9298+
9299+fi
9300+if test -z "$ac_cv_prog_DLLTOOL"; then
9301+ ac_ct_DLLTOOL=$DLLTOOL
9302+ # Extract the first word of "dlltool", so it can be a program name with args.
9303+set dummy dlltool; ac_word=$2
9304+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305+$as_echo_n "checking for $ac_word... " >&6; }
9306+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
9307+ $as_echo_n "(cached) " >&6
9308+else
9309+ if test -n "$ac_ct_DLLTOOL"; then
9310+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9311+else
9312+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9313+for as_dir in $PATH
9314+do
9315+ IFS=$as_save_IFS
9316+ test -z "$as_dir" && as_dir=.
9317+ for ac_exec_ext in '' $ac_executable_extensions; do
9318+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9319+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9320+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9321+ break 2
9322+ fi
9323+done
9324+ done
9325+IFS=$as_save_IFS
9326+
9327+fi
9328+fi
9329+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9330+if test -n "$ac_ct_DLLTOOL"; then
9331+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9332+$as_echo "$ac_ct_DLLTOOL" >&6; }
9333+else
9334+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335+$as_echo "no" >&6; }
9336+fi
9337+
9338+ if test "x$ac_ct_DLLTOOL" = x; then
9339+ DLLTOOL="false"
9340+ else
9341+ case $cross_compiling:$ac_tool_warned in
9342+yes:)
9343+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9344+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9345+ac_tool_warned=yes ;;
9346+esac
9347+ DLLTOOL=$ac_ct_DLLTOOL
9348+ fi
9349+else
9350+ DLLTOOL="$ac_cv_prog_DLLTOOL"
9351+fi
9352+
9353+test -z "$DLLTOOL" && DLLTOOL=dlltool
9354+
9355+
9356+
9357+
9358+
9359+
9360+
9361+
9362+
9363+
9364+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
9365+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
9366+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
9367+ $as_echo_n "(cached) " >&6
9368+else
9369+ lt_cv_sharedlib_from_linklib_cmd='unknown'
9370+
9371+case $host_os in
9372+cygwin* | mingw* | pw32* | cegcc*)
9373+ # two different shell functions defined in ltmain.sh
9374+ # decide which to use based on capabilities of $DLLTOOL
9375+ case `$DLLTOOL --help 2>&1` in
9376+ *--identify-strict*)
9377+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
9378+ ;;
9379+ *)
9380+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
9381+ ;;
9382+ esac
9383+ ;;
9384+*)
9385+ # fallback: assume linklib IS sharedlib
9386+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
9387+ ;;
9388+esac
9389+
9390+fi
9391+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
9392+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
9393+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
9394+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
9395+
9396+
9397+
9398+
9399+
9400+
9401+
9402+if test -n "$ac_tool_prefix"; then
9403+ for ac_prog in ar
9404+ do
9405+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9406+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9408 $as_echo_n "checking for $ac_word... " >&6; }
9409 if test "${ac_cv_prog_AR+set}" = set; then :
9410@@ -6260,7 +6514,7 @@ do
9411 test -z "$as_dir" && as_dir=.
9412 for ac_exec_ext in '' $ac_executable_extensions; do
9413 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9414- ac_cv_prog_AR="${ac_tool_prefix}ar"
9415+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
9416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9417 break 2
9418 fi
9419@@ -6280,11 +6534,15 @@ $as_echo "no" >&6; }
9420 fi
9421
9422
9423+ test -n "$AR" && break
9424+ done
9425 fi
9426-if test -z "$ac_cv_prog_AR"; then
9427+if test -z "$AR"; then
9428 ac_ct_AR=$AR
9429- # Extract the first word of "ar", so it can be a program name with args.
9430-set dummy ar; ac_word=$2
9431+ for ac_prog in ar
9432+do
9433+ # Extract the first word of "$ac_prog", so it can be a program name with args.
9434+set dummy $ac_prog; ac_word=$2
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9436 $as_echo_n "checking for $ac_word... " >&6; }
9437 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
9438@@ -6300,7 +6558,7 @@ do
9439 test -z "$as_dir" && as_dir=.
9440 for ac_exec_ext in '' $ac_executable_extensions; do
9441 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9442- ac_cv_prog_ac_ct_AR="ar"
9443+ ac_cv_prog_ac_ct_AR="$ac_prog"
9444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445 break 2
9446 fi
9447@@ -6319,6 +6577,10 @@ else
9448 $as_echo "no" >&6; }
9449 fi
9450
9451+
9452+ test -n "$ac_ct_AR" && break
9453+done
9454+
9455 if test "x$ac_ct_AR" = x; then
9456 AR="false"
9457 else
9458@@ -6330,12 +6592,11 @@ ac_tool_warned=yes ;;
9459 esac
9460 AR=$ac_ct_AR
9461 fi
9462-else
9463- AR="$ac_cv_prog_AR"
9464 fi
9465
9466-test -z "$AR" && AR=ar
9467-test -z "$AR_FLAGS" && AR_FLAGS=cru
9468+: ${AR=ar}
9469+: ${AR_FLAGS=cru}
9470+
9471
9472
9473
9474@@ -6346,6 +6607,63 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
9475
9476
9477
9478+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
9479+$as_echo_n "checking for archiver @FILE support... " >&6; }
9480+if test "${lt_cv_ar_at_file+set}" = set; then :
9481+ $as_echo_n "(cached) " >&6
9482+else
9483+ lt_cv_ar_at_file=no
9484+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9485+/* end confdefs.h. */
9486+
9487+int
9488+main ()
9489+{
9490+
9491+ ;
9492+ return 0;
9493+}
9494+_ACEOF
9495+if ac_fn_c_try_compile "$LINENO"; then :
9496+ echo conftest.$ac_objext > conftest.lst
9497+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
9498+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9499+ (eval $lt_ar_try) 2>&5
9500+ ac_status=$?
9501+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9502+ test $ac_status = 0; }
9503+ if test "$ac_status" -eq 0; then
9504+ # Ensure the archiver fails upon bogus file names.
9505+ rm -f conftest.$ac_objext libconftest.a
9506+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
9507+ (eval $lt_ar_try) 2>&5
9508+ ac_status=$?
9509+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9510+ test $ac_status = 0; }
9511+ if test "$ac_status" -ne 0; then
9512+ lt_cv_ar_at_file=@
9513+ fi
9514+ fi
9515+ rm -f conftest.* libconftest.a
9516+
9517+fi
9518+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9519+
9520+fi
9521+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
9522+$as_echo "$lt_cv_ar_at_file" >&6; }
9523+
9524+if test "x$lt_cv_ar_at_file" = xno; then
9525+ archiver_list_spec=
9526+else
9527+ archiver_list_spec=$lt_cv_ar_at_file
9528+fi
9529+
9530+
9531+
9532+
9533+
9534+
9535
9536 if test -n "$ac_tool_prefix"; then
9537 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9538@@ -6681,8 +6999,8 @@ esac
9539 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9540
9541 # Transform an extracted symbol line into symbol name and symbol address
9542-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
9543-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
9544+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
9545+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
9546
9547 # Handle CRLF in mingw tool chain
9548 opt_cr=
9549@@ -6718,6 +7036,7 @@ for ac_symprfx in "" "_"; do
9550 else
9551 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9552 fi
9553+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9554
9555 # Check to see that the pipe works correctly.
9556 pipe_works=no
9557@@ -6759,6 +7078,18 @@ _LT_EOF
9558 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9559 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9560 cat <<_LT_EOF > conftest.$ac_ext
9561+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
9562+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
9563+/* DATA imports from DLLs on WIN32 con't be const, because runtime
9564+ relocations are performed -- see ld's documentation on pseudo-relocs. */
9565+# define LT_DLSYM_CONST
9566+#elif defined(__osf__)
9567+/* This system does not cope well with relocations in const data. */
9568+# define LT_DLSYM_CONST
9569+#else
9570+# define LT_DLSYM_CONST const
9571+#endif
9572+
9573 #ifdef __cplusplus
9574 extern "C" {
9575 #endif
9576@@ -6770,7 +7101,7 @@ _LT_EOF
9577 cat <<_LT_EOF >> conftest.$ac_ext
9578
9579 /* The mapping between symbol names and symbols. */
9580-const struct {
9581+LT_DLSYM_CONST struct {
9582 const char *name;
9583 void *address;
9584 }
9585@@ -6796,8 +7127,8 @@ static const void *lt_preloaded_setup()
9586 _LT_EOF
9587 # Now try linking the two files.
9588 mv conftest.$ac_objext conftstm.$ac_objext
9589- lt_save_LIBS="$LIBS"
9590- lt_save_CFLAGS="$CFLAGS"
9591+ lt_globsym_save_LIBS=$LIBS
9592+ lt_globsym_save_CFLAGS=$CFLAGS
9593 LIBS="conftstm.$ac_objext"
9594 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9595 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9596@@ -6807,8 +7138,8 @@ _LT_EOF
9597 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
9598 pipe_works=yes
9599 fi
9600- LIBS="$lt_save_LIBS"
9601- CFLAGS="$lt_save_CFLAGS"
9602+ LIBS=$lt_globsym_save_LIBS
9603+ CFLAGS=$lt_globsym_save_CFLAGS
9604 else
9605 echo "cannot find nm_test_func in $nlist" >&5
9606 fi
9607@@ -6845,6 +7176,14 @@ else
9608 $as_echo "ok" >&6; }
9609 fi
9610
9611+# Response file support.
9612+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9613+ nm_file_list_spec='@'
9614+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9615+ nm_file_list_spec='@'
9616+fi
9617+
9618+
9619
9620
9621
9622@@ -6866,6 +7205,47 @@ fi
9623
9624
9625
9626+
9627+
9628+
9629+
9630+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9631+$as_echo_n "checking for sysroot... " >&6; }
9632+
9633+# Check whether --with-libtool-sysroot was given.
9634+if test "${with_libtool_sysroot+set}" = set; then :
9635+ withval=$with_libtool_sysroot;
9636+else
9637+ with_libtool_sysroot=no
9638+fi
9639+
9640+
9641+lt_sysroot=
9642+case ${with_libtool_sysroot} in #(
9643+ yes)
9644+ if test "$GCC" = yes; then
9645+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9646+ fi
9647+ ;; #(
9648+ /*)
9649+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
9650+ ;; #(
9651+ no|'')
9652+ ;; #(
9653+ *)
9654+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
9655+$as_echo "${with_libtool_sysroot}" >&6; }
9656+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
9657+ ;;
9658+esac
9659+
9660+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9661+$as_echo "${lt_sysroot:-no}" >&6; }
9662+
9663+
9664+
9665+
9666+
9667 # Check whether --enable-libtool-lock was given.
9668 if test "${enable_libtool_lock+set}" = set; then :
9669 enableval=$enable_libtool_lock;
9670@@ -7059,6 +7439,123 @@ esac
9671
9672 need_locks="$enable_libtool_lock"
9673
9674+if test -n "$ac_tool_prefix"; then
9675+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9676+set dummy ${ac_tool_prefix}mt; ac_word=$2
9677+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9678+$as_echo_n "checking for $ac_word... " >&6; }
9679+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
9680+ $as_echo_n "(cached) " >&6
9681+else
9682+ if test -n "$MANIFEST_TOOL"; then
9683+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9684+else
9685+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9686+for as_dir in $PATH
9687+do
9688+ IFS=$as_save_IFS
9689+ test -z "$as_dir" && as_dir=.
9690+ for ac_exec_ext in '' $ac_executable_extensions; do
9691+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9692+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9693+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9694+ break 2
9695+ fi
9696+done
9697+ done
9698+IFS=$as_save_IFS
9699+
9700+fi
9701+fi
9702+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9703+if test -n "$MANIFEST_TOOL"; then
9704+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9705+$as_echo "$MANIFEST_TOOL" >&6; }
9706+else
9707+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9708+$as_echo "no" >&6; }
9709+fi
9710+
9711+
9712+fi
9713+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9714+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9715+ # Extract the first word of "mt", so it can be a program name with args.
9716+set dummy mt; ac_word=$2
9717+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9718+$as_echo_n "checking for $ac_word... " >&6; }
9719+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
9720+ $as_echo_n "(cached) " >&6
9721+else
9722+ if test -n "$ac_ct_MANIFEST_TOOL"; then
9723+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9724+else
9725+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726+for as_dir in $PATH
9727+do
9728+ IFS=$as_save_IFS
9729+ test -z "$as_dir" && as_dir=.
9730+ for ac_exec_ext in '' $ac_executable_extensions; do
9731+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9732+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9733+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734+ break 2
9735+ fi
9736+done
9737+ done
9738+IFS=$as_save_IFS
9739+
9740+fi
9741+fi
9742+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9743+if test -n "$ac_ct_MANIFEST_TOOL"; then
9744+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9745+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9746+else
9747+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748+$as_echo "no" >&6; }
9749+fi
9750+
9751+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
9752+ MANIFEST_TOOL=":"
9753+ else
9754+ case $cross_compiling:$ac_tool_warned in
9755+yes:)
9756+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9757+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9758+ac_tool_warned=yes ;;
9759+esac
9760+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9761+ fi
9762+else
9763+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9764+fi
9765+
9766+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9767+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9768+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9769+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
9770+ $as_echo_n "(cached) " >&6
9771+else
9772+ lt_cv_path_mainfest_tool=no
9773+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9774+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9775+ cat conftest.err >&5
9776+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9777+ lt_cv_path_mainfest_tool=yes
9778+ fi
9779+ rm -f conftest*
9780+fi
9781+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9782+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
9783+if test "x$lt_cv_path_mainfest_tool" != xyes; then
9784+ MANIFEST_TOOL=:
9785+fi
9786+
9787+
9788+
9789+
9790+
9791
9792 case $host_os in
9793 rhapsody* | darwin*)
9794@@ -7622,6 +8119,8 @@ _LT_EOF
9795 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
9796 echo "$AR cru libconftest.a conftest.o" >&5
9797 $AR cru libconftest.a conftest.o 2>&5
9798+ echo "$RANLIB libconftest.a" >&5
9799+ $RANLIB libconftest.a 2>&5
9800 cat > conftest.c << _LT_EOF
9801 int main() { return 0;}
9802 _LT_EOF
9803@@ -7787,7 +8286,8 @@ fi
9804 LIBTOOL_DEPS="$ltmain"
9805
9806 # Always use our own libtool.
9807-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9808+LIBTOOL='$(SHELL) $(top_builddir)'
9809+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
9810
9811
9812
9813@@ -7876,7 +8376,7 @@ aix3*)
9814 esac
9815
9816 # Global variables:
9817-ofile=libtool
9818+ofile=${host_alias}-libtool
9819 can_build_shared=yes
9820
9821 # All known linkers require a `.a' archive for static linking (except MSVC,
9822@@ -8174,8 +8674,6 @@ fi
9823 lt_prog_compiler_pic=
9824 lt_prog_compiler_static=
9825
9826-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
9827-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
9828
9829 if test "$GCC" = yes; then
9830 lt_prog_compiler_wl='-Wl,'
9831@@ -8340,6 +8838,12 @@ $as_echo_n "checking for $compiler optio
9832 lt_prog_compiler_pic='--shared'
9833 lt_prog_compiler_static='--static'
9834 ;;
9835+ nagfor*)
9836+ # NAG Fortran compiler
9837+ lt_prog_compiler_wl='-Wl,-Wl,,'
9838+ lt_prog_compiler_pic='-PIC'
9839+ lt_prog_compiler_static='-Bstatic'
9840+ ;;
9841 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
9842 # Portland Group compilers (*not* the Pentium gcc compiler,
9843 # which looks to be a dead project)
9844@@ -8402,7 +8906,7 @@ $as_echo_n "checking for $compiler optio
9845 lt_prog_compiler_pic='-KPIC'
9846 lt_prog_compiler_static='-Bstatic'
9847 case $cc_basename in
9848- f77* | f90* | f95*)
9849+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
9850 lt_prog_compiler_wl='-Qoption ld ';;
9851 *)
9852 lt_prog_compiler_wl='-Wl,';;
9853@@ -8459,13 +8963,17 @@ case $host_os in
9854 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
9855 ;;
9856 esac
9857-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
9858-$as_echo "$lt_prog_compiler_pic" >&6; }
9859-
9860-
9861-
9862-
9863
9864+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
9865+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
9866+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
9867+ $as_echo_n "(cached) " >&6
9868+else
9869+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
9870+fi
9871+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
9872+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
9873+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
9874
9875 #
9876 # Check to make sure the PIC flag actually works.
9877@@ -8526,6 +9034,11 @@ fi
9878
9879
9880
9881+
9882+
9883+
9884+
9885+
9886 #
9887 # Check to make sure the static flag actually works.
9888 #
9889@@ -8876,7 +9389,8 @@ _LT_EOF
9890 allow_undefined_flag=unsupported
9891 always_export_symbols=no
9892 enable_shared_with_static_runtimes=yes
9893- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9894+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
9895+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
9896
9897 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9898 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9899@@ -8924,7 +9438,7 @@ _LT_EOF
9900 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9901 && test "$tmp_diet" = no
9902 then
9903- tmp_addflag=
9904+ tmp_addflag=' $pic_flag'
9905 tmp_sharedflag='-shared'
9906 case $cc_basename,$host_cpu in
9907 pgcc*) # Portland Group C compiler
9908@@ -8975,12 +9489,12 @@ _LT_EOF
9909 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
9910 hardcode_libdir_flag_spec=
9911 hardcode_libdir_flag_spec_ld='-rpath $libdir'
9912- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
9913+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
9914 if test "x$supports_anon_versioning" = xyes; then
9915 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9916 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9917 echo "local: *; };" >> $output_objdir/$libname.ver~
9918- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9919+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9920 fi
9921 ;;
9922 esac
9923@@ -8994,8 +9508,8 @@ _LT_EOF
9924 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9925 wlarc=
9926 else
9927- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9928- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9929+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9930+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9931 fi
9932 ;;
9933
9934@@ -9013,8 +9527,8 @@ _LT_EOF
9935
9936 _LT_EOF
9937 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9938- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9939- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9940+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9941+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9942 else
9943 ld_shlibs=no
9944 fi
9945@@ -9060,8 +9574,8 @@ _LT_EOF
9946
9947 *)
9948 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9949- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9950- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9951+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9952+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9953 else
9954 ld_shlibs=no
9955 fi
9956@@ -9191,7 +9705,13 @@ _LT_EOF
9957 allow_undefined_flag='-berok'
9958 # Determine the default libpath from the value encoded in an
9959 # empty executable.
9960- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9961+ if test "${lt_cv_aix_libpath+set}" = set; then
9962+ aix_libpath=$lt_cv_aix_libpath
9963+else
9964+ if test "${lt_cv_aix_libpath_+set}" = set; then :
9965+ $as_echo_n "(cached) " >&6
9966+else
9967+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9968 /* end confdefs.h. */
9969
9970 int
9971@@ -9204,22 +9724,29 @@ main ()
9972 _ACEOF
9973 if ac_fn_c_try_link "$LINENO"; then :
9974
9975-lt_aix_libpath_sed='
9976- /Import File Strings/,/^$/ {
9977- /^0/ {
9978- s/^0 *\(.*\)$/\1/
9979- p
9980- }
9981- }'
9982-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9983-# Check for a 64-bit object if we didn't find anything.
9984-if test -z "$aix_libpath"; then
9985- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9986-fi
9987+ lt_aix_libpath_sed='
9988+ /Import File Strings/,/^$/ {
9989+ /^0/ {
9990+ s/^0 *\([^ ]*\) *$/\1/
9991+ p
9992+ }
9993+ }'
9994+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9995+ # Check for a 64-bit object if we didn't find anything.
9996+ if test -z "$lt_cv_aix_libpath_"; then
9997+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9998+ fi
9999 fi
10000 rm -f core conftest.err conftest.$ac_objext \
10001 conftest$ac_exeext conftest.$ac_ext
10002-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10003+ if test -z "$lt_cv_aix_libpath_"; then
10004+ lt_cv_aix_libpath_="/usr/lib:/lib"
10005+ fi
10006+
10007+fi
10008+
10009+ aix_libpath=$lt_cv_aix_libpath_
10010+fi
10011
10012 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10013 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10014@@ -9231,7 +9758,13 @@ if test -z "$aix_libpath"; then aix_libp
10015 else
10016 # Determine the default libpath from the value encoded in an
10017 # empty executable.
10018- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10019+ if test "${lt_cv_aix_libpath+set}" = set; then
10020+ aix_libpath=$lt_cv_aix_libpath
10021+else
10022+ if test "${lt_cv_aix_libpath_+set}" = set; then :
10023+ $as_echo_n "(cached) " >&6
10024+else
10025+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10026 /* end confdefs.h. */
10027
10028 int
10029@@ -9244,22 +9777,29 @@ main ()
10030 _ACEOF
10031 if ac_fn_c_try_link "$LINENO"; then :
10032
10033-lt_aix_libpath_sed='
10034- /Import File Strings/,/^$/ {
10035- /^0/ {
10036- s/^0 *\(.*\)$/\1/
10037- p
10038- }
10039- }'
10040-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10041-# Check for a 64-bit object if we didn't find anything.
10042-if test -z "$aix_libpath"; then
10043- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10044-fi
10045+ lt_aix_libpath_sed='
10046+ /Import File Strings/,/^$/ {
10047+ /^0/ {
10048+ s/^0 *\([^ ]*\) *$/\1/
10049+ p
10050+ }
10051+ }'
10052+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10053+ # Check for a 64-bit object if we didn't find anything.
10054+ if test -z "$lt_cv_aix_libpath_"; then
10055+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10056+ fi
10057 fi
10058 rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext conftest.$ac_ext
10060-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10061+ if test -z "$lt_cv_aix_libpath_"; then
10062+ lt_cv_aix_libpath_="/usr/lib:/lib"
10063+ fi
10064+
10065+fi
10066+
10067+ aix_libpath=$lt_cv_aix_libpath_
10068+fi
10069
10070 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10071 # Warning - without using the other run time loading flags,
10072@@ -9304,20 +9844,63 @@ if test -z "$aix_libpath"; then aix_libp
10073 # Microsoft Visual C++.
10074 # hardcode_libdir_flag_spec is actually meaningless, as there is
10075 # no search path for DLLs.
10076- hardcode_libdir_flag_spec=' '
10077- allow_undefined_flag=unsupported
10078- # Tell ltmain to make .lib files, not .a files.
10079- libext=lib
10080- # Tell ltmain to make .dll files, not .so files.
10081- shrext_cmds=".dll"
10082- # FIXME: Setting linknames here is a bad hack.
10083- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
10084- # The linker will automatically build a .lib file if we build a DLL.
10085- old_archive_from_new_cmds='true'
10086- # FIXME: Should let the user specify the lib program.
10087- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
10088- fix_srcfile_path='`cygpath -w "$srcfile"`'
10089- enable_shared_with_static_runtimes=yes
10090+ case $cc_basename in
10091+ cl*)
10092+ # Native MSVC
10093+ hardcode_libdir_flag_spec=' '
10094+ allow_undefined_flag=unsupported
10095+ always_export_symbols=yes
10096+ file_list_spec='@'
10097+ # Tell ltmain to make .lib files, not .a files.
10098+ libext=lib
10099+ # Tell ltmain to make .dll files, not .so files.
10100+ shrext_cmds=".dll"
10101+ # FIXME: Setting linknames here is a bad hack.
10102+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
10103+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10104+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
10105+ else
10106+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
10107+ fi~
10108+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10109+ linknames='
10110+ # The linker will not automatically build a static lib if we build a DLL.
10111+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
10112+ enable_shared_with_static_runtimes=yes
10113+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
10114+ # Don't use ranlib
10115+ old_postinstall_cmds='chmod 644 $oldlib'
10116+ postlink_cmds='lt_outputfile="@OUTPUT@"~
10117+ lt_tool_outputfile="@TOOL_OUTPUT@"~
10118+ case $lt_outputfile in
10119+ *.exe|*.EXE) ;;
10120+ *)
10121+ lt_outputfile="$lt_outputfile.exe"
10122+ lt_tool_outputfile="$lt_tool_outputfile.exe"
10123+ ;;
10124+ esac~
10125+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
10126+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10127+ $RM "$lt_outputfile.manifest";
10128+ fi'
10129+ ;;
10130+ *)
10131+ # Assume MSVC wrapper
10132+ hardcode_libdir_flag_spec=' '
10133+ allow_undefined_flag=unsupported
10134+ # Tell ltmain to make .lib files, not .a files.
10135+ libext=lib
10136+ # Tell ltmain to make .dll files, not .so files.
10137+ shrext_cmds=".dll"
10138+ # FIXME: Setting linknames here is a bad hack.
10139+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
10140+ # The linker will automatically build a .lib file if we build a DLL.
10141+ old_archive_from_new_cmds='true'
10142+ # FIXME: Should let the user specify the lib program.
10143+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
10144+ enable_shared_with_static_runtimes=yes
10145+ ;;
10146+ esac
10147 ;;
10148
10149 darwin* | rhapsody*)
10150@@ -9382,7 +9965,7 @@ if test -z "$aix_libpath"; then aix_libp
10151
10152 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10153 freebsd* | dragonfly*)
10154- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10155+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10156 hardcode_libdir_flag_spec='-R$libdir'
10157 hardcode_direct=yes
10158 hardcode_shlibpath_var=no
10159@@ -9390,7 +9973,7 @@ if test -z "$aix_libpath"; then aix_libp
10160
10161 hpux9*)
10162 if test "$GCC" = yes; then
10163- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10164+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10165 else
10166 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10167 fi
10168@@ -9406,7 +9989,7 @@ if test -z "$aix_libpath"; then aix_libp
10169
10170 hpux10*)
10171 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10172- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10173+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10174 else
10175 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10176 fi
10177@@ -9430,10 +10013,10 @@ if test -z "$aix_libpath"; then aix_libp
10178 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10179 ;;
10180 ia64*)
10181- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10182+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10183 ;;
10184 *)
10185- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10186+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10187 ;;
10188 esac
10189 else
10190@@ -9512,23 +10095,36 @@ fi
10191
10192 irix5* | irix6* | nonstopux*)
10193 if test "$GCC" = yes; then
10194- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10195+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10196 # Try to use the -exported_symbol ld option, if it does not
10197 # work, assume that -exports_file does not work either and
10198 # implicitly export all symbols.
10199- save_LDFLAGS="$LDFLAGS"
10200- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10201- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202+ # This should be the same for all languages, so no per-tag cache variable.
10203+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
10204+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
10205+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
10206+ $as_echo_n "(cached) " >&6
10207+else
10208+ save_LDFLAGS="$LDFLAGS"
10209+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10210+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10211 /* end confdefs.h. */
10212-int foo(void) {}
10213+int foo (void) { return 0; }
10214 _ACEOF
10215 if ac_fn_c_try_link "$LINENO"; then :
10216- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10217-
10218+ lt_cv_irix_exported_symbol=yes
10219+else
10220+ lt_cv_irix_exported_symbol=no
10221 fi
10222 rm -f core conftest.err conftest.$ac_objext \
10223 conftest$ac_exeext conftest.$ac_ext
10224- LDFLAGS="$save_LDFLAGS"
10225+ LDFLAGS="$save_LDFLAGS"
10226+fi
10227+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
10228+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
10229+ if test "$lt_cv_irix_exported_symbol" = yes; then
10230+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10231+ fi
10232 else
10233 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10234 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
10235@@ -9613,7 +10209,7 @@ rm -f core conftest.err conftest.$ac_obj
10236 osf4* | osf5*) # as osf3* with the addition of -msym flag
10237 if test "$GCC" = yes; then
10238 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10239- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10240+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10241 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10242 else
10243 allow_undefined_flag=' -expect_unresolved \*'
10244@@ -9632,9 +10228,9 @@ rm -f core conftest.err conftest.$ac_obj
10245 no_undefined_flag=' -z defs'
10246 if test "$GCC" = yes; then
10247 wlarc='${wl}'
10248- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10249+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10250 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10251- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10252+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10253 else
10254 case `$CC -V 2>&1` in
10255 *"Compilers 5.0"*)
10256@@ -10210,8 +10806,9 @@ cygwin* | mingw* | pw32* | cegcc*)
10257 need_version=no
10258 need_lib_prefix=no
10259
10260- case $GCC,$host_os in
10261- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
10262+ case $GCC,$cc_basename in
10263+ yes,*)
10264+ # gcc
10265 library_names_spec='$libname.dll.a'
10266 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10267 postinstall_cmds='base_file=`basename \${file}`~
10268@@ -10244,13 +10841,71 @@ cygwin* | mingw* | pw32* | cegcc*)
10269 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10270 ;;
10271 esac
10272+ dynamic_linker='Win32 ld.exe'
10273+ ;;
10274+
10275+ *,cl*)
10276+ # Native MSVC
10277+ libname_spec='$name'
10278+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10279+ library_names_spec='${libname}.dll.lib'
10280+
10281+ case $build_os in
10282+ mingw*)
10283+ sys_lib_search_path_spec=
10284+ lt_save_ifs=$IFS
10285+ IFS=';'
10286+ for lt_path in $LIB
10287+ do
10288+ IFS=$lt_save_ifs
10289+ # Let DOS variable expansion print the short 8.3 style file name.
10290+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
10291+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
10292+ done
10293+ IFS=$lt_save_ifs
10294+ # Convert to MSYS style.
10295+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
10296+ ;;
10297+ cygwin*)
10298+ # Convert to unix form, then to dos form, then back to unix form
10299+ # but this time dos style (no spaces!) so that the unix form looks
10300+ # like /cygdrive/c/PROGRA~1:/cygdr...
10301+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
10302+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
10303+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10304+ ;;
10305+ *)
10306+ sys_lib_search_path_spec="$LIB"
10307+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10308+ # It is most probably a Windows format PATH.
10309+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10310+ else
10311+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10312+ fi
10313+ # FIXME: find the short name or the path components, as spaces are
10314+ # common. (e.g. "Program Files" -> "PROGRA~1")
10315+ ;;
10316+ esac
10317+
10318+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
10319+ postinstall_cmds='base_file=`basename \${file}`~
10320+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10321+ dldir=$destdir/`dirname \$dlpath`~
10322+ test -d \$dldir || mkdir -p \$dldir~
10323+ $install_prog $dir/$dlname \$dldir/$dlname'
10324+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10325+ dlpath=$dir/\$dldll~
10326+ $RM \$dlpath'
10327+ shlibpath_overrides_runpath=yes
10328+ dynamic_linker='Win32 link.exe'
10329 ;;
10330
10331 *)
10332+ # Assume MSVC wrapper
10333 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10334+ dynamic_linker='Win32 ld.exe'
10335 ;;
10336 esac
10337- dynamic_linker='Win32 ld.exe'
10338 # FIXME: first we should search . and the directory the executable is in
10339 shlibpath_var=PATH
10340 ;;
10341@@ -10346,7 +11001,7 @@ haiku*)
10342 soname_spec='${libname}${release}${shared_ext}$major'
10343 shlibpath_var=LIBRARY_PATH
10344 shlibpath_overrides_runpath=yes
10345- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
10346+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
10347 hardcode_into_libs=yes
10348 ;;
10349
10350@@ -11142,7 +11797,7 @@ else
10351 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10352 lt_status=$lt_dlunknown
10353 cat > conftest.$ac_ext <<_LT_EOF
10354-#line 11145 "configure"
10355+#line $LINENO "configure"
10356 #include "confdefs.h"
10357
10358 #if HAVE_DLFCN_H
10359@@ -11186,10 +11841,10 @@ else
10360 /* When -fvisbility=hidden is used, assume the code has been annotated
10361 correspondingly for the symbols needed. */
10362 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
10363-void fnord () __attribute__((visibility("default")));
10364+int fnord () __attribute__((visibility("default")));
10365 #endif
10366
10367-void fnord () { int i=42; }
10368+int fnord () { return 42; }
10369 int main ()
10370 {
10371 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10372@@ -11248,7 +11903,7 @@ else
10373 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10374 lt_status=$lt_dlunknown
10375 cat > conftest.$ac_ext <<_LT_EOF
10376-#line 11251 "configure"
10377+#line $LINENO "configure"
10378 #include "confdefs.h"
10379
10380 #if HAVE_DLFCN_H
10381@@ -11292,10 +11947,10 @@ else
10382 /* When -fvisbility=hidden is used, assume the code has been annotated
10383 correspondingly for the symbols needed. */
10384 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
10385-void fnord () __attribute__((visibility("default")));
10386+int fnord () __attribute__((visibility("default")));
10387 #endif
10388
10389-void fnord () { int i=42; }
10390+int fnord () { return 42; }
10391 int main ()
10392 {
10393 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10394@@ -12328,7 +12983,7 @@ if test "$enable_shared" = "yes"; then
10395 # since libbfd may not pull in the entirety of libiberty.
10396 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
10397 if test -n "$x"; then
10398- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
10399+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a"
10400 fi
10401
10402 case "${host}" in
10403@@ -13289,13 +13944,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
10404 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
10405 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
10406 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
10407+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
10408+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
10409 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
10410 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
10411 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
10412 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
10413 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
10414+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
10415+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
10416+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
10417+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
10418 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
10419 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
10420+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
10421 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
10422 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
10423 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
10424@@ -13310,14 +13972,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
10425 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
10426 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
10427 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
10428+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
10429+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
10430 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
10431 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
10432 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
10433-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
10434 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
10435+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
10436 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
10437 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
10438 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
10439+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
10440 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
10441 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
10442 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
10443@@ -13350,12 +14015,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
10444 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
10445 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
10446 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
10447-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
10448 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
10449 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
10450 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
10451 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
10452 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
10453+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
10454 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
10455 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
10456 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
10457@@ -13410,8 +14075,13 @@ reload_flag \
10458 OBJDUMP \
10459 deplibs_check_method \
10460 file_magic_cmd \
10461+file_magic_glob \
10462+want_nocaseglob \
10463+DLLTOOL \
10464+sharedlib_from_linklib_cmd \
10465 AR \
10466 AR_FLAGS \
10467+archiver_list_spec \
10468 STRIP \
10469 RANLIB \
10470 CC \
10471@@ -13421,12 +14091,14 @@ lt_cv_sys_global_symbol_pipe \
10472 lt_cv_sys_global_symbol_to_cdecl \
10473 lt_cv_sys_global_symbol_to_c_name_address \
10474 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
10475+nm_file_list_spec \
10476 lt_prog_compiler_no_builtin_flag \
10477-lt_prog_compiler_wl \
10478 lt_prog_compiler_pic \
10479+lt_prog_compiler_wl \
10480 lt_prog_compiler_static \
10481 lt_cv_prog_compiler_c_o \
10482 need_locks \
10483+MANIFEST_TOOL \
10484 DSYMUTIL \
10485 NMEDIT \
10486 LIPO \
10487@@ -13442,7 +14114,6 @@ no_undefined_flag \
10488 hardcode_libdir_flag_spec \
10489 hardcode_libdir_flag_spec_ld \
10490 hardcode_libdir_separator \
10491-fix_srcfile_path \
10492 exclude_expsyms \
10493 include_expsyms \
10494 file_list_spec \
10495@@ -13478,6 +14149,7 @@ module_cmds \
10496 module_expsym_cmds \
10497 export_symbols_cmds \
10498 prelink_cmds \
10499+postlink_cmds \
10500 postinstall_cmds \
10501 postuninstall_cmds \
10502 finish_cmds \
10503@@ -14234,7 +14906,8 @@ $as_echo X"$file" |
10504 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10505 #
10506 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
10507-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
10508+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
10509+# Inc.
10510 # Written by Gordon Matzigkeit, 1996
10511 #
10512 # This file is part of GNU Libtool.
10513@@ -14337,19 +15010,42 @@ SP2NL=$lt_lt_SP2NL
10514 # turn newlines into spaces.
10515 NL2SP=$lt_lt_NL2SP
10516
10517+# convert \$build file names to \$host format.
10518+to_host_file_cmd=$lt_cv_to_host_file_cmd
10519+
10520+# convert \$build files to toolchain format.
10521+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10522+
10523 # An object symbol dumper.
10524 OBJDUMP=$lt_OBJDUMP
10525
10526 # Method to check whether dependent libraries are shared objects.
10527 deplibs_check_method=$lt_deplibs_check_method
10528
10529-# Command to use when deplibs_check_method == "file_magic".
10530+# Command to use when deplibs_check_method = "file_magic".
10531 file_magic_cmd=$lt_file_magic_cmd
10532
10533+# How to find potential files when deplibs_check_method = "file_magic".
10534+file_magic_glob=$lt_file_magic_glob
10535+
10536+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
10537+want_nocaseglob=$lt_want_nocaseglob
10538+
10539+# DLL creation program.
10540+DLLTOOL=$lt_DLLTOOL
10541+
10542+# Command to associate shared and link libraries.
10543+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
10544+
10545 # The archiver.
10546 AR=$lt_AR
10547+
10548+# Flags to create an archive.
10549 AR_FLAGS=$lt_AR_FLAGS
10550
10551+# How to feed a file listing to the archiver.
10552+archiver_list_spec=$lt_archiver_list_spec
10553+
10554 # A symbol stripping program.
10555 STRIP=$lt_STRIP
10556
10557@@ -14379,6 +15075,12 @@ global_symbol_to_c_name_address=$lt_lt_c
10558 # Transform the output of nm in a C name address pair when lib prefix is needed.
10559 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
10560
10561+# Specify filename containing input files for \$NM.
10562+nm_file_list_spec=$lt_nm_file_list_spec
10563+
10564+# The root where to search for dependent libraries,and in which our libraries should be installed.
10565+lt_sysroot=$lt_sysroot
10566+
10567 # The name of the directory that contains temporary libtool files.
10568 objdir=$objdir
10569
10570@@ -14388,6 +15090,9 @@ MAGIC_CMD=$MAGIC_CMD
10571 # Must we lock files when doing compilation?
10572 need_locks=$lt_need_locks
10573
10574+# Manifest tool.
10575+MANIFEST_TOOL=$lt_MANIFEST_TOOL
10576+
10577 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
10578 DSYMUTIL=$lt_DSYMUTIL
10579
10580@@ -14502,12 +15207,12 @@ with_gcc=$GCC
10581 # Compiler flag to turn off builtin functions.
10582 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10583
10584-# How to pass a linker flag through the compiler.
10585-wl=$lt_lt_prog_compiler_wl
10586-
10587 # Additional compiler flags for building library objects.
10588 pic_flag=$lt_lt_prog_compiler_pic
10589
10590+# How to pass a linker flag through the compiler.
10591+wl=$lt_lt_prog_compiler_wl
10592+
10593 # Compiler flag to prevent dynamic linking.
10594 link_static_flag=$lt_lt_prog_compiler_static
10595
10596@@ -14594,9 +15299,6 @@ inherit_rpath=$inherit_rpath
10597 # Whether libtool must link a program against all its dependency libraries.
10598 link_all_deplibs=$link_all_deplibs
10599
10600-# Fix the shell variable \$srcfile for the compiler.
10601-fix_srcfile_path=$lt_fix_srcfile_path
10602-
10603 # Set to "yes" if exported symbols are required.
10604 always_export_symbols=$always_export_symbols
10605
10606@@ -14612,6 +15314,9 @@ include_expsyms=$lt_include_expsyms
10607 # Commands necessary for linking programs (against libraries) with templates.
10608 prelink_cmds=$lt_prelink_cmds
10609
10610+# Commands necessary for finishing linking programs.
10611+postlink_cmds=$lt_postlink_cmds
10612+
10613 # Specify filename containing input files.
10614 file_list_spec=$lt_file_list_spec
10615
10616@@ -14644,210 +15349,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
10617 # if finds mixed CR/LF and LF-only lines. Since sed operates in
10618 # text mode, it properly converts lines to CR/LF. This bash problem
10619 # is reportedly fixed, but why not run on old versions too?
10620- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
10621- || (rm -f "$cfgfile"; exit 1)
10622-
10623- case $xsi_shell in
10624- yes)
10625- cat << \_LT_EOF >> "$cfgfile"
10626-
10627-# func_dirname file append nondir_replacement
10628-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
10629-# otherwise set result to NONDIR_REPLACEMENT.
10630-func_dirname ()
10631-{
10632- case ${1} in
10633- */*) func_dirname_result="${1%/*}${2}" ;;
10634- * ) func_dirname_result="${3}" ;;
10635- esac
10636-}
10637-
10638-# func_basename file
10639-func_basename ()
10640-{
10641- func_basename_result="${1##*/}"
10642-}
10643-
10644-# func_dirname_and_basename file append nondir_replacement
10645-# perform func_basename and func_dirname in a single function
10646-# call:
10647-# dirname: Compute the dirname of FILE. If nonempty,
10648-# add APPEND to the result, otherwise set result
10649-# to NONDIR_REPLACEMENT.
10650-# value returned in "$func_dirname_result"
10651-# basename: Compute filename of FILE.
10652-# value retuned in "$func_basename_result"
10653-# Implementation must be kept synchronized with func_dirname
10654-# and func_basename. For efficiency, we do not delegate to
10655-# those functions but instead duplicate the functionality here.
10656-func_dirname_and_basename ()
10657-{
10658- case ${1} in
10659- */*) func_dirname_result="${1%/*}${2}" ;;
10660- * ) func_dirname_result="${3}" ;;
10661- esac
10662- func_basename_result="${1##*/}"
10663-}
10664-
10665-# func_stripname prefix suffix name
10666-# strip PREFIX and SUFFIX off of NAME.
10667-# PREFIX and SUFFIX must not contain globbing or regex special
10668-# characters, hashes, percent signs, but SUFFIX may contain a leading
10669-# dot (in which case that matches only a dot).
10670-func_stripname ()
10671-{
10672- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
10673- # positional parameters, so assign one to ordinary parameter first.
10674- func_stripname_result=${3}
10675- func_stripname_result=${func_stripname_result#"${1}"}
10676- func_stripname_result=${func_stripname_result%"${2}"}
10677-}
10678-
10679-# func_opt_split
10680-func_opt_split ()
10681-{
10682- func_opt_split_opt=${1%%=*}
10683- func_opt_split_arg=${1#*=}
10684-}
10685-
10686-# func_lo2o object
10687-func_lo2o ()
10688-{
10689- case ${1} in
10690- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
10691- *) func_lo2o_result=${1} ;;
10692- esac
10693-}
10694-
10695-# func_xform libobj-or-source
10696-func_xform ()
10697-{
10698- func_xform_result=${1%.*}.lo
10699-}
10700-
10701-# func_arith arithmetic-term...
10702-func_arith ()
10703-{
10704- func_arith_result=$(( $* ))
10705-}
10706-
10707-# func_len string
10708-# STRING may not start with a hyphen.
10709-func_len ()
10710-{
10711- func_len_result=${#1}
10712-}
10713-
10714-_LT_EOF
10715- ;;
10716- *) # Bourne compatible functions.
10717- cat << \_LT_EOF >> "$cfgfile"
10718-
10719-# func_dirname file append nondir_replacement
10720-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
10721-# otherwise set result to NONDIR_REPLACEMENT.
10722-func_dirname ()
10723-{
10724- # Extract subdirectory from the argument.
10725- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
10726- if test "X$func_dirname_result" = "X${1}"; then
10727- func_dirname_result="${3}"
10728- else
10729- func_dirname_result="$func_dirname_result${2}"
10730- fi
10731-}
10732-
10733-# func_basename file
10734-func_basename ()
10735-{
10736- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
10737-}
10738-
10739-
10740-# func_stripname prefix suffix name
10741-# strip PREFIX and SUFFIX off of NAME.
10742-# PREFIX and SUFFIX must not contain globbing or regex special
10743-# characters, hashes, percent signs, but SUFFIX may contain a leading
10744-# dot (in which case that matches only a dot).
10745-# func_strip_suffix prefix name
10746-func_stripname ()
10747-{
10748- case ${2} in
10749- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
10750- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
10751- esac
10752-}
10753-
10754-# sed scripts:
10755-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
10756-my_sed_long_arg='1s/^-[^=]*=//'
10757-
10758-# func_opt_split
10759-func_opt_split ()
10760-{
10761- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
10762- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
10763-}
10764-
10765-# func_lo2o object
10766-func_lo2o ()
10767-{
10768- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
10769-}
10770-
10771-# func_xform libobj-or-source
10772-func_xform ()
10773-{
10774- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
10775-}
10776-
10777-# func_arith arithmetic-term...
10778-func_arith ()
10779-{
10780- func_arith_result=`expr "$@"`
10781-}
10782-
10783-# func_len string
10784-# STRING may not start with a hyphen.
10785-func_len ()
10786-{
10787- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
10788-}
10789-
10790-_LT_EOF
10791-esac
10792-
10793-case $lt_shell_append in
10794- yes)
10795- cat << \_LT_EOF >> "$cfgfile"
10796-
10797-# func_append var value
10798-# Append VALUE to the end of shell variable VAR.
10799-func_append ()
10800-{
10801- eval "$1+=\$2"
10802-}
10803-_LT_EOF
10804- ;;
10805- *)
10806- cat << \_LT_EOF >> "$cfgfile"
10807-
10808-# func_append var value
10809-# Append VALUE to the end of shell variable VAR.
10810-func_append ()
10811-{
10812- eval "$1=\$$1\$2"
10813-}
10814-
10815-_LT_EOF
10816- ;;
10817- esac
10818+ sed '$q' "$ltmain" >> "$cfgfile" \
10819+ || (rm -f "$cfgfile"; exit 1)
10820
10821+ if test x"$xsi_shell" = xyes; then
10822+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
10823+func_dirname ()\
10824+{\
10825+\ case ${1} in\
10826+\ */*) func_dirname_result="${1%/*}${2}" ;;\
10827+\ * ) func_dirname_result="${3}" ;;\
10828+\ esac\
10829+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
10830+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10831+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10832+test 0 -eq $? || _lt_function_replace_fail=:
10833+
10834+
10835+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
10836+func_basename ()\
10837+{\
10838+\ func_basename_result="${1##*/}"\
10839+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
10840+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10841+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10842+test 0 -eq $? || _lt_function_replace_fail=:
10843+
10844+
10845+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
10846+func_dirname_and_basename ()\
10847+{\
10848+\ case ${1} in\
10849+\ */*) func_dirname_result="${1%/*}${2}" ;;\
10850+\ * ) func_dirname_result="${3}" ;;\
10851+\ esac\
10852+\ func_basename_result="${1##*/}"\
10853+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
10854+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10855+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10856+test 0 -eq $? || _lt_function_replace_fail=:
10857+
10858+
10859+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
10860+func_stripname ()\
10861+{\
10862+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
10863+\ # positional parameters, so assign one to ordinary parameter first.\
10864+\ func_stripname_result=${3}\
10865+\ func_stripname_result=${func_stripname_result#"${1}"}\
10866+\ func_stripname_result=${func_stripname_result%"${2}"}\
10867+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
10868+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10869+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10870+test 0 -eq $? || _lt_function_replace_fail=:
10871+
10872+
10873+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
10874+func_split_long_opt ()\
10875+{\
10876+\ func_split_long_opt_name=${1%%=*}\
10877+\ func_split_long_opt_arg=${1#*=}\
10878+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
10879+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10880+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10881+test 0 -eq $? || _lt_function_replace_fail=:
10882+
10883+
10884+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
10885+func_split_short_opt ()\
10886+{\
10887+\ func_split_short_opt_arg=${1#??}\
10888+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
10889+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
10890+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10891+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10892+test 0 -eq $? || _lt_function_replace_fail=:
10893+
10894+
10895+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
10896+func_lo2o ()\
10897+{\
10898+\ case ${1} in\
10899+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
10900+\ *) func_lo2o_result=${1} ;;\
10901+\ esac\
10902+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
10903+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10904+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10905+test 0 -eq $? || _lt_function_replace_fail=:
10906+
10907+
10908+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
10909+func_xform ()\
10910+{\
10911+ func_xform_result=${1%.*}.lo\
10912+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
10913+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10914+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10915+test 0 -eq $? || _lt_function_replace_fail=:
10916+
10917+
10918+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
10919+func_arith ()\
10920+{\
10921+ func_arith_result=$(( $* ))\
10922+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
10923+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10924+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10925+test 0 -eq $? || _lt_function_replace_fail=:
10926+
10927+
10928+ sed -e '/^func_len ()$/,/^} # func_len /c\
10929+func_len ()\
10930+{\
10931+ func_len_result=${#1}\
10932+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
10933+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10934+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10935+test 0 -eq $? || _lt_function_replace_fail=:
10936+
10937+fi
10938+
10939+if test x"$lt_shell_append" = xyes; then
10940+ sed -e '/^func_append ()$/,/^} # func_append /c\
10941+func_append ()\
10942+{\
10943+ eval "${1}+=\\${2}"\
10944+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
10945+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10946+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10947+test 0 -eq $? || _lt_function_replace_fail=:
10948+
10949+
10950+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
10951+func_append_quoted ()\
10952+{\
10953+\ func_quote_for_eval "${2}"\
10954+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
10955+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
10956+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10957+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10958+test 0 -eq $? || _lt_function_replace_fail=:
10959+
10960+
10961+ # Save a `func_append' function call where possible by direct use of '+='
10962+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
10963+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10964+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10965+ test 0 -eq $? || _lt_function_replace_fail=:
10966+else
10967+ # Save a `func_append' function call even when '+=' is not available
10968+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
10969+ && mv -f "$cfgfile.tmp" "$cfgfile" \
10970+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10971+ test 0 -eq $? || _lt_function_replace_fail=:
10972+fi
10973+
10974+if test x"$_lt_function_replace_fail" = x":"; then
10975+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
10976+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
10977+fi
10978
10979- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
10980- || (rm -f "$cfgfile"; exit 1)
10981
10982- mv -f "$cfgfile" "$ofile" ||
10983+ mv -f "$cfgfile" "$ofile" ||
10984 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10985 chmod +x "$ofile"
10986
10987Index: binutils-2.21.1/binutils/configure
10988===================================================================
10989--- binutils-2.21.1.orig/binutils/configure
10990+++ binutils-2.21.1/binutils/configure
10991@@ -654,8 +654,11 @@ OTOOL
10992 LIPO
10993 NMEDIT
10994 DSYMUTIL
10995+MANIFEST_TOOL
10996 RANLIB
10997+ac_ct_AR
10998 AR
10999+DLLTOOL
11000 OBJDUMP
11001 LN_S
11002 NM
11003@@ -768,6 +771,7 @@ enable_static
11004 with_pic
11005 enable_fast_install
11006 with_gnu_ld
11007+with_libtool_sysroot
11008 enable_libtool_lock
11009 enable_targets
11010 enable_werror
11011@@ -1429,6 +1433,8 @@ Optional Packages:
11012 --with-pic try to use only PIC/non-PIC objects [default=use
11013 both]
11014 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
11015+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
11016+ (or the compiler's sysroot if not specified).
11017 --with-gnu-ld assume the C compiler uses GNU ld default=no
11018 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
11019 --without-libiconv-prefix don't search for libiconv in includedir and libdir
11020@@ -5146,8 +5152,8 @@ esac
11021
11022
11023
11024-macro_version='2.2.7a'
11025-macro_revision='1.3134'
11026+macro_version='2.4'
11027+macro_revision='1.3293'
11028
11029
11030
11031@@ -5187,7 +5193,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
11033 $as_echo_n "checking how to print strings... " >&6; }
11034 # Test print first, because it will be a builtin if present.
11035-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
11036+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
11037 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
11038 ECHO='print -r --'
11039 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
11040@@ -5873,8 +5879,8 @@ $as_echo_n "checking whether the shell u
11041 # Try some XSI features
11042 xsi_shell=no
11043 ( _lt_dummy="a/b/c"
11044- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
11045- = c,a/b,, \
11046+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
11047+ = c,a/b,b/c, \
11048 && eval 'test $(( 1 + 1 )) -eq 2 \
11049 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
11050 && xsi_shell=yes
11051@@ -5923,6 +5929,80 @@ esac
11052
11053
11054
11055+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
11056+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
11057+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
11058+ $as_echo_n "(cached) " >&6
11059+else
11060+ case $host in
11061+ *-*-mingw* )
11062+ case $build in
11063+ *-*-mingw* ) # actually msys
11064+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
11065+ ;;
11066+ *-*-cygwin* )
11067+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
11068+ ;;
11069+ * ) # otherwise, assume *nix
11070+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
11071+ ;;
11072+ esac
11073+ ;;
11074+ *-*-cygwin* )
11075+ case $build in
11076+ *-*-mingw* ) # actually msys
11077+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
11078+ ;;
11079+ *-*-cygwin* )
11080+ lt_cv_to_host_file_cmd=func_convert_file_noop
11081+ ;;
11082+ * ) # otherwise, assume *nix
11083+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
11084+ ;;
11085+ esac
11086+ ;;
11087+ * ) # unhandled hosts (and "normal" native builds)
11088+ lt_cv_to_host_file_cmd=func_convert_file_noop
11089+ ;;
11090+esac
11091+
11092+fi
11093+
11094+to_host_file_cmd=$lt_cv_to_host_file_cmd
11095+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
11096+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
11097+
11098+
11099+
11100+
11101+
11102+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
11103+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
11104+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
11105+ $as_echo_n "(cached) " >&6
11106+else
11107+ #assume ordinary cross tools, or native build.
11108+lt_cv_to_tool_file_cmd=func_convert_file_noop
11109+case $host in
11110+ *-*-mingw* )
11111+ case $build in
11112+ *-*-mingw* ) # actually msys
11113+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
11114+ ;;
11115+ esac
11116+ ;;
11117+esac
11118+
11119+fi
11120+
11121+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
11122+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
11123+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
11124+
11125+
11126+
11127+
11128+
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
11130 $as_echo_n "checking for $LD option to reload object files... " >&6; }
11131 if test "${lt_cv_ld_reload_flag+set}" = set; then :
11132@@ -5939,6 +6019,11 @@ case $reload_flag in
11133 esac
11134 reload_cmds='$LD$reload_flag -o $output$reload_objs'
11135 case $host_os in
11136+ cygwin* | mingw* | pw32* | cegcc*)
11137+ if test "$GCC" != yes; then
11138+ reload_cmds=false
11139+ fi
11140+ ;;
11141 darwin*)
11142 if test "$GCC" = yes; then
11143 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
11144@@ -6107,7 +6192,8 @@ mingw* | pw32*)
11145 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
11146 lt_cv_file_magic_cmd='func_win32_libid'
11147 else
11148- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
11149+ # Keep this pattern in sync with the one in func_win32_libid.
11150+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
11151 lt_cv_file_magic_cmd='$OBJDUMP -f'
11152 fi
11153 ;;
11154@@ -6261,6 +6347,21 @@ esac
11155 fi
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
11157 $as_echo "$lt_cv_deplibs_check_method" >&6; }
11158+
11159+file_magic_glob=
11160+want_nocaseglob=no
11161+if test "$build" = "$host"; then
11162+ case $host_os in
11163+ mingw* | pw32*)
11164+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
11165+ want_nocaseglob=yes
11166+ else
11167+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
11168+ fi
11169+ ;;
11170+ esac
11171+fi
11172+
11173 file_magic_cmd=$lt_cv_file_magic_cmd
11174 deplibs_check_method=$lt_cv_deplibs_check_method
11175 test -z "$deplibs_check_method" && deplibs_check_method=unknown
11176@@ -6276,9 +6377,162 @@ test -z "$deplibs_check_method" && depli
11177
11178
11179
11180+
11181+
11182+
11183+
11184+
11185+
11186+
11187+
11188+
11189+
11190 if test -n "$ac_tool_prefix"; then
11191- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
11192-set dummy ${ac_tool_prefix}ar; ac_word=$2
11193+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
11194+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
11195+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11196+$as_echo_n "checking for $ac_word... " >&6; }
11197+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
11198+ $as_echo_n "(cached) " >&6
11199+else
11200+ if test -n "$DLLTOOL"; then
11201+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
11202+else
11203+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11204+for as_dir in $PATH
11205+do
11206+ IFS=$as_save_IFS
11207+ test -z "$as_dir" && as_dir=.
11208+ for ac_exec_ext in '' $ac_executable_extensions; do
11209+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11210+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
11211+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11212+ break 2
11213+ fi
11214+done
11215+ done
11216+IFS=$as_save_IFS
11217+
11218+fi
11219+fi
11220+DLLTOOL=$ac_cv_prog_DLLTOOL
11221+if test -n "$DLLTOOL"; then
11222+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11223+$as_echo "$DLLTOOL" >&6; }
11224+else
11225+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11226+$as_echo "no" >&6; }
11227+fi
11228+
11229+
11230+fi
11231+if test -z "$ac_cv_prog_DLLTOOL"; then
11232+ ac_ct_DLLTOOL=$DLLTOOL
11233+ # Extract the first word of "dlltool", so it can be a program name with args.
11234+set dummy dlltool; ac_word=$2
11235+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11236+$as_echo_n "checking for $ac_word... " >&6; }
11237+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
11238+ $as_echo_n "(cached) " >&6
11239+else
11240+ if test -n "$ac_ct_DLLTOOL"; then
11241+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
11242+else
11243+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11244+for as_dir in $PATH
11245+do
11246+ IFS=$as_save_IFS
11247+ test -z "$as_dir" && as_dir=.
11248+ for ac_exec_ext in '' $ac_executable_extensions; do
11249+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11250+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
11251+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11252+ break 2
11253+ fi
11254+done
11255+ done
11256+IFS=$as_save_IFS
11257+
11258+fi
11259+fi
11260+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
11261+if test -n "$ac_ct_DLLTOOL"; then
11262+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
11263+$as_echo "$ac_ct_DLLTOOL" >&6; }
11264+else
11265+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266+$as_echo "no" >&6; }
11267+fi
11268+
11269+ if test "x$ac_ct_DLLTOOL" = x; then
11270+ DLLTOOL="false"
11271+ else
11272+ case $cross_compiling:$ac_tool_warned in
11273+yes:)
11274+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11275+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11276+ac_tool_warned=yes ;;
11277+esac
11278+ DLLTOOL=$ac_ct_DLLTOOL
11279+ fi
11280+else
11281+ DLLTOOL="$ac_cv_prog_DLLTOOL"
11282+fi
11283+
11284+test -z "$DLLTOOL" && DLLTOOL=dlltool
11285+
11286+
11287+
11288+
11289+
11290+
11291+
11292+
11293+
11294+
11295+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
11296+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
11297+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
11298+ $as_echo_n "(cached) " >&6
11299+else
11300+ lt_cv_sharedlib_from_linklib_cmd='unknown'
11301+
11302+case $host_os in
11303+cygwin* | mingw* | pw32* | cegcc*)
11304+ # two different shell functions defined in ltmain.sh
11305+ # decide which to use based on capabilities of $DLLTOOL
11306+ case `$DLLTOOL --help 2>&1` in
11307+ *--identify-strict*)
11308+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
11309+ ;;
11310+ *)
11311+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
11312+ ;;
11313+ esac
11314+ ;;
11315+*)
11316+ # fallback: assume linklib IS sharedlib
11317+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
11318+ ;;
11319+esac
11320+
11321+fi
11322+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
11323+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
11324+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
11325+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
11326+
11327+
11328+
11329+
11330+
11331+
11332+
11333+if test -n "$ac_tool_prefix"; then
11334+ for ac_prog in ar
11335+ do
11336+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11337+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11339 $as_echo_n "checking for $ac_word... " >&6; }
11340 if test "${ac_cv_prog_AR+set}" = set; then :
11341@@ -6294,7 +6548,7 @@ do
11342 test -z "$as_dir" && as_dir=.
11343 for ac_exec_ext in '' $ac_executable_extensions; do
11344 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11345- ac_cv_prog_AR="${ac_tool_prefix}ar"
11346+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
11347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348 break 2
11349 fi
11350@@ -6314,11 +6568,15 @@ $as_echo "no" >&6; }
11351 fi
11352
11353
11354+ test -n "$AR" && break
11355+ done
11356 fi
11357-if test -z "$ac_cv_prog_AR"; then
11358+if test -z "$AR"; then
11359 ac_ct_AR=$AR
11360- # Extract the first word of "ar", so it can be a program name with args.
11361-set dummy ar; ac_word=$2
11362+ for ac_prog in ar
11363+do
11364+ # Extract the first word of "$ac_prog", so it can be a program name with args.
11365+set dummy $ac_prog; ac_word=$2
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11367 $as_echo_n "checking for $ac_word... " >&6; }
11368 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
11369@@ -6334,7 +6592,7 @@ do
11370 test -z "$as_dir" && as_dir=.
11371 for ac_exec_ext in '' $ac_executable_extensions; do
11372 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11373- ac_cv_prog_ac_ct_AR="ar"
11374+ ac_cv_prog_ac_ct_AR="$ac_prog"
11375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11376 break 2
11377 fi
11378@@ -6353,6 +6611,10 @@ else
11379 $as_echo "no" >&6; }
11380 fi
11381
11382+
11383+ test -n "$ac_ct_AR" && break
11384+done
11385+
11386 if test "x$ac_ct_AR" = x; then
11387 AR="false"
11388 else
11389@@ -6364,12 +6626,10 @@ ac_tool_warned=yes ;;
11390 esac
11391 AR=$ac_ct_AR
11392 fi
11393-else
11394- AR="$ac_cv_prog_AR"
11395 fi
11396
11397-test -z "$AR" && AR=ar
11398-test -z "$AR_FLAGS" && AR_FLAGS=cru
11399+: ${AR=ar}
11400+: ${AR_FLAGS=cru}
11401
11402
11403
11404@@ -6381,6 +6641,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
11405
11406
11407
11408+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
11409+$as_echo_n "checking for archiver @FILE support... " >&6; }
11410+if test "${lt_cv_ar_at_file+set}" = set; then :
11411+ $as_echo_n "(cached) " >&6
11412+else
11413+ lt_cv_ar_at_file=no
11414+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11415+/* end confdefs.h. */
11416+
11417+int
11418+main ()
11419+{
11420+
11421+ ;
11422+ return 0;
11423+}
11424+_ACEOF
11425+if ac_fn_c_try_compile "$LINENO"; then :
11426+ echo conftest.$ac_objext > conftest.lst
11427+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
11428+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
11429+ (eval $lt_ar_try) 2>&5
11430+ ac_status=$?
11431+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11432+ test $ac_status = 0; }
11433+ if test "$ac_status" -eq 0; then
11434+ # Ensure the archiver fails upon bogus file names.
11435+ rm -f conftest.$ac_objext libconftest.a
11436+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
11437+ (eval $lt_ar_try) 2>&5
11438+ ac_status=$?
11439+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11440+ test $ac_status = 0; }
11441+ if test "$ac_status" -ne 0; then
11442+ lt_cv_ar_at_file=@
11443+ fi
11444+ fi
11445+ rm -f conftest.* libconftest.a
11446+
11447+fi
11448+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11449+
11450+fi
11451+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
11452+$as_echo "$lt_cv_ar_at_file" >&6; }
11453+
11454+if test "x$lt_cv_ar_at_file" = xno; then
11455+ archiver_list_spec=
11456+else
11457+ archiver_list_spec=$lt_cv_ar_at_file
11458+fi
11459+
11460+
11461+
11462+
11463+
11464+
11465+
11466 if test -n "$ac_tool_prefix"; then
11467 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
11468 set dummy ${ac_tool_prefix}strip; ac_word=$2
11469@@ -6715,8 +7033,8 @@ esac
11470 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
11471
11472 # Transform an extracted symbol line into symbol name and symbol address
11473-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
11474-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
11475+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
11476+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
11477
11478 # Handle CRLF in mingw tool chain
11479 opt_cr=
11480@@ -6752,6 +7070,7 @@ for ac_symprfx in "" "_"; do
11481 else
11482 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
11483 fi
11484+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
11485
11486 # Check to see that the pipe works correctly.
11487 pipe_works=no
11488@@ -6793,6 +7112,18 @@ _LT_EOF
11489 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
11490 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
11491 cat <<_LT_EOF > conftest.$ac_ext
11492+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
11493+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
11494+/* DATA imports from DLLs on WIN32 con't be const, because runtime
11495+ relocations are performed -- see ld's documentation on pseudo-relocs. */
11496+# define LT_DLSYM_CONST
11497+#elif defined(__osf__)
11498+/* This system does not cope well with relocations in const data. */
11499+# define LT_DLSYM_CONST
11500+#else
11501+# define LT_DLSYM_CONST const
11502+#endif
11503+
11504 #ifdef __cplusplus
11505 extern "C" {
11506 #endif
11507@@ -6804,7 +7135,7 @@ _LT_EOF
11508 cat <<_LT_EOF >> conftest.$ac_ext
11509
11510 /* The mapping between symbol names and symbols. */
11511-const struct {
11512+LT_DLSYM_CONST struct {
11513 const char *name;
11514 void *address;
11515 }
11516@@ -6830,8 +7161,8 @@ static const void *lt_preloaded_setup()
11517 _LT_EOF
11518 # Now try linking the two files.
11519 mv conftest.$ac_objext conftstm.$ac_objext
11520- lt_save_LIBS="$LIBS"
11521- lt_save_CFLAGS="$CFLAGS"
11522+ lt_globsym_save_LIBS=$LIBS
11523+ lt_globsym_save_CFLAGS=$CFLAGS
11524 LIBS="conftstm.$ac_objext"
11525 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
11526 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11527@@ -6841,8 +7172,8 @@ _LT_EOF
11528 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
11529 pipe_works=yes
11530 fi
11531- LIBS="$lt_save_LIBS"
11532- CFLAGS="$lt_save_CFLAGS"
11533+ LIBS=$lt_globsym_save_LIBS
11534+ CFLAGS=$lt_globsym_save_CFLAGS
11535 else
11536 echo "cannot find nm_test_func in $nlist" >&5
11537 fi
11538@@ -6879,6 +7210,19 @@ else
11539 $as_echo "ok" >&6; }
11540 fi
11541
11542+# Response file support.
11543+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
11544+ nm_file_list_spec='@'
11545+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
11546+ nm_file_list_spec='@'
11547+fi
11548+
11549+
11550+
11551+
11552+
11553+
11554+
11555
11556
11557
11558@@ -6899,6 +7243,42 @@ fi
11559
11560
11561
11562+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
11563+$as_echo_n "checking for sysroot... " >&6; }
11564+
11565+# Check whether --with-libtool-sysroot was given.
11566+if test "${with_libtool_sysroot+set}" = set; then :
11567+ withval=$with_libtool_sysroot;
11568+else
11569+ with_libtool_sysroot=no
11570+fi
11571+
11572+
11573+lt_sysroot=
11574+case ${with_libtool_sysroot} in #(
11575+ yes)
11576+ if test "$GCC" = yes; then
11577+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
11578+ fi
11579+ ;; #(
11580+ /*)
11581+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
11582+ ;; #(
11583+ no|'')
11584+ ;; #(
11585+ *)
11586+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
11587+$as_echo "${with_libtool_sysroot}" >&6; }
11588+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
11589+ ;;
11590+esac
11591+
11592+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
11593+$as_echo "${lt_sysroot:-no}" >&6; }
11594+
11595+
11596+
11597+
11598
11599 # Check whether --enable-libtool-lock was given.
11600 if test "${enable_libtool_lock+set}" = set; then :
11601@@ -7093,6 +7473,123 @@ esac
11602
11603 need_locks="$enable_libtool_lock"
11604
11605+if test -n "$ac_tool_prefix"; then
11606+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
11607+set dummy ${ac_tool_prefix}mt; ac_word=$2
11608+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11609+$as_echo_n "checking for $ac_word... " >&6; }
11610+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
11611+ $as_echo_n "(cached) " >&6
11612+else
11613+ if test -n "$MANIFEST_TOOL"; then
11614+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
11615+else
11616+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617+for as_dir in $PATH
11618+do
11619+ IFS=$as_save_IFS
11620+ test -z "$as_dir" && as_dir=.
11621+ for ac_exec_ext in '' $ac_executable_extensions; do
11622+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11623+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
11624+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625+ break 2
11626+ fi
11627+done
11628+ done
11629+IFS=$as_save_IFS
11630+
11631+fi
11632+fi
11633+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
11634+if test -n "$MANIFEST_TOOL"; then
11635+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
11636+$as_echo "$MANIFEST_TOOL" >&6; }
11637+else
11638+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639+$as_echo "no" >&6; }
11640+fi
11641+
11642+
11643+fi
11644+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
11645+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
11646+ # Extract the first word of "mt", so it can be a program name with args.
11647+set dummy mt; ac_word=$2
11648+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11649+$as_echo_n "checking for $ac_word... " >&6; }
11650+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
11651+ $as_echo_n "(cached) " >&6
11652+else
11653+ if test -n "$ac_ct_MANIFEST_TOOL"; then
11654+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
11655+else
11656+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11657+for as_dir in $PATH
11658+do
11659+ IFS=$as_save_IFS
11660+ test -z "$as_dir" && as_dir=.
11661+ for ac_exec_ext in '' $ac_executable_extensions; do
11662+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11663+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
11664+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11665+ break 2
11666+ fi
11667+done
11668+ done
11669+IFS=$as_save_IFS
11670+
11671+fi
11672+fi
11673+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
11674+if test -n "$ac_ct_MANIFEST_TOOL"; then
11675+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
11676+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
11677+else
11678+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679+$as_echo "no" >&6; }
11680+fi
11681+
11682+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
11683+ MANIFEST_TOOL=":"
11684+ else
11685+ case $cross_compiling:$ac_tool_warned in
11686+yes:)
11687+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11688+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11689+ac_tool_warned=yes ;;
11690+esac
11691+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
11692+ fi
11693+else
11694+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
11695+fi
11696+
11697+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
11698+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
11699+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
11700+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
11701+ $as_echo_n "(cached) " >&6
11702+else
11703+ lt_cv_path_mainfest_tool=no
11704+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
11705+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
11706+ cat conftest.err >&5
11707+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
11708+ lt_cv_path_mainfest_tool=yes
11709+ fi
11710+ rm -f conftest*
11711+fi
11712+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
11713+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
11714+if test "x$lt_cv_path_mainfest_tool" != xyes; then
11715+ MANIFEST_TOOL=:
11716+fi
11717+
11718+
11719+
11720+
11721+
11722
11723 case $host_os in
11724 rhapsody* | darwin*)
11725@@ -7656,6 +8153,8 @@ _LT_EOF
11726 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
11727 echo "$AR cru libconftest.a conftest.o" >&5
11728 $AR cru libconftest.a conftest.o 2>&5
11729+ echo "$RANLIB libconftest.a" >&5
11730+ $RANLIB libconftest.a 2>&5
11731 cat > conftest.c << _LT_EOF
11732 int main() { return 0;}
11733 _LT_EOF
11734@@ -7851,7 +8350,8 @@ fi
11735 LIBTOOL_DEPS="$ltmain"
11736
11737 # Always use our own libtool.
11738-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11739+LIBTOOL='$(SHELL) $(top_builddir)'
11740+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
11741
11742
11743
11744@@ -7940,7 +8440,7 @@ aix3*)
11745 esac
11746
11747 # Global variables:
11748-ofile=libtool
11749+ofile=${host_alias}-libtool
11750 can_build_shared=yes
11751
11752 # All known linkers require a `.a' archive for static linking (except MSVC,
11753@@ -8238,8 +8738,6 @@ fi
11754 lt_prog_compiler_pic=
11755 lt_prog_compiler_static=
11756
11757-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11758-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11759
11760 if test "$GCC" = yes; then
11761 lt_prog_compiler_wl='-Wl,'
11762@@ -8404,6 +8902,12 @@ $as_echo_n "checking for $compiler optio
11763 lt_prog_compiler_pic='--shared'
11764 lt_prog_compiler_static='--static'
11765 ;;
11766+ nagfor*)
11767+ # NAG Fortran compiler
11768+ lt_prog_compiler_wl='-Wl,-Wl,,'
11769+ lt_prog_compiler_pic='-PIC'
11770+ lt_prog_compiler_static='-Bstatic'
11771+ ;;
11772 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11773 # Portland Group compilers (*not* the Pentium gcc compiler,
11774 # which looks to be a dead project)
11775@@ -8466,7 +8970,7 @@ $as_echo_n "checking for $compiler optio
11776 lt_prog_compiler_pic='-KPIC'
11777 lt_prog_compiler_static='-Bstatic'
11778 case $cc_basename in
11779- f77* | f90* | f95*)
11780+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11781 lt_prog_compiler_wl='-Qoption ld ';;
11782 *)
11783 lt_prog_compiler_wl='-Wl,';;
11784@@ -8523,13 +9027,17 @@ case $host_os in
11785 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11786 ;;
11787 esac
11788-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
11789-$as_echo "$lt_prog_compiler_pic" >&6; }
11790-
11791-
11792-
11793-
11794
11795+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11796+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11797+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
11798+ $as_echo_n "(cached) " >&6
11799+else
11800+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11801+fi
11802+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11803+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
11804+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11805
11806 #
11807 # Check to make sure the PIC flag actually works.
11808@@ -8590,6 +9098,11 @@ fi
11809
11810
11811
11812+
11813+
11814+
11815+
11816+
11817 #
11818 # Check to make sure the static flag actually works.
11819 #
11820@@ -8940,7 +9453,8 @@ _LT_EOF
11821 allow_undefined_flag=unsupported
11822 always_export_symbols=no
11823 enable_shared_with_static_runtimes=yes
11824- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11825+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
11826+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11827
11828 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11829 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11830@@ -8988,7 +9502,7 @@ _LT_EOF
11831 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11832 && test "$tmp_diet" = no
11833 then
11834- tmp_addflag=
11835+ tmp_addflag=' $pic_flag'
11836 tmp_sharedflag='-shared'
11837 case $cc_basename,$host_cpu in
11838 pgcc*) # Portland Group C compiler
11839@@ -9039,12 +9553,12 @@ _LT_EOF
11840 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11841 hardcode_libdir_flag_spec=
11842 hardcode_libdir_flag_spec_ld='-rpath $libdir'
11843- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
11844+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11845 if test "x$supports_anon_versioning" = xyes; then
11846 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11847 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11848 echo "local: *; };" >> $output_objdir/$libname.ver~
11849- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11850+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11851 fi
11852 ;;
11853 esac
11854@@ -9058,8 +9572,8 @@ _LT_EOF
11855 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11856 wlarc=
11857 else
11858- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11859- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11860+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11861+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11862 fi
11863 ;;
11864
11865@@ -9077,8 +9591,8 @@ _LT_EOF
11866
11867 _LT_EOF
11868 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11869- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11870- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11871+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11872+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11873 else
11874 ld_shlibs=no
11875 fi
11876@@ -9124,8 +9638,8 @@ _LT_EOF
11877
11878 *)
11879 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11880- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11881- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11882+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11883+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11884 else
11885 ld_shlibs=no
11886 fi
11887@@ -9255,7 +9769,13 @@ _LT_EOF
11888 allow_undefined_flag='-berok'
11889 # Determine the default libpath from the value encoded in an
11890 # empty executable.
11891- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892+ if test "${lt_cv_aix_libpath+set}" = set; then
11893+ aix_libpath=$lt_cv_aix_libpath
11894+else
11895+ if test "${lt_cv_aix_libpath_+set}" = set; then :
11896+ $as_echo_n "(cached) " >&6
11897+else
11898+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899 /* end confdefs.h. */
11900
11901 int
11902@@ -9268,22 +9788,29 @@ main ()
11903 _ACEOF
11904 if ac_fn_c_try_link "$LINENO"; then :
11905
11906-lt_aix_libpath_sed='
11907- /Import File Strings/,/^$/ {
11908- /^0/ {
11909- s/^0 *\(.*\)$/\1/
11910- p
11911- }
11912- }'
11913-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11914-# Check for a 64-bit object if we didn't find anything.
11915-if test -z "$aix_libpath"; then
11916- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11917-fi
11918+ lt_aix_libpath_sed='
11919+ /Import File Strings/,/^$/ {
11920+ /^0/ {
11921+ s/^0 *\([^ ]*\) *$/\1/
11922+ p
11923+ }
11924+ }'
11925+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11926+ # Check for a 64-bit object if we didn't find anything.
11927+ if test -z "$lt_cv_aix_libpath_"; then
11928+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11929+ fi
11930 fi
11931 rm -f core conftest.err conftest.$ac_objext \
11932 conftest$ac_exeext conftest.$ac_ext
11933-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11934+ if test -z "$lt_cv_aix_libpath_"; then
11935+ lt_cv_aix_libpath_="/usr/lib:/lib"
11936+ fi
11937+
11938+fi
11939+
11940+ aix_libpath=$lt_cv_aix_libpath_
11941+fi
11942
11943 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11944 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11945@@ -9295,7 +9822,13 @@ if test -z "$aix_libpath"; then aix_libp
11946 else
11947 # Determine the default libpath from the value encoded in an
11948 # empty executable.
11949- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950+ if test "${lt_cv_aix_libpath+set}" = set; then
11951+ aix_libpath=$lt_cv_aix_libpath
11952+else
11953+ if test "${lt_cv_aix_libpath_+set}" = set; then :
11954+ $as_echo_n "(cached) " >&6
11955+else
11956+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957 /* end confdefs.h. */
11958
11959 int
11960@@ -9308,22 +9841,29 @@ main ()
11961 _ACEOF
11962 if ac_fn_c_try_link "$LINENO"; then :
11963
11964-lt_aix_libpath_sed='
11965- /Import File Strings/,/^$/ {
11966- /^0/ {
11967- s/^0 *\(.*\)$/\1/
11968- p
11969- }
11970- }'
11971-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11972-# Check for a 64-bit object if we didn't find anything.
11973-if test -z "$aix_libpath"; then
11974- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11975-fi
11976+ lt_aix_libpath_sed='
11977+ /Import File Strings/,/^$/ {
11978+ /^0/ {
11979+ s/^0 *\([^ ]*\) *$/\1/
11980+ p
11981+ }
11982+ }'
11983+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11984+ # Check for a 64-bit object if we didn't find anything.
11985+ if test -z "$lt_cv_aix_libpath_"; then
11986+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11987+ fi
11988 fi
11989 rm -f core conftest.err conftest.$ac_objext \
11990 conftest$ac_exeext conftest.$ac_ext
11991-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11992+ if test -z "$lt_cv_aix_libpath_"; then
11993+ lt_cv_aix_libpath_="/usr/lib:/lib"
11994+ fi
11995+
11996+fi
11997+
11998+ aix_libpath=$lt_cv_aix_libpath_
11999+fi
12000
12001 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
12002 # Warning - without using the other run time loading flags,
12003@@ -9368,20 +9908,63 @@ if test -z "$aix_libpath"; then aix_libp
12004 # Microsoft Visual C++.
12005 # hardcode_libdir_flag_spec is actually meaningless, as there is
12006 # no search path for DLLs.
12007- hardcode_libdir_flag_spec=' '
12008- allow_undefined_flag=unsupported
12009- # Tell ltmain to make .lib files, not .a files.
12010- libext=lib
12011- # Tell ltmain to make .dll files, not .so files.
12012- shrext_cmds=".dll"
12013- # FIXME: Setting linknames here is a bad hack.
12014- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12015- # The linker will automatically build a .lib file if we build a DLL.
12016- old_archive_from_new_cmds='true'
12017- # FIXME: Should let the user specify the lib program.
12018- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12019- fix_srcfile_path='`cygpath -w "$srcfile"`'
12020- enable_shared_with_static_runtimes=yes
12021+ case $cc_basename in
12022+ cl*)
12023+ # Native MSVC
12024+ hardcode_libdir_flag_spec=' '
12025+ allow_undefined_flag=unsupported
12026+ always_export_symbols=yes
12027+ file_list_spec='@'
12028+ # Tell ltmain to make .lib files, not .a files.
12029+ libext=lib
12030+ # Tell ltmain to make .dll files, not .so files.
12031+ shrext_cmds=".dll"
12032+ # FIXME: Setting linknames here is a bad hack.
12033+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
12034+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
12035+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
12036+ else
12037+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
12038+ fi~
12039+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12040+ linknames='
12041+ # The linker will not automatically build a static lib if we build a DLL.
12042+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12043+ enable_shared_with_static_runtimes=yes
12044+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12045+ # Don't use ranlib
12046+ old_postinstall_cmds='chmod 644 $oldlib'
12047+ postlink_cmds='lt_outputfile="@OUTPUT@"~
12048+ lt_tool_outputfile="@TOOL_OUTPUT@"~
12049+ case $lt_outputfile in
12050+ *.exe|*.EXE) ;;
12051+ *)
12052+ lt_outputfile="$lt_outputfile.exe"
12053+ lt_tool_outputfile="$lt_tool_outputfile.exe"
12054+ ;;
12055+ esac~
12056+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
12057+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12058+ $RM "$lt_outputfile.manifest";
12059+ fi'
12060+ ;;
12061+ *)
12062+ # Assume MSVC wrapper
12063+ hardcode_libdir_flag_spec=' '
12064+ allow_undefined_flag=unsupported
12065+ # Tell ltmain to make .lib files, not .a files.
12066+ libext=lib
12067+ # Tell ltmain to make .dll files, not .so files.
12068+ shrext_cmds=".dll"
12069+ # FIXME: Setting linknames here is a bad hack.
12070+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12071+ # The linker will automatically build a .lib file if we build a DLL.
12072+ old_archive_from_new_cmds='true'
12073+ # FIXME: Should let the user specify the lib program.
12074+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12075+ enable_shared_with_static_runtimes=yes
12076+ ;;
12077+ esac
12078 ;;
12079
12080 darwin* | rhapsody*)
12081@@ -9446,7 +10029,7 @@ if test -z "$aix_libpath"; then aix_libp
12082
12083 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12084 freebsd* | dragonfly*)
12085- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
12086+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12087 hardcode_libdir_flag_spec='-R$libdir'
12088 hardcode_direct=yes
12089 hardcode_shlibpath_var=no
12090@@ -9454,7 +10037,7 @@ if test -z "$aix_libpath"; then aix_libp
12091
12092 hpux9*)
12093 if test "$GCC" = yes; then
12094- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
12095+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
12096 else
12097 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
12098 fi
12099@@ -9470,7 +10053,7 @@ if test -z "$aix_libpath"; then aix_libp
12100
12101 hpux10*)
12102 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
12103- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12104+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12105 else
12106 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12107 fi
12108@@ -9494,10 +10077,10 @@ if test -z "$aix_libpath"; then aix_libp
12109 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12110 ;;
12111 ia64*)
12112- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12113+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12114 ;;
12115 *)
12116- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12117+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12118 ;;
12119 esac
12120 else
12121@@ -9576,23 +10159,36 @@ fi
12122
12123 irix5* | irix6* | nonstopux*)
12124 if test "$GCC" = yes; then
12125- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12126+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12127 # Try to use the -exported_symbol ld option, if it does not
12128 # work, assume that -exports_file does not work either and
12129 # implicitly export all symbols.
12130- save_LDFLAGS="$LDFLAGS"
12131- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
12132- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12133+ # This should be the same for all languages, so no per-tag cache variable.
12134+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12135+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12136+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
12137+ $as_echo_n "(cached) " >&6
12138+else
12139+ save_LDFLAGS="$LDFLAGS"
12140+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
12141+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12142 /* end confdefs.h. */
12143-int foo(void) {}
12144+int foo (void) { return 0; }
12145 _ACEOF
12146 if ac_fn_c_try_link "$LINENO"; then :
12147- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
12148-
12149+ lt_cv_irix_exported_symbol=yes
12150+else
12151+ lt_cv_irix_exported_symbol=no
12152 fi
12153 rm -f core conftest.err conftest.$ac_objext \
12154 conftest$ac_exeext conftest.$ac_ext
12155- LDFLAGS="$save_LDFLAGS"
12156+ LDFLAGS="$save_LDFLAGS"
12157+fi
12158+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12159+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
12160+ if test "$lt_cv_irix_exported_symbol" = yes; then
12161+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
12162+ fi
12163 else
12164 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
12165 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
12166@@ -9677,7 +10273,7 @@ rm -f core conftest.err conftest.$ac_obj
12167 osf4* | osf5*) # as osf3* with the addition of -msym flag
12168 if test "$GCC" = yes; then
12169 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
12170- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12171+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12172 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12173 else
12174 allow_undefined_flag=' -expect_unresolved \*'
12175@@ -9696,9 +10292,9 @@ rm -f core conftest.err conftest.$ac_obj
12176 no_undefined_flag=' -z defs'
12177 if test "$GCC" = yes; then
12178 wlarc='${wl}'
12179- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12180+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12181 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12182- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12183+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12184 else
12185 case `$CC -V 2>&1` in
12186 *"Compilers 5.0"*)
12187@@ -10274,8 +10870,9 @@ cygwin* | mingw* | pw32* | cegcc*)
12188 need_version=no
12189 need_lib_prefix=no
12190
12191- case $GCC,$host_os in
12192- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
12193+ case $GCC,$cc_basename in
12194+ yes,*)
12195+ # gcc
12196 library_names_spec='$libname.dll.a'
12197 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12198 postinstall_cmds='base_file=`basename \${file}`~
12199@@ -10308,13 +10905,71 @@ cygwin* | mingw* | pw32* | cegcc*)
12200 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12201 ;;
12202 esac
12203+ dynamic_linker='Win32 ld.exe'
12204+ ;;
12205+
12206+ *,cl*)
12207+ # Native MSVC
12208+ libname_spec='$name'
12209+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12210+ library_names_spec='${libname}.dll.lib'
12211+
12212+ case $build_os in
12213+ mingw*)
12214+ sys_lib_search_path_spec=
12215+ lt_save_ifs=$IFS
12216+ IFS=';'
12217+ for lt_path in $LIB
12218+ do
12219+ IFS=$lt_save_ifs
12220+ # Let DOS variable expansion print the short 8.3 style file name.
12221+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12222+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
12223+ done
12224+ IFS=$lt_save_ifs
12225+ # Convert to MSYS style.
12226+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
12227+ ;;
12228+ cygwin*)
12229+ # Convert to unix form, then to dos form, then back to unix form
12230+ # but this time dos style (no spaces!) so that the unix form looks
12231+ # like /cygdrive/c/PROGRA~1:/cygdr...
12232+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
12233+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
12234+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12235+ ;;
12236+ *)
12237+ sys_lib_search_path_spec="$LIB"
12238+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
12239+ # It is most probably a Windows format PATH.
12240+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12241+ else
12242+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12243+ fi
12244+ # FIXME: find the short name or the path components, as spaces are
12245+ # common. (e.g. "Program Files" -> "PROGRA~1")
12246+ ;;
12247+ esac
12248+
12249+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
12250+ postinstall_cmds='base_file=`basename \${file}`~
12251+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12252+ dldir=$destdir/`dirname \$dlpath`~
12253+ test -d \$dldir || mkdir -p \$dldir~
12254+ $install_prog $dir/$dlname \$dldir/$dlname'
12255+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12256+ dlpath=$dir/\$dldll~
12257+ $RM \$dlpath'
12258+ shlibpath_overrides_runpath=yes
12259+ dynamic_linker='Win32 link.exe'
12260 ;;
12261
12262 *)
12263+ # Assume MSVC wrapper
12264 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12265+ dynamic_linker='Win32 ld.exe'
12266 ;;
12267 esac
12268- dynamic_linker='Win32 ld.exe'
12269 # FIXME: first we should search . and the directory the executable is in
12270 shlibpath_var=PATH
12271 ;;
12272@@ -10410,7 +11065,7 @@ haiku*)
12273 soname_spec='${libname}${release}${shared_ext}$major'
12274 shlibpath_var=LIBRARY_PATH
12275 shlibpath_overrides_runpath=yes
12276- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
12277+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
12278 hardcode_into_libs=yes
12279 ;;
12280
12281@@ -11206,7 +11861,7 @@ else
12282 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12283 lt_status=$lt_dlunknown
12284 cat > conftest.$ac_ext <<_LT_EOF
12285-#line 11209 "configure"
12286+#line $LINENO "configure"
12287 #include "confdefs.h"
12288
12289 #if HAVE_DLFCN_H
12290@@ -11250,10 +11905,10 @@ else
12291 /* When -fvisbility=hidden is used, assume the code has been annotated
12292 correspondingly for the symbols needed. */
12293 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12294-void fnord () __attribute__((visibility("default")));
12295+int fnord () __attribute__((visibility("default")));
12296 #endif
12297
12298-void fnord () { int i=42; }
12299+int fnord () { return 42; }
12300 int main ()
12301 {
12302 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12303@@ -11312,7 +11967,7 @@ else
12304 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12305 lt_status=$lt_dlunknown
12306 cat > conftest.$ac_ext <<_LT_EOF
12307-#line 11315 "configure"
12308+#line $LINENO "configure"
12309 #include "confdefs.h"
12310
12311 #if HAVE_DLFCN_H
12312@@ -11356,10 +12011,10 @@ else
12313 /* When -fvisbility=hidden is used, assume the code has been annotated
12314 correspondingly for the symbols needed. */
12315 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12316-void fnord () __attribute__((visibility("default")));
12317+int fnord () __attribute__((visibility("default")));
12318 #endif
12319
12320-void fnord () { int i=42; }
12321+int fnord () { return 42; }
12322 int main ()
12323 {
12324 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12325@@ -14754,13 +15409,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
12326 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
12327 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
12328 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
12329+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
12330+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
12331 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
12332 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
12333 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
12334 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
12335 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
12336+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
12337+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
12338+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
12339+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
12340 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
12341 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
12342+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
12343 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
12344 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
12345 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
12346@@ -14775,14 +15437,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
12347 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
12348 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
12349 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
12350+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
12351+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
12352 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
12353 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
12354 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
12355-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
12356 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
12357+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
12358 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
12359 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
12360 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
12361+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
12362 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
12363 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
12364 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
12365@@ -14815,12 +15480,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
12366 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
12367 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
12368 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
12369-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
12370 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
12371 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
12372 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
12373 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
12374 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
12375+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
12376 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
12377 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
12378 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
12379@@ -14875,8 +15540,13 @@ reload_flag \
12380 OBJDUMP \
12381 deplibs_check_method \
12382 file_magic_cmd \
12383+file_magic_glob \
12384+want_nocaseglob \
12385+DLLTOOL \
12386+sharedlib_from_linklib_cmd \
12387 AR \
12388 AR_FLAGS \
12389+archiver_list_spec \
12390 STRIP \
12391 RANLIB \
12392 CC \
12393@@ -14886,12 +15556,14 @@ lt_cv_sys_global_symbol_pipe \
12394 lt_cv_sys_global_symbol_to_cdecl \
12395 lt_cv_sys_global_symbol_to_c_name_address \
12396 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
12397+nm_file_list_spec \
12398 lt_prog_compiler_no_builtin_flag \
12399-lt_prog_compiler_wl \
12400 lt_prog_compiler_pic \
12401+lt_prog_compiler_wl \
12402 lt_prog_compiler_static \
12403 lt_cv_prog_compiler_c_o \
12404 need_locks \
12405+MANIFEST_TOOL \
12406 DSYMUTIL \
12407 NMEDIT \
12408 LIPO \
12409@@ -14907,7 +15579,6 @@ no_undefined_flag \
12410 hardcode_libdir_flag_spec \
12411 hardcode_libdir_flag_spec_ld \
12412 hardcode_libdir_separator \
12413-fix_srcfile_path \
12414 exclude_expsyms \
12415 include_expsyms \
12416 file_list_spec \
12417@@ -14943,6 +15614,7 @@ module_cmds \
12418 module_expsym_cmds \
12419 export_symbols_cmds \
12420 prelink_cmds \
12421+postlink_cmds \
12422 postinstall_cmds \
12423 postuninstall_cmds \
12424 finish_cmds \
12425@@ -15700,7 +16372,8 @@ $as_echo X"$file" |
12426 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
12427 #
12428 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
12429-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
12430+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
12431+# Inc.
12432 # Written by Gordon Matzigkeit, 1996
12433 #
12434 # This file is part of GNU Libtool.
12435@@ -15803,19 +16476,42 @@ SP2NL=$lt_lt_SP2NL
12436 # turn newlines into spaces.
12437 NL2SP=$lt_lt_NL2SP
12438
12439+# convert \$build file names to \$host format.
12440+to_host_file_cmd=$lt_cv_to_host_file_cmd
12441+
12442+# convert \$build files to toolchain format.
12443+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
12444+
12445 # An object symbol dumper.
12446 OBJDUMP=$lt_OBJDUMP
12447
12448 # Method to check whether dependent libraries are shared objects.
12449 deplibs_check_method=$lt_deplibs_check_method
12450
12451-# Command to use when deplibs_check_method == "file_magic".
12452+# Command to use when deplibs_check_method = "file_magic".
12453 file_magic_cmd=$lt_file_magic_cmd
12454
12455+# How to find potential files when deplibs_check_method = "file_magic".
12456+file_magic_glob=$lt_file_magic_glob
12457+
12458+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
12459+want_nocaseglob=$lt_want_nocaseglob
12460+
12461+# DLL creation program.
12462+DLLTOOL=$lt_DLLTOOL
12463+
12464+# Command to associate shared and link libraries.
12465+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
12466+
12467 # The archiver.
12468 AR=$lt_AR
12469+
12470+# Flags to create an archive.
12471 AR_FLAGS=$lt_AR_FLAGS
12472
12473+# How to feed a file listing to the archiver.
12474+archiver_list_spec=$lt_archiver_list_spec
12475+
12476 # A symbol stripping program.
12477 STRIP=$lt_STRIP
12478
12479@@ -15845,6 +16541,12 @@ global_symbol_to_c_name_address=$lt_lt_c
12480 # Transform the output of nm in a C name address pair when lib prefix is needed.
12481 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
12482
12483+# Specify filename containing input files for \$NM.
12484+nm_file_list_spec=$lt_nm_file_list_spec
12485+
12486+# The root where to search for dependent libraries,and in which our libraries should be installed.
12487+lt_sysroot=$lt_sysroot
12488+
12489 # The name of the directory that contains temporary libtool files.
12490 objdir=$objdir
12491
12492@@ -15854,6 +16556,9 @@ MAGIC_CMD=$MAGIC_CMD
12493 # Must we lock files when doing compilation?
12494 need_locks=$lt_need_locks
12495
12496+# Manifest tool.
12497+MANIFEST_TOOL=$lt_MANIFEST_TOOL
12498+
12499 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
12500 DSYMUTIL=$lt_DSYMUTIL
12501
12502@@ -15968,12 +16673,12 @@ with_gcc=$GCC
12503 # Compiler flag to turn off builtin functions.
12504 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
12505
12506-# How to pass a linker flag through the compiler.
12507-wl=$lt_lt_prog_compiler_wl
12508-
12509 # Additional compiler flags for building library objects.
12510 pic_flag=$lt_lt_prog_compiler_pic
12511
12512+# How to pass a linker flag through the compiler.
12513+wl=$lt_lt_prog_compiler_wl
12514+
12515 # Compiler flag to prevent dynamic linking.
12516 link_static_flag=$lt_lt_prog_compiler_static
12517
12518@@ -16060,9 +16765,6 @@ inherit_rpath=$inherit_rpath
12519 # Whether libtool must link a program against all its dependency libraries.
12520 link_all_deplibs=$link_all_deplibs
12521
12522-# Fix the shell variable \$srcfile for the compiler.
12523-fix_srcfile_path=$lt_fix_srcfile_path
12524-
12525 # Set to "yes" if exported symbols are required.
12526 always_export_symbols=$always_export_symbols
12527
12528@@ -16078,6 +16780,9 @@ include_expsyms=$lt_include_expsyms
12529 # Commands necessary for linking programs (against libraries) with templates.
12530 prelink_cmds=$lt_prelink_cmds
12531
12532+# Commands necessary for finishing linking programs.
12533+postlink_cmds=$lt_postlink_cmds
12534+
12535 # Specify filename containing input files.
12536 file_list_spec=$lt_file_list_spec
12537
12538@@ -16110,210 +16815,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
12539 # if finds mixed CR/LF and LF-only lines. Since sed operates in
12540 # text mode, it properly converts lines to CR/LF. This bash problem
12541 # is reportedly fixed, but why not run on old versions too?
12542- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
12543- || (rm -f "$cfgfile"; exit 1)
12544-
12545- case $xsi_shell in
12546- yes)
12547- cat << \_LT_EOF >> "$cfgfile"
12548-
12549-# func_dirname file append nondir_replacement
12550-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
12551-# otherwise set result to NONDIR_REPLACEMENT.
12552-func_dirname ()
12553-{
12554- case ${1} in
12555- */*) func_dirname_result="${1%/*}${2}" ;;
12556- * ) func_dirname_result="${3}" ;;
12557- esac
12558-}
12559-
12560-# func_basename file
12561-func_basename ()
12562-{
12563- func_basename_result="${1##*/}"
12564-}
12565-
12566-# func_dirname_and_basename file append nondir_replacement
12567-# perform func_basename and func_dirname in a single function
12568-# call:
12569-# dirname: Compute the dirname of FILE. If nonempty,
12570-# add APPEND to the result, otherwise set result
12571-# to NONDIR_REPLACEMENT.
12572-# value returned in "$func_dirname_result"
12573-# basename: Compute filename of FILE.
12574-# value retuned in "$func_basename_result"
12575-# Implementation must be kept synchronized with func_dirname
12576-# and func_basename. For efficiency, we do not delegate to
12577-# those functions but instead duplicate the functionality here.
12578-func_dirname_and_basename ()
12579-{
12580- case ${1} in
12581- */*) func_dirname_result="${1%/*}${2}" ;;
12582- * ) func_dirname_result="${3}" ;;
12583- esac
12584- func_basename_result="${1##*/}"
12585-}
12586-
12587-# func_stripname prefix suffix name
12588-# strip PREFIX and SUFFIX off of NAME.
12589-# PREFIX and SUFFIX must not contain globbing or regex special
12590-# characters, hashes, percent signs, but SUFFIX may contain a leading
12591-# dot (in which case that matches only a dot).
12592-func_stripname ()
12593-{
12594- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
12595- # positional parameters, so assign one to ordinary parameter first.
12596- func_stripname_result=${3}
12597- func_stripname_result=${func_stripname_result#"${1}"}
12598- func_stripname_result=${func_stripname_result%"${2}"}
12599-}
12600-
12601-# func_opt_split
12602-func_opt_split ()
12603-{
12604- func_opt_split_opt=${1%%=*}
12605- func_opt_split_arg=${1#*=}
12606-}
12607-
12608-# func_lo2o object
12609-func_lo2o ()
12610-{
12611- case ${1} in
12612- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
12613- *) func_lo2o_result=${1} ;;
12614- esac
12615-}
12616-
12617-# func_xform libobj-or-source
12618-func_xform ()
12619-{
12620- func_xform_result=${1%.*}.lo
12621-}
12622-
12623-# func_arith arithmetic-term...
12624-func_arith ()
12625-{
12626- func_arith_result=$(( $* ))
12627-}
12628-
12629-# func_len string
12630-# STRING may not start with a hyphen.
12631-func_len ()
12632-{
12633- func_len_result=${#1}
12634-}
12635-
12636-_LT_EOF
12637- ;;
12638- *) # Bourne compatible functions.
12639- cat << \_LT_EOF >> "$cfgfile"
12640-
12641-# func_dirname file append nondir_replacement
12642-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
12643-# otherwise set result to NONDIR_REPLACEMENT.
12644-func_dirname ()
12645-{
12646- # Extract subdirectory from the argument.
12647- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
12648- if test "X$func_dirname_result" = "X${1}"; then
12649- func_dirname_result="${3}"
12650- else
12651- func_dirname_result="$func_dirname_result${2}"
12652- fi
12653-}
12654-
12655-# func_basename file
12656-func_basename ()
12657-{
12658- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
12659-}
12660-
12661-
12662-# func_stripname prefix suffix name
12663-# strip PREFIX and SUFFIX off of NAME.
12664-# PREFIX and SUFFIX must not contain globbing or regex special
12665-# characters, hashes, percent signs, but SUFFIX may contain a leading
12666-# dot (in which case that matches only a dot).
12667-# func_strip_suffix prefix name
12668-func_stripname ()
12669-{
12670- case ${2} in
12671- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
12672- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
12673- esac
12674-}
12675-
12676-# sed scripts:
12677-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
12678-my_sed_long_arg='1s/^-[^=]*=//'
12679-
12680-# func_opt_split
12681-func_opt_split ()
12682-{
12683- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
12684- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
12685-}
12686-
12687-# func_lo2o object
12688-func_lo2o ()
12689-{
12690- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
12691-}
12692-
12693-# func_xform libobj-or-source
12694-func_xform ()
12695-{
12696- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
12697-}
12698-
12699-# func_arith arithmetic-term...
12700-func_arith ()
12701-{
12702- func_arith_result=`expr "$@"`
12703-}
12704-
12705-# func_len string
12706-# STRING may not start with a hyphen.
12707-func_len ()
12708-{
12709- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
12710-}
12711-
12712-_LT_EOF
12713-esac
12714-
12715-case $lt_shell_append in
12716- yes)
12717- cat << \_LT_EOF >> "$cfgfile"
12718-
12719-# func_append var value
12720-# Append VALUE to the end of shell variable VAR.
12721-func_append ()
12722-{
12723- eval "$1+=\$2"
12724-}
12725-_LT_EOF
12726- ;;
12727- *)
12728- cat << \_LT_EOF >> "$cfgfile"
12729-
12730-# func_append var value
12731-# Append VALUE to the end of shell variable VAR.
12732-func_append ()
12733-{
12734- eval "$1=\$$1\$2"
12735-}
12736-
12737-_LT_EOF
12738- ;;
12739- esac
12740+ sed '$q' "$ltmain" >> "$cfgfile" \
12741+ || (rm -f "$cfgfile"; exit 1)
12742
12743+ if test x"$xsi_shell" = xyes; then
12744+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
12745+func_dirname ()\
12746+{\
12747+\ case ${1} in\
12748+\ */*) func_dirname_result="${1%/*}${2}" ;;\
12749+\ * ) func_dirname_result="${3}" ;;\
12750+\ esac\
12751+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
12752+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12753+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12754+test 0 -eq $? || _lt_function_replace_fail=:
12755+
12756+
12757+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
12758+func_basename ()\
12759+{\
12760+\ func_basename_result="${1##*/}"\
12761+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
12762+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12763+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12764+test 0 -eq $? || _lt_function_replace_fail=:
12765+
12766+
12767+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
12768+func_dirname_and_basename ()\
12769+{\
12770+\ case ${1} in\
12771+\ */*) func_dirname_result="${1%/*}${2}" ;;\
12772+\ * ) func_dirname_result="${3}" ;;\
12773+\ esac\
12774+\ func_basename_result="${1##*/}"\
12775+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
12776+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12777+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12778+test 0 -eq $? || _lt_function_replace_fail=:
12779+
12780+
12781+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
12782+func_stripname ()\
12783+{\
12784+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
12785+\ # positional parameters, so assign one to ordinary parameter first.\
12786+\ func_stripname_result=${3}\
12787+\ func_stripname_result=${func_stripname_result#"${1}"}\
12788+\ func_stripname_result=${func_stripname_result%"${2}"}\
12789+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
12790+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12791+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12792+test 0 -eq $? || _lt_function_replace_fail=:
12793+
12794+
12795+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
12796+func_split_long_opt ()\
12797+{\
12798+\ func_split_long_opt_name=${1%%=*}\
12799+\ func_split_long_opt_arg=${1#*=}\
12800+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
12801+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12802+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12803+test 0 -eq $? || _lt_function_replace_fail=:
12804+
12805+
12806+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
12807+func_split_short_opt ()\
12808+{\
12809+\ func_split_short_opt_arg=${1#??}\
12810+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
12811+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
12812+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12813+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12814+test 0 -eq $? || _lt_function_replace_fail=:
12815+
12816+
12817+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
12818+func_lo2o ()\
12819+{\
12820+\ case ${1} in\
12821+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
12822+\ *) func_lo2o_result=${1} ;;\
12823+\ esac\
12824+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
12825+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12826+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12827+test 0 -eq $? || _lt_function_replace_fail=:
12828+
12829+
12830+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
12831+func_xform ()\
12832+{\
12833+ func_xform_result=${1%.*}.lo\
12834+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
12835+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12836+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12837+test 0 -eq $? || _lt_function_replace_fail=:
12838+
12839+
12840+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
12841+func_arith ()\
12842+{\
12843+ func_arith_result=$(( $* ))\
12844+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
12845+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12846+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12847+test 0 -eq $? || _lt_function_replace_fail=:
12848+
12849+
12850+ sed -e '/^func_len ()$/,/^} # func_len /c\
12851+func_len ()\
12852+{\
12853+ func_len_result=${#1}\
12854+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
12855+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12856+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12857+test 0 -eq $? || _lt_function_replace_fail=:
12858+
12859+fi
12860+
12861+if test x"$lt_shell_append" = xyes; then
12862+ sed -e '/^func_append ()$/,/^} # func_append /c\
12863+func_append ()\
12864+{\
12865+ eval "${1}+=\\${2}"\
12866+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
12867+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12868+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12869+test 0 -eq $? || _lt_function_replace_fail=:
12870+
12871+
12872+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
12873+func_append_quoted ()\
12874+{\
12875+\ func_quote_for_eval "${2}"\
12876+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
12877+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
12878+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12879+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12880+test 0 -eq $? || _lt_function_replace_fail=:
12881+
12882+
12883+ # Save a `func_append' function call where possible by direct use of '+='
12884+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
12885+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12886+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12887+ test 0 -eq $? || _lt_function_replace_fail=:
12888+else
12889+ # Save a `func_append' function call even when '+=' is not available
12890+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
12891+ && mv -f "$cfgfile.tmp" "$cfgfile" \
12892+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
12893+ test 0 -eq $? || _lt_function_replace_fail=:
12894+fi
12895+
12896+if test x"$_lt_function_replace_fail" = x":"; then
12897+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
12898+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
12899+fi
12900
12901- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
12902- || (rm -f "$cfgfile"; exit 1)
12903
12904- mv -f "$cfgfile" "$ofile" ||
12905+ mv -f "$cfgfile" "$ofile" ||
12906 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
12907 chmod +x "$ofile"
12908
12909Index: binutils-2.21.1/gas/configure
12910===================================================================
12911--- binutils-2.21.1.orig/gas/configure
12912+++ binutils-2.21.1/gas/configure
12913@@ -645,8 +645,11 @@ OTOOL
12914 LIPO
12915 NMEDIT
12916 DSYMUTIL
12917+MANIFEST_TOOL
12918 RANLIB
12919+ac_ct_AR
12920 AR
12921+DLLTOOL
12922 OBJDUMP
12923 LN_S
12924 NM
12925@@ -759,6 +762,7 @@ enable_static
12926 with_pic
12927 enable_fast_install
12928 with_gnu_ld
12929+with_libtool_sysroot
12930 enable_libtool_lock
12931 enable_targets
12932 enable_checking
12933@@ -1420,6 +1424,8 @@ Optional Packages:
12934 --with-pic try to use only PIC/non-PIC objects [default=use
12935 both]
12936 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
12937+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
12938+ (or the compiler's sysroot if not specified).
12939 --with-zlib include zlib support (auto/yes/no) default=auto
12940
12941 Some influential environment variables:
12942@@ -5135,8 +5141,8 @@ esac
12943
12944
12945
12946-macro_version='2.2.7a'
12947-macro_revision='1.3134'
12948+macro_version='2.4'
12949+macro_revision='1.3293'
12950
12951
12952
12953@@ -5176,7 +5182,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
12955 $as_echo_n "checking how to print strings... " >&6; }
12956 # Test print first, because it will be a builtin if present.
12957-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
12958+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
12959 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12960 ECHO='print -r --'
12961 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12962@@ -5862,8 +5868,8 @@ $as_echo_n "checking whether the shell u
12963 # Try some XSI features
12964 xsi_shell=no
12965 ( _lt_dummy="a/b/c"
12966- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
12967- = c,a/b,, \
12968+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
12969+ = c,a/b,b/c, \
12970 && eval 'test $(( 1 + 1 )) -eq 2 \
12971 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
12972 && xsi_shell=yes
12973@@ -5912,6 +5918,80 @@ esac
12974
12975
12976
12977+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
12978+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
12979+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
12980+ $as_echo_n "(cached) " >&6
12981+else
12982+ case $host in
12983+ *-*-mingw* )
12984+ case $build in
12985+ *-*-mingw* ) # actually msys
12986+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
12987+ ;;
12988+ *-*-cygwin* )
12989+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
12990+ ;;
12991+ * ) # otherwise, assume *nix
12992+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
12993+ ;;
12994+ esac
12995+ ;;
12996+ *-*-cygwin* )
12997+ case $build in
12998+ *-*-mingw* ) # actually msys
12999+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
13000+ ;;
13001+ *-*-cygwin* )
13002+ lt_cv_to_host_file_cmd=func_convert_file_noop
13003+ ;;
13004+ * ) # otherwise, assume *nix
13005+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
13006+ ;;
13007+ esac
13008+ ;;
13009+ * ) # unhandled hosts (and "normal" native builds)
13010+ lt_cv_to_host_file_cmd=func_convert_file_noop
13011+ ;;
13012+esac
13013+
13014+fi
13015+
13016+to_host_file_cmd=$lt_cv_to_host_file_cmd
13017+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
13018+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
13019+
13020+
13021+
13022+
13023+
13024+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
13025+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
13026+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
13027+ $as_echo_n "(cached) " >&6
13028+else
13029+ #assume ordinary cross tools, or native build.
13030+lt_cv_to_tool_file_cmd=func_convert_file_noop
13031+case $host in
13032+ *-*-mingw* )
13033+ case $build in
13034+ *-*-mingw* ) # actually msys
13035+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
13036+ ;;
13037+ esac
13038+ ;;
13039+esac
13040+
13041+fi
13042+
13043+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
13044+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
13045+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
13046+
13047+
13048+
13049+
13050+
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
13052 $as_echo_n "checking for $LD option to reload object files... " >&6; }
13053 if test "${lt_cv_ld_reload_flag+set}" = set; then :
13054@@ -5928,6 +6008,11 @@ case $reload_flag in
13055 esac
13056 reload_cmds='$LD$reload_flag -o $output$reload_objs'
13057 case $host_os in
13058+ cygwin* | mingw* | pw32* | cegcc*)
13059+ if test "$GCC" != yes; then
13060+ reload_cmds=false
13061+ fi
13062+ ;;
13063 darwin*)
13064 if test "$GCC" = yes; then
13065 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
13066@@ -6096,7 +6181,8 @@ mingw* | pw32*)
13067 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
13068 lt_cv_file_magic_cmd='func_win32_libid'
13069 else
13070- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
13071+ # Keep this pattern in sync with the one in func_win32_libid.
13072+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
13073 lt_cv_file_magic_cmd='$OBJDUMP -f'
13074 fi
13075 ;;
13076@@ -6250,6 +6336,21 @@ esac
13077 fi
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
13079 $as_echo "$lt_cv_deplibs_check_method" >&6; }
13080+
13081+file_magic_glob=
13082+want_nocaseglob=no
13083+if test "$build" = "$host"; then
13084+ case $host_os in
13085+ mingw* | pw32*)
13086+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
13087+ want_nocaseglob=yes
13088+ else
13089+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
13090+ fi
13091+ ;;
13092+ esac
13093+fi
13094+
13095 file_magic_cmd=$lt_cv_file_magic_cmd
13096 deplibs_check_method=$lt_cv_deplibs_check_method
13097 test -z "$deplibs_check_method" && deplibs_check_method=unknown
13098@@ -6265,9 +6366,162 @@ test -z "$deplibs_check_method" && depli
13099
13100
13101
13102+
13103+
13104+
13105+
13106+
13107+
13108+
13109+
13110+
13111+
13112+if test -n "$ac_tool_prefix"; then
13113+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
13114+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
13115+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13116+$as_echo_n "checking for $ac_word... " >&6; }
13117+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
13118+ $as_echo_n "(cached) " >&6
13119+else
13120+ if test -n "$DLLTOOL"; then
13121+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
13122+else
13123+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13124+for as_dir in $PATH
13125+do
13126+ IFS=$as_save_IFS
13127+ test -z "$as_dir" && as_dir=.
13128+ for ac_exec_ext in '' $ac_executable_extensions; do
13129+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13130+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
13131+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13132+ break 2
13133+ fi
13134+done
13135+ done
13136+IFS=$as_save_IFS
13137+
13138+fi
13139+fi
13140+DLLTOOL=$ac_cv_prog_DLLTOOL
13141+if test -n "$DLLTOOL"; then
13142+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
13143+$as_echo "$DLLTOOL" >&6; }
13144+else
13145+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13146+$as_echo "no" >&6; }
13147+fi
13148+
13149+
13150+fi
13151+if test -z "$ac_cv_prog_DLLTOOL"; then
13152+ ac_ct_DLLTOOL=$DLLTOOL
13153+ # Extract the first word of "dlltool", so it can be a program name with args.
13154+set dummy dlltool; ac_word=$2
13155+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13156+$as_echo_n "checking for $ac_word... " >&6; }
13157+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
13158+ $as_echo_n "(cached) " >&6
13159+else
13160+ if test -n "$ac_ct_DLLTOOL"; then
13161+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
13162+else
13163+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13164+for as_dir in $PATH
13165+do
13166+ IFS=$as_save_IFS
13167+ test -z "$as_dir" && as_dir=.
13168+ for ac_exec_ext in '' $ac_executable_extensions; do
13169+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13170+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
13171+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13172+ break 2
13173+ fi
13174+done
13175+ done
13176+IFS=$as_save_IFS
13177+
13178+fi
13179+fi
13180+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
13181+if test -n "$ac_ct_DLLTOOL"; then
13182+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
13183+$as_echo "$ac_ct_DLLTOOL" >&6; }
13184+else
13185+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13186+$as_echo "no" >&6; }
13187+fi
13188+
13189+ if test "x$ac_ct_DLLTOOL" = x; then
13190+ DLLTOOL="false"
13191+ else
13192+ case $cross_compiling:$ac_tool_warned in
13193+yes:)
13194+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13195+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13196+ac_tool_warned=yes ;;
13197+esac
13198+ DLLTOOL=$ac_ct_DLLTOOL
13199+ fi
13200+else
13201+ DLLTOOL="$ac_cv_prog_DLLTOOL"
13202+fi
13203+
13204+test -z "$DLLTOOL" && DLLTOOL=dlltool
13205+
13206+
13207+
13208+
13209+
13210+
13211+
13212+
13213+
13214+
13215+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
13216+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
13217+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
13218+ $as_echo_n "(cached) " >&6
13219+else
13220+ lt_cv_sharedlib_from_linklib_cmd='unknown'
13221+
13222+case $host_os in
13223+cygwin* | mingw* | pw32* | cegcc*)
13224+ # two different shell functions defined in ltmain.sh
13225+ # decide which to use based on capabilities of $DLLTOOL
13226+ case `$DLLTOOL --help 2>&1` in
13227+ *--identify-strict*)
13228+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
13229+ ;;
13230+ *)
13231+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
13232+ ;;
13233+ esac
13234+ ;;
13235+*)
13236+ # fallback: assume linklib IS sharedlib
13237+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
13238+ ;;
13239+esac
13240+
13241+fi
13242+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
13243+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
13244+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
13245+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
13246+
13247+
13248+
13249+
13250+
13251+
13252+
13253 if test -n "$ac_tool_prefix"; then
13254- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
13255-set dummy ${ac_tool_prefix}ar; ac_word=$2
13256+ for ac_prog in ar
13257+ do
13258+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13259+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13261 $as_echo_n "checking for $ac_word... " >&6; }
13262 if test "${ac_cv_prog_AR+set}" = set; then :
13263@@ -6283,7 +6537,7 @@ do
13264 test -z "$as_dir" && as_dir=.
13265 for ac_exec_ext in '' $ac_executable_extensions; do
13266 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13267- ac_cv_prog_AR="${ac_tool_prefix}ar"
13268+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
13269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13270 break 2
13271 fi
13272@@ -6303,11 +6557,15 @@ $as_echo "no" >&6; }
13273 fi
13274
13275
13276+ test -n "$AR" && break
13277+ done
13278 fi
13279-if test -z "$ac_cv_prog_AR"; then
13280+if test -z "$AR"; then
13281 ac_ct_AR=$AR
13282- # Extract the first word of "ar", so it can be a program name with args.
13283-set dummy ar; ac_word=$2
13284+ for ac_prog in ar
13285+do
13286+ # Extract the first word of "$ac_prog", so it can be a program name with args.
13287+set dummy $ac_prog; ac_word=$2
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13289 $as_echo_n "checking for $ac_word... " >&6; }
13290 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
13291@@ -6323,7 +6581,7 @@ do
13292 test -z "$as_dir" && as_dir=.
13293 for ac_exec_ext in '' $ac_executable_extensions; do
13294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13295- ac_cv_prog_ac_ct_AR="ar"
13296+ ac_cv_prog_ac_ct_AR="$ac_prog"
13297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13298 break 2
13299 fi
13300@@ -6342,6 +6600,10 @@ else
13301 $as_echo "no" >&6; }
13302 fi
13303
13304+
13305+ test -n "$ac_ct_AR" && break
13306+done
13307+
13308 if test "x$ac_ct_AR" = x; then
13309 AR="false"
13310 else
13311@@ -6353,16 +6615,72 @@ ac_tool_warned=yes ;;
13312 esac
13313 AR=$ac_ct_AR
13314 fi
13315-else
13316- AR="$ac_cv_prog_AR"
13317 fi
13318
13319-test -z "$AR" && AR=ar
13320-test -z "$AR_FLAGS" && AR_FLAGS=cru
13321+: ${AR=ar}
13322+: ${AR_FLAGS=cru}
13323+
13324+
13325+
13326+
13327+
13328+
13329+
13330+
13331+
13332+
13333+
13334+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
13335+$as_echo_n "checking for archiver @FILE support... " >&6; }
13336+if test "${lt_cv_ar_at_file+set}" = set; then :
13337+ $as_echo_n "(cached) " >&6
13338+else
13339+ lt_cv_ar_at_file=no
13340+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13341+/* end confdefs.h. */
13342+
13343+int
13344+main ()
13345+{
13346
13347+ ;
13348+ return 0;
13349+}
13350+_ACEOF
13351+if ac_fn_c_try_compile "$LINENO"; then :
13352+ echo conftest.$ac_objext > conftest.lst
13353+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
13354+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
13355+ (eval $lt_ar_try) 2>&5
13356+ ac_status=$?
13357+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13358+ test $ac_status = 0; }
13359+ if test "$ac_status" -eq 0; then
13360+ # Ensure the archiver fails upon bogus file names.
13361+ rm -f conftest.$ac_objext libconftest.a
13362+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
13363+ (eval $lt_ar_try) 2>&5
13364+ ac_status=$?
13365+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13366+ test $ac_status = 0; }
13367+ if test "$ac_status" -ne 0; then
13368+ lt_cv_ar_at_file=@
13369+ fi
13370+ fi
13371+ rm -f conftest.* libconftest.a
13372
13373+fi
13374+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13375
13376+fi
13377+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
13378+$as_echo "$lt_cv_ar_at_file" >&6; }
13379
13380+if test "x$lt_cv_ar_at_file" = xno; then
13381+ archiver_list_spec=
13382+else
13383+ archiver_list_spec=$lt_cv_ar_at_file
13384+fi
13385
13386
13387
13388@@ -6704,8 +7022,8 @@ esac
13389 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
13390
13391 # Transform an extracted symbol line into symbol name and symbol address
13392-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
13393-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
13394+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
13395+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
13396
13397 # Handle CRLF in mingw tool chain
13398 opt_cr=
13399@@ -6741,6 +7059,7 @@ for ac_symprfx in "" "_"; do
13400 else
13401 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
13402 fi
13403+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
13404
13405 # Check to see that the pipe works correctly.
13406 pipe_works=no
13407@@ -6782,6 +7101,18 @@ _LT_EOF
13408 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
13409 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
13410 cat <<_LT_EOF > conftest.$ac_ext
13411+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
13412+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
13413+/* DATA imports from DLLs on WIN32 con't be const, because runtime
13414+ relocations are performed -- see ld's documentation on pseudo-relocs. */
13415+# define LT_DLSYM_CONST
13416+#elif defined(__osf__)
13417+/* This system does not cope well with relocations in const data. */
13418+# define LT_DLSYM_CONST
13419+#else
13420+# define LT_DLSYM_CONST const
13421+#endif
13422+
13423 #ifdef __cplusplus
13424 extern "C" {
13425 #endif
13426@@ -6793,7 +7124,7 @@ _LT_EOF
13427 cat <<_LT_EOF >> conftest.$ac_ext
13428
13429 /* The mapping between symbol names and symbols. */
13430-const struct {
13431+LT_DLSYM_CONST struct {
13432 const char *name;
13433 void *address;
13434 }
13435@@ -6819,8 +7150,8 @@ static const void *lt_preloaded_setup()
13436 _LT_EOF
13437 # Now try linking the two files.
13438 mv conftest.$ac_objext conftstm.$ac_objext
13439- lt_save_LIBS="$LIBS"
13440- lt_save_CFLAGS="$CFLAGS"
13441+ lt_globsym_save_LIBS=$LIBS
13442+ lt_globsym_save_CFLAGS=$CFLAGS
13443 LIBS="conftstm.$ac_objext"
13444 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
13445 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13446@@ -6830,8 +7161,8 @@ _LT_EOF
13447 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
13448 pipe_works=yes
13449 fi
13450- LIBS="$lt_save_LIBS"
13451- CFLAGS="$lt_save_CFLAGS"
13452+ LIBS=$lt_globsym_save_LIBS
13453+ CFLAGS=$lt_globsym_save_CFLAGS
13454 else
13455 echo "cannot find nm_test_func in $nlist" >&5
13456 fi
13457@@ -6868,6 +7199,19 @@ else
13458 $as_echo "ok" >&6; }
13459 fi
13460
13461+# Response file support.
13462+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
13463+ nm_file_list_spec='@'
13464+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
13465+ nm_file_list_spec='@'
13466+fi
13467+
13468+
13469+
13470+
13471+
13472+
13473+
13474
13475
13476
13477@@ -6888,6 +7232,42 @@ fi
13478
13479
13480
13481+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
13482+$as_echo_n "checking for sysroot... " >&6; }
13483+
13484+# Check whether --with-libtool-sysroot was given.
13485+if test "${with_libtool_sysroot+set}" = set; then :
13486+ withval=$with_libtool_sysroot;
13487+else
13488+ with_libtool_sysroot=no
13489+fi
13490+
13491+
13492+lt_sysroot=
13493+case ${with_libtool_sysroot} in #(
13494+ yes)
13495+ if test "$GCC" = yes; then
13496+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
13497+ fi
13498+ ;; #(
13499+ /*)
13500+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
13501+ ;; #(
13502+ no|'')
13503+ ;; #(
13504+ *)
13505+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
13506+$as_echo "${with_libtool_sysroot}" >&6; }
13507+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
13508+ ;;
13509+esac
13510+
13511+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
13512+$as_echo "${lt_sysroot:-no}" >&6; }
13513+
13514+
13515+
13516+
13517
13518 # Check whether --enable-libtool-lock was given.
13519 if test "${enable_libtool_lock+set}" = set; then :
13520@@ -7082,6 +7462,123 @@ esac
13521
13522 need_locks="$enable_libtool_lock"
13523
13524+if test -n "$ac_tool_prefix"; then
13525+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
13526+set dummy ${ac_tool_prefix}mt; ac_word=$2
13527+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13528+$as_echo_n "checking for $ac_word... " >&6; }
13529+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
13530+ $as_echo_n "(cached) " >&6
13531+else
13532+ if test -n "$MANIFEST_TOOL"; then
13533+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
13534+else
13535+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13536+for as_dir in $PATH
13537+do
13538+ IFS=$as_save_IFS
13539+ test -z "$as_dir" && as_dir=.
13540+ for ac_exec_ext in '' $ac_executable_extensions; do
13541+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13542+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
13543+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13544+ break 2
13545+ fi
13546+done
13547+ done
13548+IFS=$as_save_IFS
13549+
13550+fi
13551+fi
13552+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
13553+if test -n "$MANIFEST_TOOL"; then
13554+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
13555+$as_echo "$MANIFEST_TOOL" >&6; }
13556+else
13557+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558+$as_echo "no" >&6; }
13559+fi
13560+
13561+
13562+fi
13563+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
13564+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
13565+ # Extract the first word of "mt", so it can be a program name with args.
13566+set dummy mt; ac_word=$2
13567+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13568+$as_echo_n "checking for $ac_word... " >&6; }
13569+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
13570+ $as_echo_n "(cached) " >&6
13571+else
13572+ if test -n "$ac_ct_MANIFEST_TOOL"; then
13573+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
13574+else
13575+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13576+for as_dir in $PATH
13577+do
13578+ IFS=$as_save_IFS
13579+ test -z "$as_dir" && as_dir=.
13580+ for ac_exec_ext in '' $ac_executable_extensions; do
13581+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13582+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
13583+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13584+ break 2
13585+ fi
13586+done
13587+ done
13588+IFS=$as_save_IFS
13589+
13590+fi
13591+fi
13592+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
13593+if test -n "$ac_ct_MANIFEST_TOOL"; then
13594+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
13595+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
13596+else
13597+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13598+$as_echo "no" >&6; }
13599+fi
13600+
13601+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
13602+ MANIFEST_TOOL=":"
13603+ else
13604+ case $cross_compiling:$ac_tool_warned in
13605+yes:)
13606+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13607+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13608+ac_tool_warned=yes ;;
13609+esac
13610+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
13611+ fi
13612+else
13613+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
13614+fi
13615+
13616+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
13617+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
13618+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
13619+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
13620+ $as_echo_n "(cached) " >&6
13621+else
13622+ lt_cv_path_mainfest_tool=no
13623+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
13624+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
13625+ cat conftest.err >&5
13626+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
13627+ lt_cv_path_mainfest_tool=yes
13628+ fi
13629+ rm -f conftest*
13630+fi
13631+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
13632+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
13633+if test "x$lt_cv_path_mainfest_tool" != xyes; then
13634+ MANIFEST_TOOL=:
13635+fi
13636+
13637+
13638+
13639+
13640+
13641
13642 case $host_os in
13643 rhapsody* | darwin*)
13644@@ -7645,6 +8142,8 @@ _LT_EOF
13645 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
13646 echo "$AR cru libconftest.a conftest.o" >&5
13647 $AR cru libconftest.a conftest.o 2>&5
13648+ echo "$RANLIB libconftest.a" >&5
13649+ $RANLIB libconftest.a 2>&5
13650 cat > conftest.c << _LT_EOF
13651 int main() { return 0;}
13652 _LT_EOF
13653@@ -7840,7 +8339,8 @@ fi
13654 LIBTOOL_DEPS="$ltmain"
13655
13656 # Always use our own libtool.
13657-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
13658+LIBTOOL='$(SHELL) $(top_builddir)'
13659+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
13660
13661
13662
13663@@ -7929,7 +8429,7 @@ aix3*)
13664 esac
13665
13666 # Global variables:
13667-ofile=libtool
13668+ofile=${host_alias}-libtool
13669 can_build_shared=yes
13670
13671 # All known linkers require a `.a' archive for static linking (except MSVC,
13672@@ -8227,8 +8727,6 @@ fi
13673 lt_prog_compiler_pic=
13674 lt_prog_compiler_static=
13675
13676-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13677-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
13678
13679 if test "$GCC" = yes; then
13680 lt_prog_compiler_wl='-Wl,'
13681@@ -8393,6 +8891,12 @@ $as_echo_n "checking for $compiler optio
13682 lt_prog_compiler_pic='--shared'
13683 lt_prog_compiler_static='--static'
13684 ;;
13685+ nagfor*)
13686+ # NAG Fortran compiler
13687+ lt_prog_compiler_wl='-Wl,-Wl,,'
13688+ lt_prog_compiler_pic='-PIC'
13689+ lt_prog_compiler_static='-Bstatic'
13690+ ;;
13691 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
13692 # Portland Group compilers (*not* the Pentium gcc compiler,
13693 # which looks to be a dead project)
13694@@ -8455,7 +8959,7 @@ $as_echo_n "checking for $compiler optio
13695 lt_prog_compiler_pic='-KPIC'
13696 lt_prog_compiler_static='-Bstatic'
13697 case $cc_basename in
13698- f77* | f90* | f95*)
13699+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
13700 lt_prog_compiler_wl='-Qoption ld ';;
13701 *)
13702 lt_prog_compiler_wl='-Wl,';;
13703@@ -8512,13 +9016,17 @@ case $host_os in
13704 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
13705 ;;
13706 esac
13707-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
13708-$as_echo "$lt_prog_compiler_pic" >&6; }
13709-
13710-
13711-
13712-
13713
13714+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13715+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
13716+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
13717+ $as_echo_n "(cached) " >&6
13718+else
13719+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
13720+fi
13721+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
13722+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
13723+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
13724
13725 #
13726 # Check to make sure the PIC flag actually works.
13727@@ -8579,6 +9087,11 @@ fi
13728
13729
13730
13731+
13732+
13733+
13734+
13735+
13736 #
13737 # Check to make sure the static flag actually works.
13738 #
13739@@ -8929,7 +9442,8 @@ _LT_EOF
13740 allow_undefined_flag=unsupported
13741 always_export_symbols=no
13742 enable_shared_with_static_runtimes=yes
13743- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13744+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
13745+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
13746
13747 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
13748 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13749@@ -8977,7 +9491,7 @@ _LT_EOF
13750 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
13751 && test "$tmp_diet" = no
13752 then
13753- tmp_addflag=
13754+ tmp_addflag=' $pic_flag'
13755 tmp_sharedflag='-shared'
13756 case $cc_basename,$host_cpu in
13757 pgcc*) # Portland Group C compiler
13758@@ -9028,12 +9542,12 @@ _LT_EOF
13759 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
13760 hardcode_libdir_flag_spec=
13761 hardcode_libdir_flag_spec_ld='-rpath $libdir'
13762- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
13763+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
13764 if test "x$supports_anon_versioning" = xyes; then
13765 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
13766 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13767 echo "local: *; };" >> $output_objdir/$libname.ver~
13768- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13769+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
13770 fi
13771 ;;
13772 esac
13773@@ -9047,8 +9561,8 @@ _LT_EOF
13774 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
13775 wlarc=
13776 else
13777- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13778- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13779+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13780+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13781 fi
13782 ;;
13783
13784@@ -9066,8 +9580,8 @@ _LT_EOF
13785
13786 _LT_EOF
13787 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13788- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13789- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13790+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13791+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13792 else
13793 ld_shlibs=no
13794 fi
13795@@ -9113,8 +9627,8 @@ _LT_EOF
13796
13797 *)
13798 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13799- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13800- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13801+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13802+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13803 else
13804 ld_shlibs=no
13805 fi
13806@@ -9244,7 +9758,13 @@ _LT_EOF
13807 allow_undefined_flag='-berok'
13808 # Determine the default libpath from the value encoded in an
13809 # empty executable.
13810- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13811+ if test "${lt_cv_aix_libpath+set}" = set; then
13812+ aix_libpath=$lt_cv_aix_libpath
13813+else
13814+ if test "${lt_cv_aix_libpath_+set}" = set; then :
13815+ $as_echo_n "(cached) " >&6
13816+else
13817+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13818 /* end confdefs.h. */
13819
13820 int
13821@@ -9257,22 +9777,29 @@ main ()
13822 _ACEOF
13823 if ac_fn_c_try_link "$LINENO"; then :
13824
13825-lt_aix_libpath_sed='
13826- /Import File Strings/,/^$/ {
13827- /^0/ {
13828- s/^0 *\(.*\)$/\1/
13829- p
13830- }
13831- }'
13832-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13833-# Check for a 64-bit object if we didn't find anything.
13834-if test -z "$aix_libpath"; then
13835- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13836-fi
13837+ lt_aix_libpath_sed='
13838+ /Import File Strings/,/^$/ {
13839+ /^0/ {
13840+ s/^0 *\([^ ]*\) *$/\1/
13841+ p
13842+ }
13843+ }'
13844+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13845+ # Check for a 64-bit object if we didn't find anything.
13846+ if test -z "$lt_cv_aix_libpath_"; then
13847+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13848+ fi
13849 fi
13850 rm -f core conftest.err conftest.$ac_objext \
13851 conftest$ac_exeext conftest.$ac_ext
13852-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
13853+ if test -z "$lt_cv_aix_libpath_"; then
13854+ lt_cv_aix_libpath_="/usr/lib:/lib"
13855+ fi
13856+
13857+fi
13858+
13859+ aix_libpath=$lt_cv_aix_libpath_
13860+fi
13861
13862 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
13863 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
13864@@ -9284,7 +9811,13 @@ if test -z "$aix_libpath"; then aix_libp
13865 else
13866 # Determine the default libpath from the value encoded in an
13867 # empty executable.
13868- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13869+ if test "${lt_cv_aix_libpath+set}" = set; then
13870+ aix_libpath=$lt_cv_aix_libpath
13871+else
13872+ if test "${lt_cv_aix_libpath_+set}" = set; then :
13873+ $as_echo_n "(cached) " >&6
13874+else
13875+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13876 /* end confdefs.h. */
13877
13878 int
13879@@ -9297,22 +9830,29 @@ main ()
13880 _ACEOF
13881 if ac_fn_c_try_link "$LINENO"; then :
13882
13883-lt_aix_libpath_sed='
13884- /Import File Strings/,/^$/ {
13885- /^0/ {
13886- s/^0 *\(.*\)$/\1/
13887- p
13888- }
13889- }'
13890-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13891-# Check for a 64-bit object if we didn't find anything.
13892-if test -z "$aix_libpath"; then
13893- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13894-fi
13895+ lt_aix_libpath_sed='
13896+ /Import File Strings/,/^$/ {
13897+ /^0/ {
13898+ s/^0 *\([^ ]*\) *$/\1/
13899+ p
13900+ }
13901+ }'
13902+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13903+ # Check for a 64-bit object if we didn't find anything.
13904+ if test -z "$lt_cv_aix_libpath_"; then
13905+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13906+ fi
13907 fi
13908 rm -f core conftest.err conftest.$ac_objext \
13909 conftest$ac_exeext conftest.$ac_ext
13910-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
13911+ if test -z "$lt_cv_aix_libpath_"; then
13912+ lt_cv_aix_libpath_="/usr/lib:/lib"
13913+ fi
13914+
13915+fi
13916+
13917+ aix_libpath=$lt_cv_aix_libpath_
13918+fi
13919
13920 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
13921 # Warning - without using the other run time loading flags,
13922@@ -9357,20 +9897,63 @@ if test -z "$aix_libpath"; then aix_libp
13923 # Microsoft Visual C++.
13924 # hardcode_libdir_flag_spec is actually meaningless, as there is
13925 # no search path for DLLs.
13926- hardcode_libdir_flag_spec=' '
13927- allow_undefined_flag=unsupported
13928- # Tell ltmain to make .lib files, not .a files.
13929- libext=lib
13930- # Tell ltmain to make .dll files, not .so files.
13931- shrext_cmds=".dll"
13932- # FIXME: Setting linknames here is a bad hack.
13933- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13934- # The linker will automatically build a .lib file if we build a DLL.
13935- old_archive_from_new_cmds='true'
13936- # FIXME: Should let the user specify the lib program.
13937- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13938- fix_srcfile_path='`cygpath -w "$srcfile"`'
13939- enable_shared_with_static_runtimes=yes
13940+ case $cc_basename in
13941+ cl*)
13942+ # Native MSVC
13943+ hardcode_libdir_flag_spec=' '
13944+ allow_undefined_flag=unsupported
13945+ always_export_symbols=yes
13946+ file_list_spec='@'
13947+ # Tell ltmain to make .lib files, not .a files.
13948+ libext=lib
13949+ # Tell ltmain to make .dll files, not .so files.
13950+ shrext_cmds=".dll"
13951+ # FIXME: Setting linknames here is a bad hack.
13952+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
13953+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
13954+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
13955+ else
13956+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
13957+ fi~
13958+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13959+ linknames='
13960+ # The linker will not automatically build a static lib if we build a DLL.
13961+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
13962+ enable_shared_with_static_runtimes=yes
13963+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
13964+ # Don't use ranlib
13965+ old_postinstall_cmds='chmod 644 $oldlib'
13966+ postlink_cmds='lt_outputfile="@OUTPUT@"~
13967+ lt_tool_outputfile="@TOOL_OUTPUT@"~
13968+ case $lt_outputfile in
13969+ *.exe|*.EXE) ;;
13970+ *)
13971+ lt_outputfile="$lt_outputfile.exe"
13972+ lt_tool_outputfile="$lt_tool_outputfile.exe"
13973+ ;;
13974+ esac~
13975+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
13976+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13977+ $RM "$lt_outputfile.manifest";
13978+ fi'
13979+ ;;
13980+ *)
13981+ # Assume MSVC wrapper
13982+ hardcode_libdir_flag_spec=' '
13983+ allow_undefined_flag=unsupported
13984+ # Tell ltmain to make .lib files, not .a files.
13985+ libext=lib
13986+ # Tell ltmain to make .dll files, not .so files.
13987+ shrext_cmds=".dll"
13988+ # FIXME: Setting linknames here is a bad hack.
13989+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
13990+ # The linker will automatically build a .lib file if we build a DLL.
13991+ old_archive_from_new_cmds='true'
13992+ # FIXME: Should let the user specify the lib program.
13993+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
13994+ enable_shared_with_static_runtimes=yes
13995+ ;;
13996+ esac
13997 ;;
13998
13999 darwin* | rhapsody*)
14000@@ -9435,7 +10018,7 @@ if test -z "$aix_libpath"; then aix_libp
14001
14002 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
14003 freebsd* | dragonfly*)
14004- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
14005+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14006 hardcode_libdir_flag_spec='-R$libdir'
14007 hardcode_direct=yes
14008 hardcode_shlibpath_var=no
14009@@ -9443,7 +10026,7 @@ if test -z "$aix_libpath"; then aix_libp
14010
14011 hpux9*)
14012 if test "$GCC" = yes; then
14013- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14014+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14015 else
14016 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14017 fi
14018@@ -9459,7 +10042,7 @@ if test -z "$aix_libpath"; then aix_libp
14019
14020 hpux10*)
14021 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
14022- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14023+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14024 else
14025 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14026 fi
14027@@ -9483,10 +10066,10 @@ if test -z "$aix_libpath"; then aix_libp
14028 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14029 ;;
14030 ia64*)
14031- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14032+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14033 ;;
14034 *)
14035- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14036+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14037 ;;
14038 esac
14039 else
14040@@ -9565,23 +10148,36 @@ fi
14041
14042 irix5* | irix6* | nonstopux*)
14043 if test "$GCC" = yes; then
14044- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14045+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14046 # Try to use the -exported_symbol ld option, if it does not
14047 # work, assume that -exports_file does not work either and
14048 # implicitly export all symbols.
14049- save_LDFLAGS="$LDFLAGS"
14050- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
14051- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14052+ # This should be the same for all languages, so no per-tag cache variable.
14053+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
14054+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
14055+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
14056+ $as_echo_n "(cached) " >&6
14057+else
14058+ save_LDFLAGS="$LDFLAGS"
14059+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
14060+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14061 /* end confdefs.h. */
14062-int foo(void) {}
14063+int foo (void) { return 0; }
14064 _ACEOF
14065 if ac_fn_c_try_link "$LINENO"; then :
14066- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
14067-
14068+ lt_cv_irix_exported_symbol=yes
14069+else
14070+ lt_cv_irix_exported_symbol=no
14071 fi
14072 rm -f core conftest.err conftest.$ac_objext \
14073 conftest$ac_exeext conftest.$ac_ext
14074- LDFLAGS="$save_LDFLAGS"
14075+ LDFLAGS="$save_LDFLAGS"
14076+fi
14077+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
14078+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
14079+ if test "$lt_cv_irix_exported_symbol" = yes; then
14080+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
14081+ fi
14082 else
14083 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
14084 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
14085@@ -9666,7 +10262,7 @@ rm -f core conftest.err conftest.$ac_obj
14086 osf4* | osf5*) # as osf3* with the addition of -msym flag
14087 if test "$GCC" = yes; then
14088 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
14089- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14090+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14091 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
14092 else
14093 allow_undefined_flag=' -expect_unresolved \*'
14094@@ -9685,9 +10281,9 @@ rm -f core conftest.err conftest.$ac_obj
14095 no_undefined_flag=' -z defs'
14096 if test "$GCC" = yes; then
14097 wlarc='${wl}'
14098- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14099+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14100 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14101- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14102+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
14103 else
14104 case `$CC -V 2>&1` in
14105 *"Compilers 5.0"*)
14106@@ -10263,8 +10859,9 @@ cygwin* | mingw* | pw32* | cegcc*)
14107 need_version=no
14108 need_lib_prefix=no
14109
14110- case $GCC,$host_os in
14111- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
14112+ case $GCC,$cc_basename in
14113+ yes,*)
14114+ # gcc
14115 library_names_spec='$libname.dll.a'
14116 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14117 postinstall_cmds='base_file=`basename \${file}`~
14118@@ -10297,13 +10894,71 @@ cygwin* | mingw* | pw32* | cegcc*)
14119 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14120 ;;
14121 esac
14122+ dynamic_linker='Win32 ld.exe'
14123+ ;;
14124+
14125+ *,cl*)
14126+ # Native MSVC
14127+ libname_spec='$name'
14128+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14129+ library_names_spec='${libname}.dll.lib'
14130+
14131+ case $build_os in
14132+ mingw*)
14133+ sys_lib_search_path_spec=
14134+ lt_save_ifs=$IFS
14135+ IFS=';'
14136+ for lt_path in $LIB
14137+ do
14138+ IFS=$lt_save_ifs
14139+ # Let DOS variable expansion print the short 8.3 style file name.
14140+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
14141+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
14142+ done
14143+ IFS=$lt_save_ifs
14144+ # Convert to MSYS style.
14145+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
14146+ ;;
14147+ cygwin*)
14148+ # Convert to unix form, then to dos form, then back to unix form
14149+ # but this time dos style (no spaces!) so that the unix form looks
14150+ # like /cygdrive/c/PROGRA~1:/cygdr...
14151+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
14152+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
14153+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14154+ ;;
14155+ *)
14156+ sys_lib_search_path_spec="$LIB"
14157+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
14158+ # It is most probably a Windows format PATH.
14159+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14160+ else
14161+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14162+ fi
14163+ # FIXME: find the short name or the path components, as spaces are
14164+ # common. (e.g. "Program Files" -> "PROGRA~1")
14165+ ;;
14166+ esac
14167+
14168+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
14169+ postinstall_cmds='base_file=`basename \${file}`~
14170+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
14171+ dldir=$destdir/`dirname \$dlpath`~
14172+ test -d \$dldir || mkdir -p \$dldir~
14173+ $install_prog $dir/$dlname \$dldir/$dlname'
14174+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14175+ dlpath=$dir/\$dldll~
14176+ $RM \$dlpath'
14177+ shlibpath_overrides_runpath=yes
14178+ dynamic_linker='Win32 link.exe'
14179 ;;
14180
14181 *)
14182+ # Assume MSVC wrapper
14183 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
14184+ dynamic_linker='Win32 ld.exe'
14185 ;;
14186 esac
14187- dynamic_linker='Win32 ld.exe'
14188 # FIXME: first we should search . and the directory the executable is in
14189 shlibpath_var=PATH
14190 ;;
14191@@ -10399,7 +11054,7 @@ haiku*)
14192 soname_spec='${libname}${release}${shared_ext}$major'
14193 shlibpath_var=LIBRARY_PATH
14194 shlibpath_overrides_runpath=yes
14195- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
14196+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
14197 hardcode_into_libs=yes
14198 ;;
14199
14200@@ -11195,7 +11850,7 @@ else
14201 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14202 lt_status=$lt_dlunknown
14203 cat > conftest.$ac_ext <<_LT_EOF
14204-#line 11198 "configure"
14205+#line $LINENO "configure"
14206 #include "confdefs.h"
14207
14208 #if HAVE_DLFCN_H
14209@@ -11239,10 +11894,10 @@ else
14210 /* When -fvisbility=hidden is used, assume the code has been annotated
14211 correspondingly for the symbols needed. */
14212 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14213-void fnord () __attribute__((visibility("default")));
14214+int fnord () __attribute__((visibility("default")));
14215 #endif
14216
14217-void fnord () { int i=42; }
14218+int fnord () { return 42; }
14219 int main ()
14220 {
14221 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14222@@ -11301,7 +11956,7 @@ else
14223 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14224 lt_status=$lt_dlunknown
14225 cat > conftest.$ac_ext <<_LT_EOF
14226-#line 11304 "configure"
14227+#line $LINENO "configure"
14228 #include "confdefs.h"
14229
14230 #if HAVE_DLFCN_H
14231@@ -11345,10 +12000,10 @@ else
14232 /* When -fvisbility=hidden is used, assume the code has been annotated
14233 correspondingly for the symbols needed. */
14234 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14235-void fnord () __attribute__((visibility("default")));
14236+int fnord () __attribute__((visibility("default")));
14237 #endif
14238
14239-void fnord () { int i=42; }
14240+int fnord () { return 42; }
14241 int main ()
14242 {
14243 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14244@@ -14941,13 +15596,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
14245 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
14246 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
14247 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
14248+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
14249+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
14250 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
14251 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
14252 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
14253 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
14254 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
14255+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
14256+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
14257+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
14258+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
14259 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
14260 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
14261+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
14262 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
14263 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
14264 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
14265@@ -14962,14 +15624,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
14266 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
14267 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
14268 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
14269+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
14270+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
14271 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
14272 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
14273 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
14274-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
14275 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
14276+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
14277 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
14278 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
14279 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
14280+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
14281 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
14282 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
14283 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
14284@@ -15002,12 +15667,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
14285 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
14286 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
14287 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
14288-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
14289 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
14290 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
14291 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
14292 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
14293 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
14294+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
14295 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
14296 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
14297 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
14298@@ -15062,8 +15727,13 @@ reload_flag \
14299 OBJDUMP \
14300 deplibs_check_method \
14301 file_magic_cmd \
14302+file_magic_glob \
14303+want_nocaseglob \
14304+DLLTOOL \
14305+sharedlib_from_linklib_cmd \
14306 AR \
14307 AR_FLAGS \
14308+archiver_list_spec \
14309 STRIP \
14310 RANLIB \
14311 CC \
14312@@ -15073,12 +15743,14 @@ lt_cv_sys_global_symbol_pipe \
14313 lt_cv_sys_global_symbol_to_cdecl \
14314 lt_cv_sys_global_symbol_to_c_name_address \
14315 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
14316+nm_file_list_spec \
14317 lt_prog_compiler_no_builtin_flag \
14318-lt_prog_compiler_wl \
14319 lt_prog_compiler_pic \
14320+lt_prog_compiler_wl \
14321 lt_prog_compiler_static \
14322 lt_cv_prog_compiler_c_o \
14323 need_locks \
14324+MANIFEST_TOOL \
14325 DSYMUTIL \
14326 NMEDIT \
14327 LIPO \
14328@@ -15094,7 +15766,6 @@ no_undefined_flag \
14329 hardcode_libdir_flag_spec \
14330 hardcode_libdir_flag_spec_ld \
14331 hardcode_libdir_separator \
14332-fix_srcfile_path \
14333 exclude_expsyms \
14334 include_expsyms \
14335 file_list_spec \
14336@@ -15130,6 +15801,7 @@ module_cmds \
14337 module_expsym_cmds \
14338 export_symbols_cmds \
14339 prelink_cmds \
14340+postlink_cmds \
14341 postinstall_cmds \
14342 postuninstall_cmds \
14343 finish_cmds \
14344@@ -15894,7 +16566,8 @@ $as_echo X"$file" |
14345 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
14346 #
14347 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14348-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
14349+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14350+# Inc.
14351 # Written by Gordon Matzigkeit, 1996
14352 #
14353 # This file is part of GNU Libtool.
14354@@ -15997,19 +16670,42 @@ SP2NL=$lt_lt_SP2NL
14355 # turn newlines into spaces.
14356 NL2SP=$lt_lt_NL2SP
14357
14358+# convert \$build file names to \$host format.
14359+to_host_file_cmd=$lt_cv_to_host_file_cmd
14360+
14361+# convert \$build files to toolchain format.
14362+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
14363+
14364 # An object symbol dumper.
14365 OBJDUMP=$lt_OBJDUMP
14366
14367 # Method to check whether dependent libraries are shared objects.
14368 deplibs_check_method=$lt_deplibs_check_method
14369
14370-# Command to use when deplibs_check_method == "file_magic".
14371+# Command to use when deplibs_check_method = "file_magic".
14372 file_magic_cmd=$lt_file_magic_cmd
14373
14374+# How to find potential files when deplibs_check_method = "file_magic".
14375+file_magic_glob=$lt_file_magic_glob
14376+
14377+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
14378+want_nocaseglob=$lt_want_nocaseglob
14379+
14380+# DLL creation program.
14381+DLLTOOL=$lt_DLLTOOL
14382+
14383+# Command to associate shared and link libraries.
14384+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
14385+
14386 # The archiver.
14387 AR=$lt_AR
14388+
14389+# Flags to create an archive.
14390 AR_FLAGS=$lt_AR_FLAGS
14391
14392+# How to feed a file listing to the archiver.
14393+archiver_list_spec=$lt_archiver_list_spec
14394+
14395 # A symbol stripping program.
14396 STRIP=$lt_STRIP
14397
14398@@ -16039,6 +16735,12 @@ global_symbol_to_c_name_address=$lt_lt_c
14399 # Transform the output of nm in a C name address pair when lib prefix is needed.
14400 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
14401
14402+# Specify filename containing input files for \$NM.
14403+nm_file_list_spec=$lt_nm_file_list_spec
14404+
14405+# The root where to search for dependent libraries,and in which our libraries should be installed.
14406+lt_sysroot=$lt_sysroot
14407+
14408 # The name of the directory that contains temporary libtool files.
14409 objdir=$objdir
14410
14411@@ -16048,6 +16750,9 @@ MAGIC_CMD=$MAGIC_CMD
14412 # Must we lock files when doing compilation?
14413 need_locks=$lt_need_locks
14414
14415+# Manifest tool.
14416+MANIFEST_TOOL=$lt_MANIFEST_TOOL
14417+
14418 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
14419 DSYMUTIL=$lt_DSYMUTIL
14420
14421@@ -16162,12 +16867,12 @@ with_gcc=$GCC
14422 # Compiler flag to turn off builtin functions.
14423 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
14424
14425-# How to pass a linker flag through the compiler.
14426-wl=$lt_lt_prog_compiler_wl
14427-
14428 # Additional compiler flags for building library objects.
14429 pic_flag=$lt_lt_prog_compiler_pic
14430
14431+# How to pass a linker flag through the compiler.
14432+wl=$lt_lt_prog_compiler_wl
14433+
14434 # Compiler flag to prevent dynamic linking.
14435 link_static_flag=$lt_lt_prog_compiler_static
14436
14437@@ -16254,9 +16959,6 @@ inherit_rpath=$inherit_rpath
14438 # Whether libtool must link a program against all its dependency libraries.
14439 link_all_deplibs=$link_all_deplibs
14440
14441-# Fix the shell variable \$srcfile for the compiler.
14442-fix_srcfile_path=$lt_fix_srcfile_path
14443-
14444 # Set to "yes" if exported symbols are required.
14445 always_export_symbols=$always_export_symbols
14446
14447@@ -16272,6 +16974,9 @@ include_expsyms=$lt_include_expsyms
14448 # Commands necessary for linking programs (against libraries) with templates.
14449 prelink_cmds=$lt_prelink_cmds
14450
14451+# Commands necessary for finishing linking programs.
14452+postlink_cmds=$lt_postlink_cmds
14453+
14454 # Specify filename containing input files.
14455 file_list_spec=$lt_file_list_spec
14456
14457@@ -16304,210 +17009,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
14458 # if finds mixed CR/LF and LF-only lines. Since sed operates in
14459 # text mode, it properly converts lines to CR/LF. This bash problem
14460 # is reportedly fixed, but why not run on old versions too?
14461- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
14462- || (rm -f "$cfgfile"; exit 1)
14463-
14464- case $xsi_shell in
14465- yes)
14466- cat << \_LT_EOF >> "$cfgfile"
14467-
14468-# func_dirname file append nondir_replacement
14469-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
14470-# otherwise set result to NONDIR_REPLACEMENT.
14471-func_dirname ()
14472-{
14473- case ${1} in
14474- */*) func_dirname_result="${1%/*}${2}" ;;
14475- * ) func_dirname_result="${3}" ;;
14476- esac
14477-}
14478-
14479-# func_basename file
14480-func_basename ()
14481-{
14482- func_basename_result="${1##*/}"
14483-}
14484-
14485-# func_dirname_and_basename file append nondir_replacement
14486-# perform func_basename and func_dirname in a single function
14487-# call:
14488-# dirname: Compute the dirname of FILE. If nonempty,
14489-# add APPEND to the result, otherwise set result
14490-# to NONDIR_REPLACEMENT.
14491-# value returned in "$func_dirname_result"
14492-# basename: Compute filename of FILE.
14493-# value retuned in "$func_basename_result"
14494-# Implementation must be kept synchronized with func_dirname
14495-# and func_basename. For efficiency, we do not delegate to
14496-# those functions but instead duplicate the functionality here.
14497-func_dirname_and_basename ()
14498-{
14499- case ${1} in
14500- */*) func_dirname_result="${1%/*}${2}" ;;
14501- * ) func_dirname_result="${3}" ;;
14502- esac
14503- func_basename_result="${1##*/}"
14504-}
14505-
14506-# func_stripname prefix suffix name
14507-# strip PREFIX and SUFFIX off of NAME.
14508-# PREFIX and SUFFIX must not contain globbing or regex special
14509-# characters, hashes, percent signs, but SUFFIX may contain a leading
14510-# dot (in which case that matches only a dot).
14511-func_stripname ()
14512-{
14513- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
14514- # positional parameters, so assign one to ordinary parameter first.
14515- func_stripname_result=${3}
14516- func_stripname_result=${func_stripname_result#"${1}"}
14517- func_stripname_result=${func_stripname_result%"${2}"}
14518-}
14519-
14520-# func_opt_split
14521-func_opt_split ()
14522-{
14523- func_opt_split_opt=${1%%=*}
14524- func_opt_split_arg=${1#*=}
14525-}
14526-
14527-# func_lo2o object
14528-func_lo2o ()
14529-{
14530- case ${1} in
14531- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
14532- *) func_lo2o_result=${1} ;;
14533- esac
14534-}
14535-
14536-# func_xform libobj-or-source
14537-func_xform ()
14538-{
14539- func_xform_result=${1%.*}.lo
14540-}
14541-
14542-# func_arith arithmetic-term...
14543-func_arith ()
14544-{
14545- func_arith_result=$(( $* ))
14546-}
14547-
14548-# func_len string
14549-# STRING may not start with a hyphen.
14550-func_len ()
14551-{
14552- func_len_result=${#1}
14553-}
14554-
14555-_LT_EOF
14556- ;;
14557- *) # Bourne compatible functions.
14558- cat << \_LT_EOF >> "$cfgfile"
14559-
14560-# func_dirname file append nondir_replacement
14561-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
14562-# otherwise set result to NONDIR_REPLACEMENT.
14563-func_dirname ()
14564-{
14565- # Extract subdirectory from the argument.
14566- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
14567- if test "X$func_dirname_result" = "X${1}"; then
14568- func_dirname_result="${3}"
14569- else
14570- func_dirname_result="$func_dirname_result${2}"
14571- fi
14572-}
14573-
14574-# func_basename file
14575-func_basename ()
14576-{
14577- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
14578-}
14579-
14580-
14581-# func_stripname prefix suffix name
14582-# strip PREFIX and SUFFIX off of NAME.
14583-# PREFIX and SUFFIX must not contain globbing or regex special
14584-# characters, hashes, percent signs, but SUFFIX may contain a leading
14585-# dot (in which case that matches only a dot).
14586-# func_strip_suffix prefix name
14587-func_stripname ()
14588-{
14589- case ${2} in
14590- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
14591- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
14592- esac
14593-}
14594-
14595-# sed scripts:
14596-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
14597-my_sed_long_arg='1s/^-[^=]*=//'
14598-
14599-# func_opt_split
14600-func_opt_split ()
14601-{
14602- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
14603- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
14604-}
14605-
14606-# func_lo2o object
14607-func_lo2o ()
14608-{
14609- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
14610-}
14611-
14612-# func_xform libobj-or-source
14613-func_xform ()
14614-{
14615- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
14616-}
14617-
14618-# func_arith arithmetic-term...
14619-func_arith ()
14620-{
14621- func_arith_result=`expr "$@"`
14622-}
14623-
14624-# func_len string
14625-# STRING may not start with a hyphen.
14626-func_len ()
14627-{
14628- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
14629-}
14630-
14631-_LT_EOF
14632-esac
14633-
14634-case $lt_shell_append in
14635- yes)
14636- cat << \_LT_EOF >> "$cfgfile"
14637-
14638-# func_append var value
14639-# Append VALUE to the end of shell variable VAR.
14640-func_append ()
14641-{
14642- eval "$1+=\$2"
14643-}
14644-_LT_EOF
14645- ;;
14646- *)
14647- cat << \_LT_EOF >> "$cfgfile"
14648-
14649-# func_append var value
14650-# Append VALUE to the end of shell variable VAR.
14651-func_append ()
14652-{
14653- eval "$1=\$$1\$2"
14654-}
14655-
14656-_LT_EOF
14657- ;;
14658- esac
14659+ sed '$q' "$ltmain" >> "$cfgfile" \
14660+ || (rm -f "$cfgfile"; exit 1)
14661
14662+ if test x"$xsi_shell" = xyes; then
14663+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
14664+func_dirname ()\
14665+{\
14666+\ case ${1} in\
14667+\ */*) func_dirname_result="${1%/*}${2}" ;;\
14668+\ * ) func_dirname_result="${3}" ;;\
14669+\ esac\
14670+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
14671+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14672+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14673+test 0 -eq $? || _lt_function_replace_fail=:
14674+
14675+
14676+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
14677+func_basename ()\
14678+{\
14679+\ func_basename_result="${1##*/}"\
14680+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
14681+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14682+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14683+test 0 -eq $? || _lt_function_replace_fail=:
14684+
14685+
14686+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
14687+func_dirname_and_basename ()\
14688+{\
14689+\ case ${1} in\
14690+\ */*) func_dirname_result="${1%/*}${2}" ;;\
14691+\ * ) func_dirname_result="${3}" ;;\
14692+\ esac\
14693+\ func_basename_result="${1##*/}"\
14694+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
14695+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14696+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14697+test 0 -eq $? || _lt_function_replace_fail=:
14698+
14699+
14700+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
14701+func_stripname ()\
14702+{\
14703+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
14704+\ # positional parameters, so assign one to ordinary parameter first.\
14705+\ func_stripname_result=${3}\
14706+\ func_stripname_result=${func_stripname_result#"${1}"}\
14707+\ func_stripname_result=${func_stripname_result%"${2}"}\
14708+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
14709+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14710+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14711+test 0 -eq $? || _lt_function_replace_fail=:
14712+
14713+
14714+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
14715+func_split_long_opt ()\
14716+{\
14717+\ func_split_long_opt_name=${1%%=*}\
14718+\ func_split_long_opt_arg=${1#*=}\
14719+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
14720+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14721+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14722+test 0 -eq $? || _lt_function_replace_fail=:
14723+
14724+
14725+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
14726+func_split_short_opt ()\
14727+{\
14728+\ func_split_short_opt_arg=${1#??}\
14729+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
14730+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
14731+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14732+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14733+test 0 -eq $? || _lt_function_replace_fail=:
14734+
14735+
14736+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
14737+func_lo2o ()\
14738+{\
14739+\ case ${1} in\
14740+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
14741+\ *) func_lo2o_result=${1} ;;\
14742+\ esac\
14743+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
14744+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14745+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14746+test 0 -eq $? || _lt_function_replace_fail=:
14747+
14748+
14749+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
14750+func_xform ()\
14751+{\
14752+ func_xform_result=${1%.*}.lo\
14753+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
14754+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14755+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14756+test 0 -eq $? || _lt_function_replace_fail=:
14757+
14758+
14759+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
14760+func_arith ()\
14761+{\
14762+ func_arith_result=$(( $* ))\
14763+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
14764+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14765+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14766+test 0 -eq $? || _lt_function_replace_fail=:
14767+
14768+
14769+ sed -e '/^func_len ()$/,/^} # func_len /c\
14770+func_len ()\
14771+{\
14772+ func_len_result=${#1}\
14773+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
14774+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14775+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14776+test 0 -eq $? || _lt_function_replace_fail=:
14777+
14778+fi
14779+
14780+if test x"$lt_shell_append" = xyes; then
14781+ sed -e '/^func_append ()$/,/^} # func_append /c\
14782+func_append ()\
14783+{\
14784+ eval "${1}+=\\${2}"\
14785+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
14786+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14787+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14788+test 0 -eq $? || _lt_function_replace_fail=:
14789+
14790+
14791+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
14792+func_append_quoted ()\
14793+{\
14794+\ func_quote_for_eval "${2}"\
14795+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
14796+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
14797+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14798+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14799+test 0 -eq $? || _lt_function_replace_fail=:
14800+
14801+
14802+ # Save a `func_append' function call where possible by direct use of '+='
14803+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
14804+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14805+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14806+ test 0 -eq $? || _lt_function_replace_fail=:
14807+else
14808+ # Save a `func_append' function call even when '+=' is not available
14809+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
14810+ && mv -f "$cfgfile.tmp" "$cfgfile" \
14811+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
14812+ test 0 -eq $? || _lt_function_replace_fail=:
14813+fi
14814+
14815+if test x"$_lt_function_replace_fail" = x":"; then
14816+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
14817+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
14818+fi
14819
14820- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
14821- || (rm -f "$cfgfile"; exit 1)
14822
14823- mv -f "$cfgfile" "$ofile" ||
14824+ mv -f "$cfgfile" "$ofile" ||
14825 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
14826 chmod +x "$ofile"
14827
14828Index: binutils-2.21.1/gprof/configure
14829===================================================================
14830--- binutils-2.21.1.orig/gprof/configure
14831+++ binutils-2.21.1/gprof/configure
14832@@ -629,8 +629,11 @@ OTOOL
14833 LIPO
14834 NMEDIT
14835 DSYMUTIL
14836+MANIFEST_TOOL
14837 RANLIB
14838+ac_ct_AR
14839 AR
14840+DLLTOOL
14841 OBJDUMP
14842 LN_S
14843 NM
14844@@ -743,6 +746,7 @@ enable_static
14845 with_pic
14846 enable_fast_install
14847 with_gnu_ld
14848+with_libtool_sysroot
14849 enable_libtool_lock
14850 enable_nls
14851 enable_maintainer_mode
14852@@ -1397,6 +1401,8 @@ Optional Packages:
14853 --with-pic try to use only PIC/non-PIC objects [default=use
14854 both]
14855 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
14856+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
14857+ (or the compiler's sysroot if not specified).
14858
14859 Some influential environment variables:
14860 CC C compiler command
14861@@ -5065,8 +5071,8 @@ esac
14862
14863
14864
14865-macro_version='2.2.7a'
14866-macro_revision='1.3134'
14867+macro_version='2.4'
14868+macro_revision='1.3293'
14869
14870
14871
14872@@ -5106,7 +5112,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
14874 $as_echo_n "checking how to print strings... " >&6; }
14875 # Test print first, because it will be a builtin if present.
14876-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
14877+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
14878 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
14879 ECHO='print -r --'
14880 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
14881@@ -5792,8 +5798,8 @@ $as_echo_n "checking whether the shell u
14882 # Try some XSI features
14883 xsi_shell=no
14884 ( _lt_dummy="a/b/c"
14885- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
14886- = c,a/b,, \
14887+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
14888+ = c,a/b,b/c, \
14889 && eval 'test $(( 1 + 1 )) -eq 2 \
14890 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
14891 && xsi_shell=yes
14892@@ -5842,6 +5848,80 @@ esac
14893
14894
14895
14896+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
14897+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
14898+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
14899+ $as_echo_n "(cached) " >&6
14900+else
14901+ case $host in
14902+ *-*-mingw* )
14903+ case $build in
14904+ *-*-mingw* ) # actually msys
14905+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
14906+ ;;
14907+ *-*-cygwin* )
14908+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
14909+ ;;
14910+ * ) # otherwise, assume *nix
14911+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
14912+ ;;
14913+ esac
14914+ ;;
14915+ *-*-cygwin* )
14916+ case $build in
14917+ *-*-mingw* ) # actually msys
14918+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
14919+ ;;
14920+ *-*-cygwin* )
14921+ lt_cv_to_host_file_cmd=func_convert_file_noop
14922+ ;;
14923+ * ) # otherwise, assume *nix
14924+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
14925+ ;;
14926+ esac
14927+ ;;
14928+ * ) # unhandled hosts (and "normal" native builds)
14929+ lt_cv_to_host_file_cmd=func_convert_file_noop
14930+ ;;
14931+esac
14932+
14933+fi
14934+
14935+to_host_file_cmd=$lt_cv_to_host_file_cmd
14936+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
14937+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
14938+
14939+
14940+
14941+
14942+
14943+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
14944+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
14945+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
14946+ $as_echo_n "(cached) " >&6
14947+else
14948+ #assume ordinary cross tools, or native build.
14949+lt_cv_to_tool_file_cmd=func_convert_file_noop
14950+case $host in
14951+ *-*-mingw* )
14952+ case $build in
14953+ *-*-mingw* ) # actually msys
14954+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
14955+ ;;
14956+ esac
14957+ ;;
14958+esac
14959+
14960+fi
14961+
14962+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
14963+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
14964+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
14965+
14966+
14967+
14968+
14969+
14970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
14971 $as_echo_n "checking for $LD option to reload object files... " >&6; }
14972 if test "${lt_cv_ld_reload_flag+set}" = set; then :
14973@@ -5858,6 +5938,11 @@ case $reload_flag in
14974 esac
14975 reload_cmds='$LD$reload_flag -o $output$reload_objs'
14976 case $host_os in
14977+ cygwin* | mingw* | pw32* | cegcc*)
14978+ if test "$GCC" != yes; then
14979+ reload_cmds=false
14980+ fi
14981+ ;;
14982 darwin*)
14983 if test "$GCC" = yes; then
14984 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
14985@@ -6026,7 +6111,8 @@ mingw* | pw32*)
14986 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
14987 lt_cv_file_magic_cmd='func_win32_libid'
14988 else
14989- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
14990+ # Keep this pattern in sync with the one in func_win32_libid.
14991+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
14992 lt_cv_file_magic_cmd='$OBJDUMP -f'
14993 fi
14994 ;;
14995@@ -6185,6 +6271,21 @@ esac
14996 fi
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
14998 $as_echo "$lt_cv_deplibs_check_method" >&6; }
14999+
15000+file_magic_glob=
15001+want_nocaseglob=no
15002+if test "$build" = "$host"; then
15003+ case $host_os in
15004+ mingw* | pw32*)
15005+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
15006+ want_nocaseglob=yes
15007+ else
15008+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
15009+ fi
15010+ ;;
15011+ esac
15012+fi
15013+
15014 file_magic_cmd=$lt_cv_file_magic_cmd
15015 deplibs_check_method=$lt_cv_deplibs_check_method
15016 test -z "$deplibs_check_method" && deplibs_check_method=unknown
15017@@ -6200,9 +6301,162 @@ test -z "$deplibs_check_method" && depli
15018
15019
15020
15021+
15022+
15023+
15024+
15025+
15026+
15027+
15028+
15029+
15030+
15031 if test -n "$ac_tool_prefix"; then
15032- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
15033-set dummy ${ac_tool_prefix}ar; ac_word=$2
15034+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
15035+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
15036+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15037+$as_echo_n "checking for $ac_word... " >&6; }
15038+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
15039+ $as_echo_n "(cached) " >&6
15040+else
15041+ if test -n "$DLLTOOL"; then
15042+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
15043+else
15044+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15045+for as_dir in $PATH
15046+do
15047+ IFS=$as_save_IFS
15048+ test -z "$as_dir" && as_dir=.
15049+ for ac_exec_ext in '' $ac_executable_extensions; do
15050+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15051+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
15052+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15053+ break 2
15054+ fi
15055+done
15056+ done
15057+IFS=$as_save_IFS
15058+
15059+fi
15060+fi
15061+DLLTOOL=$ac_cv_prog_DLLTOOL
15062+if test -n "$DLLTOOL"; then
15063+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
15064+$as_echo "$DLLTOOL" >&6; }
15065+else
15066+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15067+$as_echo "no" >&6; }
15068+fi
15069+
15070+
15071+fi
15072+if test -z "$ac_cv_prog_DLLTOOL"; then
15073+ ac_ct_DLLTOOL=$DLLTOOL
15074+ # Extract the first word of "dlltool", so it can be a program name with args.
15075+set dummy dlltool; ac_word=$2
15076+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15077+$as_echo_n "checking for $ac_word... " >&6; }
15078+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
15079+ $as_echo_n "(cached) " >&6
15080+else
15081+ if test -n "$ac_ct_DLLTOOL"; then
15082+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
15083+else
15084+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15085+for as_dir in $PATH
15086+do
15087+ IFS=$as_save_IFS
15088+ test -z "$as_dir" && as_dir=.
15089+ for ac_exec_ext in '' $ac_executable_extensions; do
15090+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15091+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
15092+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15093+ break 2
15094+ fi
15095+done
15096+ done
15097+IFS=$as_save_IFS
15098+
15099+fi
15100+fi
15101+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
15102+if test -n "$ac_ct_DLLTOOL"; then
15103+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
15104+$as_echo "$ac_ct_DLLTOOL" >&6; }
15105+else
15106+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15107+$as_echo "no" >&6; }
15108+fi
15109+
15110+ if test "x$ac_ct_DLLTOOL" = x; then
15111+ DLLTOOL="false"
15112+ else
15113+ case $cross_compiling:$ac_tool_warned in
15114+yes:)
15115+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15116+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15117+ac_tool_warned=yes ;;
15118+esac
15119+ DLLTOOL=$ac_ct_DLLTOOL
15120+ fi
15121+else
15122+ DLLTOOL="$ac_cv_prog_DLLTOOL"
15123+fi
15124+
15125+test -z "$DLLTOOL" && DLLTOOL=dlltool
15126+
15127+
15128+
15129+
15130+
15131+
15132+
15133+
15134+
15135+
15136+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
15137+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
15138+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
15139+ $as_echo_n "(cached) " >&6
15140+else
15141+ lt_cv_sharedlib_from_linklib_cmd='unknown'
15142+
15143+case $host_os in
15144+cygwin* | mingw* | pw32* | cegcc*)
15145+ # two different shell functions defined in ltmain.sh
15146+ # decide which to use based on capabilities of $DLLTOOL
15147+ case `$DLLTOOL --help 2>&1` in
15148+ *--identify-strict*)
15149+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
15150+ ;;
15151+ *)
15152+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
15153+ ;;
15154+ esac
15155+ ;;
15156+*)
15157+ # fallback: assume linklib IS sharedlib
15158+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
15159+ ;;
15160+esac
15161+
15162+fi
15163+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
15164+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
15165+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
15166+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
15167+
15168+
15169+
15170+
15171+
15172+
15173+
15174+if test -n "$ac_tool_prefix"; then
15175+ for ac_prog in ar
15176+ do
15177+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15178+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15180 $as_echo_n "checking for $ac_word... " >&6; }
15181 if test "${ac_cv_prog_AR+set}" = set; then :
15182@@ -6218,7 +6472,7 @@ do
15183 test -z "$as_dir" && as_dir=.
15184 for ac_exec_ext in '' $ac_executable_extensions; do
15185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15186- ac_cv_prog_AR="${ac_tool_prefix}ar"
15187+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
15188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15189 break 2
15190 fi
15191@@ -6238,11 +6492,15 @@ $as_echo "no" >&6; }
15192 fi
15193
15194
15195+ test -n "$AR" && break
15196+ done
15197 fi
15198-if test -z "$ac_cv_prog_AR"; then
15199+if test -z "$AR"; then
15200 ac_ct_AR=$AR
15201- # Extract the first word of "ar", so it can be a program name with args.
15202-set dummy ar; ac_word=$2
15203+ for ac_prog in ar
15204+do
15205+ # Extract the first word of "$ac_prog", so it can be a program name with args.
15206+set dummy $ac_prog; ac_word=$2
15207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15208 $as_echo_n "checking for $ac_word... " >&6; }
15209 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
15210@@ -6258,7 +6516,7 @@ do
15211 test -z "$as_dir" && as_dir=.
15212 for ac_exec_ext in '' $ac_executable_extensions; do
15213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15214- ac_cv_prog_ac_ct_AR="ar"
15215+ ac_cv_prog_ac_ct_AR="$ac_prog"
15216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15217 break 2
15218 fi
15219@@ -6277,6 +6535,10 @@ else
15220 $as_echo "no" >&6; }
15221 fi
15222
15223+
15224+ test -n "$ac_ct_AR" && break
15225+done
15226+
15227 if test "x$ac_ct_AR" = x; then
15228 AR="false"
15229 else
15230@@ -6288,12 +6550,10 @@ ac_tool_warned=yes ;;
15231 esac
15232 AR=$ac_ct_AR
15233 fi
15234-else
15235- AR="$ac_cv_prog_AR"
15236 fi
15237
15238-test -z "$AR" && AR=ar
15239-test -z "$AR_FLAGS" && AR_FLAGS=cru
15240+: ${AR=ar}
15241+: ${AR_FLAGS=cru}
15242
15243
15244
15245@@ -6305,6 +6565,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
15246
15247
15248
15249+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
15250+$as_echo_n "checking for archiver @FILE support... " >&6; }
15251+if test "${lt_cv_ar_at_file+set}" = set; then :
15252+ $as_echo_n "(cached) " >&6
15253+else
15254+ lt_cv_ar_at_file=no
15255+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15256+/* end confdefs.h. */
15257+
15258+int
15259+main ()
15260+{
15261+
15262+ ;
15263+ return 0;
15264+}
15265+_ACEOF
15266+if ac_fn_c_try_compile "$LINENO"; then :
15267+ echo conftest.$ac_objext > conftest.lst
15268+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
15269+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
15270+ (eval $lt_ar_try) 2>&5
15271+ ac_status=$?
15272+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15273+ test $ac_status = 0; }
15274+ if test "$ac_status" -eq 0; then
15275+ # Ensure the archiver fails upon bogus file names.
15276+ rm -f conftest.$ac_objext libconftest.a
15277+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
15278+ (eval $lt_ar_try) 2>&5
15279+ ac_status=$?
15280+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15281+ test $ac_status = 0; }
15282+ if test "$ac_status" -ne 0; then
15283+ lt_cv_ar_at_file=@
15284+ fi
15285+ fi
15286+ rm -f conftest.* libconftest.a
15287+
15288+fi
15289+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15290+
15291+fi
15292+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
15293+$as_echo "$lt_cv_ar_at_file" >&6; }
15294+
15295+if test "x$lt_cv_ar_at_file" = xno; then
15296+ archiver_list_spec=
15297+else
15298+ archiver_list_spec=$lt_cv_ar_at_file
15299+fi
15300+
15301+
15302+
15303+
15304+
15305+
15306+
15307 if test -n "$ac_tool_prefix"; then
15308 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15309 set dummy ${ac_tool_prefix}strip; ac_word=$2
15310@@ -6639,8 +6957,8 @@ esac
15311 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
15312
15313 # Transform an extracted symbol line into symbol name and symbol address
15314-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
15315-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
15316+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
15317+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
15318
15319 # Handle CRLF in mingw tool chain
15320 opt_cr=
15321@@ -6676,6 +6994,7 @@ for ac_symprfx in "" "_"; do
15322 else
15323 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
15324 fi
15325+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
15326
15327 # Check to see that the pipe works correctly.
15328 pipe_works=no
15329@@ -6717,6 +7036,18 @@ _LT_EOF
15330 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
15331 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
15332 cat <<_LT_EOF > conftest.$ac_ext
15333+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
15334+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
15335+/* DATA imports from DLLs on WIN32 con't be const, because runtime
15336+ relocations are performed -- see ld's documentation on pseudo-relocs. */
15337+# define LT_DLSYM_CONST
15338+#elif defined(__osf__)
15339+/* This system does not cope well with relocations in const data. */
15340+# define LT_DLSYM_CONST
15341+#else
15342+# define LT_DLSYM_CONST const
15343+#endif
15344+
15345 #ifdef __cplusplus
15346 extern "C" {
15347 #endif
15348@@ -6728,7 +7059,7 @@ _LT_EOF
15349 cat <<_LT_EOF >> conftest.$ac_ext
15350
15351 /* The mapping between symbol names and symbols. */
15352-const struct {
15353+LT_DLSYM_CONST struct {
15354 const char *name;
15355 void *address;
15356 }
15357@@ -6754,8 +7085,8 @@ static const void *lt_preloaded_setup()
15358 _LT_EOF
15359 # Now try linking the two files.
15360 mv conftest.$ac_objext conftstm.$ac_objext
15361- lt_save_LIBS="$LIBS"
15362- lt_save_CFLAGS="$CFLAGS"
15363+ lt_globsym_save_LIBS=$LIBS
15364+ lt_globsym_save_CFLAGS=$CFLAGS
15365 LIBS="conftstm.$ac_objext"
15366 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
15367 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15368@@ -6765,8 +7096,8 @@ _LT_EOF
15369 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
15370 pipe_works=yes
15371 fi
15372- LIBS="$lt_save_LIBS"
15373- CFLAGS="$lt_save_CFLAGS"
15374+ LIBS=$lt_globsym_save_LIBS
15375+ CFLAGS=$lt_globsym_save_CFLAGS
15376 else
15377 echo "cannot find nm_test_func in $nlist" >&5
15378 fi
15379@@ -6803,6 +7134,19 @@ else
15380 $as_echo "ok" >&6; }
15381 fi
15382
15383+# Response file support.
15384+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
15385+ nm_file_list_spec='@'
15386+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
15387+ nm_file_list_spec='@'
15388+fi
15389+
15390+
15391+
15392+
15393+
15394+
15395+
15396
15397
15398
15399@@ -6823,6 +7167,42 @@ fi
15400
15401
15402
15403+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15404+$as_echo_n "checking for sysroot... " >&6; }
15405+
15406+# Check whether --with-libtool-sysroot was given.
15407+if test "${with_libtool_sysroot+set}" = set; then :
15408+ withval=$with_libtool_sysroot;
15409+else
15410+ with_libtool_sysroot=no
15411+fi
15412+
15413+
15414+lt_sysroot=
15415+case ${with_libtool_sysroot} in #(
15416+ yes)
15417+ if test "$GCC" = yes; then
15418+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
15419+ fi
15420+ ;; #(
15421+ /*)
15422+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
15423+ ;; #(
15424+ no|'')
15425+ ;; #(
15426+ *)
15427+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
15428+$as_echo "${with_libtool_sysroot}" >&6; }
15429+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
15430+ ;;
15431+esac
15432+
15433+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
15434+$as_echo "${lt_sysroot:-no}" >&6; }
15435+
15436+
15437+
15438+
15439
15440 # Check whether --enable-libtool-lock was given.
15441 if test "${enable_libtool_lock+set}" = set; then :
15442@@ -7017,6 +7397,123 @@ esac
15443
15444 need_locks="$enable_libtool_lock"
15445
15446+if test -n "$ac_tool_prefix"; then
15447+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
15448+set dummy ${ac_tool_prefix}mt; ac_word=$2
15449+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15450+$as_echo_n "checking for $ac_word... " >&6; }
15451+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
15452+ $as_echo_n "(cached) " >&6
15453+else
15454+ if test -n "$MANIFEST_TOOL"; then
15455+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
15456+else
15457+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15458+for as_dir in $PATH
15459+do
15460+ IFS=$as_save_IFS
15461+ test -z "$as_dir" && as_dir=.
15462+ for ac_exec_ext in '' $ac_executable_extensions; do
15463+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15464+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
15465+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15466+ break 2
15467+ fi
15468+done
15469+ done
15470+IFS=$as_save_IFS
15471+
15472+fi
15473+fi
15474+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
15475+if test -n "$MANIFEST_TOOL"; then
15476+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
15477+$as_echo "$MANIFEST_TOOL" >&6; }
15478+else
15479+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15480+$as_echo "no" >&6; }
15481+fi
15482+
15483+
15484+fi
15485+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
15486+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
15487+ # Extract the first word of "mt", so it can be a program name with args.
15488+set dummy mt; ac_word=$2
15489+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15490+$as_echo_n "checking for $ac_word... " >&6; }
15491+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
15492+ $as_echo_n "(cached) " >&6
15493+else
15494+ if test -n "$ac_ct_MANIFEST_TOOL"; then
15495+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
15496+else
15497+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15498+for as_dir in $PATH
15499+do
15500+ IFS=$as_save_IFS
15501+ test -z "$as_dir" && as_dir=.
15502+ for ac_exec_ext in '' $ac_executable_extensions; do
15503+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15504+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
15505+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15506+ break 2
15507+ fi
15508+done
15509+ done
15510+IFS=$as_save_IFS
15511+
15512+fi
15513+fi
15514+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
15515+if test -n "$ac_ct_MANIFEST_TOOL"; then
15516+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
15517+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
15518+else
15519+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15520+$as_echo "no" >&6; }
15521+fi
15522+
15523+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
15524+ MANIFEST_TOOL=":"
15525+ else
15526+ case $cross_compiling:$ac_tool_warned in
15527+yes:)
15528+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15529+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15530+ac_tool_warned=yes ;;
15531+esac
15532+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
15533+ fi
15534+else
15535+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
15536+fi
15537+
15538+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
15539+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
15540+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
15541+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
15542+ $as_echo_n "(cached) " >&6
15543+else
15544+ lt_cv_path_mainfest_tool=no
15545+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
15546+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
15547+ cat conftest.err >&5
15548+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
15549+ lt_cv_path_mainfest_tool=yes
15550+ fi
15551+ rm -f conftest*
15552+fi
15553+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
15554+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
15555+if test "x$lt_cv_path_mainfest_tool" != xyes; then
15556+ MANIFEST_TOOL=:
15557+fi
15558+
15559+
15560+
15561+
15562+
15563
15564 case $host_os in
15565 rhapsody* | darwin*)
15566@@ -7580,6 +8077,8 @@ _LT_EOF
15567 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
15568 echo "$AR cru libconftest.a conftest.o" >&5
15569 $AR cru libconftest.a conftest.o 2>&5
15570+ echo "$RANLIB libconftest.a" >&5
15571+ $RANLIB libconftest.a 2>&5
15572 cat > conftest.c << _LT_EOF
15573 int main() { return 0;}
15574 _LT_EOF
15575@@ -7775,7 +8274,8 @@ fi
15576 LIBTOOL_DEPS="$ltmain"
15577
15578 # Always use our own libtool.
15579-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
15580+LIBTOOL='$(SHELL) $(top_builddir)'
15581+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
15582
15583
15584
15585@@ -7864,7 +8364,7 @@ aix3*)
15586 esac
15587
15588 # Global variables:
15589-ofile=libtool
15590+ofile=${host_alias}-libtool
15591 can_build_shared=yes
15592
15593 # All known linkers require a `.a' archive for static linking (except MSVC,
15594@@ -8162,8 +8662,6 @@ fi
15595 lt_prog_compiler_pic=
15596 lt_prog_compiler_static=
15597
15598-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
15599-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
15600
15601 if test "$GCC" = yes; then
15602 lt_prog_compiler_wl='-Wl,'
15603@@ -8328,6 +8826,12 @@ $as_echo_n "checking for $compiler optio
15604 lt_prog_compiler_pic='--shared'
15605 lt_prog_compiler_static='--static'
15606 ;;
15607+ nagfor*)
15608+ # NAG Fortran compiler
15609+ lt_prog_compiler_wl='-Wl,-Wl,,'
15610+ lt_prog_compiler_pic='-PIC'
15611+ lt_prog_compiler_static='-Bstatic'
15612+ ;;
15613 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
15614 # Portland Group compilers (*not* the Pentium gcc compiler,
15615 # which looks to be a dead project)
15616@@ -8390,7 +8894,7 @@ $as_echo_n "checking for $compiler optio
15617 lt_prog_compiler_pic='-KPIC'
15618 lt_prog_compiler_static='-Bstatic'
15619 case $cc_basename in
15620- f77* | f90* | f95*)
15621+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
15622 lt_prog_compiler_wl='-Qoption ld ';;
15623 *)
15624 lt_prog_compiler_wl='-Wl,';;
15625@@ -8447,13 +8951,17 @@ case $host_os in
15626 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
15627 ;;
15628 esac
15629-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
15630-$as_echo "$lt_prog_compiler_pic" >&6; }
15631-
15632-
15633-
15634-
15635
15636+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
15637+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
15638+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
15639+ $as_echo_n "(cached) " >&6
15640+else
15641+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
15642+fi
15643+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
15644+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
15645+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
15646
15647 #
15648 # Check to make sure the PIC flag actually works.
15649@@ -8514,6 +9022,11 @@ fi
15650
15651
15652
15653+
15654+
15655+
15656+
15657+
15658 #
15659 # Check to make sure the static flag actually works.
15660 #
15661@@ -8864,7 +9377,8 @@ _LT_EOF
15662 allow_undefined_flag=unsupported
15663 always_export_symbols=no
15664 enable_shared_with_static_runtimes=yes
15665- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
15666+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
15667+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
15668
15669 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
15670 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
15671@@ -8912,7 +9426,7 @@ _LT_EOF
15672 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
15673 && test "$tmp_diet" = no
15674 then
15675- tmp_addflag=
15676+ tmp_addflag=' $pic_flag'
15677 tmp_sharedflag='-shared'
15678 case $cc_basename,$host_cpu in
15679 pgcc*) # Portland Group C compiler
15680@@ -8963,12 +9477,12 @@ _LT_EOF
15681 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
15682 hardcode_libdir_flag_spec=
15683 hardcode_libdir_flag_spec_ld='-rpath $libdir'
15684- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
15685+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
15686 if test "x$supports_anon_versioning" = xyes; then
15687 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
15688 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
15689 echo "local: *; };" >> $output_objdir/$libname.ver~
15690- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
15691+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
15692 fi
15693 ;;
15694 esac
15695@@ -8982,8 +9496,8 @@ _LT_EOF
15696 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
15697 wlarc=
15698 else
15699- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15700- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15701+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15702+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15703 fi
15704 ;;
15705
15706@@ -9001,8 +9515,8 @@ _LT_EOF
15707
15708 _LT_EOF
15709 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15710- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15711- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15712+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15713+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15714 else
15715 ld_shlibs=no
15716 fi
15717@@ -9048,8 +9562,8 @@ _LT_EOF
15718
15719 *)
15720 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15721- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15722- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15723+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
15724+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
15725 else
15726 ld_shlibs=no
15727 fi
15728@@ -9179,7 +9693,13 @@ _LT_EOF
15729 allow_undefined_flag='-berok'
15730 # Determine the default libpath from the value encoded in an
15731 # empty executable.
15732- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15733+ if test "${lt_cv_aix_libpath+set}" = set; then
15734+ aix_libpath=$lt_cv_aix_libpath
15735+else
15736+ if test "${lt_cv_aix_libpath_+set}" = set; then :
15737+ $as_echo_n "(cached) " >&6
15738+else
15739+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15740 /* end confdefs.h. */
15741
15742 int
15743@@ -9192,22 +9712,29 @@ main ()
15744 _ACEOF
15745 if ac_fn_c_try_link "$LINENO"; then :
15746
15747-lt_aix_libpath_sed='
15748- /Import File Strings/,/^$/ {
15749- /^0/ {
15750- s/^0 *\(.*\)$/\1/
15751- p
15752- }
15753- }'
15754-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15755-# Check for a 64-bit object if we didn't find anything.
15756-if test -z "$aix_libpath"; then
15757- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15758-fi
15759+ lt_aix_libpath_sed='
15760+ /Import File Strings/,/^$/ {
15761+ /^0/ {
15762+ s/^0 *\([^ ]*\) *$/\1/
15763+ p
15764+ }
15765+ }'
15766+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15767+ # Check for a 64-bit object if we didn't find anything.
15768+ if test -z "$lt_cv_aix_libpath_"; then
15769+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15770+ fi
15771 fi
15772 rm -f core conftest.err conftest.$ac_objext \
15773 conftest$ac_exeext conftest.$ac_ext
15774-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
15775+ if test -z "$lt_cv_aix_libpath_"; then
15776+ lt_cv_aix_libpath_="/usr/lib:/lib"
15777+ fi
15778+
15779+fi
15780+
15781+ aix_libpath=$lt_cv_aix_libpath_
15782+fi
15783
15784 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15785 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
15786@@ -9219,7 +9746,13 @@ if test -z "$aix_libpath"; then aix_libp
15787 else
15788 # Determine the default libpath from the value encoded in an
15789 # empty executable.
15790- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791+ if test "${lt_cv_aix_libpath+set}" = set; then
15792+ aix_libpath=$lt_cv_aix_libpath
15793+else
15794+ if test "${lt_cv_aix_libpath_+set}" = set; then :
15795+ $as_echo_n "(cached) " >&6
15796+else
15797+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15798 /* end confdefs.h. */
15799
15800 int
15801@@ -9232,22 +9765,29 @@ main ()
15802 _ACEOF
15803 if ac_fn_c_try_link "$LINENO"; then :
15804
15805-lt_aix_libpath_sed='
15806- /Import File Strings/,/^$/ {
15807- /^0/ {
15808- s/^0 *\(.*\)$/\1/
15809- p
15810- }
15811- }'
15812-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15813-# Check for a 64-bit object if we didn't find anything.
15814-if test -z "$aix_libpath"; then
15815- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15816-fi
15817+ lt_aix_libpath_sed='
15818+ /Import File Strings/,/^$/ {
15819+ /^0/ {
15820+ s/^0 *\([^ ]*\) *$/\1/
15821+ p
15822+ }
15823+ }'
15824+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15825+ # Check for a 64-bit object if we didn't find anything.
15826+ if test -z "$lt_cv_aix_libpath_"; then
15827+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15828+ fi
15829 fi
15830 rm -f core conftest.err conftest.$ac_objext \
15831 conftest$ac_exeext conftest.$ac_ext
15832-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
15833+ if test -z "$lt_cv_aix_libpath_"; then
15834+ lt_cv_aix_libpath_="/usr/lib:/lib"
15835+ fi
15836+
15837+fi
15838+
15839+ aix_libpath=$lt_cv_aix_libpath_
15840+fi
15841
15842 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
15843 # Warning - without using the other run time loading flags,
15844@@ -9292,20 +9832,63 @@ if test -z "$aix_libpath"; then aix_libp
15845 # Microsoft Visual C++.
15846 # hardcode_libdir_flag_spec is actually meaningless, as there is
15847 # no search path for DLLs.
15848- hardcode_libdir_flag_spec=' '
15849- allow_undefined_flag=unsupported
15850- # Tell ltmain to make .lib files, not .a files.
15851- libext=lib
15852- # Tell ltmain to make .dll files, not .so files.
15853- shrext_cmds=".dll"
15854- # FIXME: Setting linknames here is a bad hack.
15855- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
15856- # The linker will automatically build a .lib file if we build a DLL.
15857- old_archive_from_new_cmds='true'
15858- # FIXME: Should let the user specify the lib program.
15859- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15860- fix_srcfile_path='`cygpath -w "$srcfile"`'
15861- enable_shared_with_static_runtimes=yes
15862+ case $cc_basename in
15863+ cl*)
15864+ # Native MSVC
15865+ hardcode_libdir_flag_spec=' '
15866+ allow_undefined_flag=unsupported
15867+ always_export_symbols=yes
15868+ file_list_spec='@'
15869+ # Tell ltmain to make .lib files, not .a files.
15870+ libext=lib
15871+ # Tell ltmain to make .dll files, not .so files.
15872+ shrext_cmds=".dll"
15873+ # FIXME: Setting linknames here is a bad hack.
15874+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
15875+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
15876+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
15877+ else
15878+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
15879+ fi~
15880+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
15881+ linknames='
15882+ # The linker will not automatically build a static lib if we build a DLL.
15883+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
15884+ enable_shared_with_static_runtimes=yes
15885+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
15886+ # Don't use ranlib
15887+ old_postinstall_cmds='chmod 644 $oldlib'
15888+ postlink_cmds='lt_outputfile="@OUTPUT@"~
15889+ lt_tool_outputfile="@TOOL_OUTPUT@"~
15890+ case $lt_outputfile in
15891+ *.exe|*.EXE) ;;
15892+ *)
15893+ lt_outputfile="$lt_outputfile.exe"
15894+ lt_tool_outputfile="$lt_tool_outputfile.exe"
15895+ ;;
15896+ esac~
15897+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
15898+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
15899+ $RM "$lt_outputfile.manifest";
15900+ fi'
15901+ ;;
15902+ *)
15903+ # Assume MSVC wrapper
15904+ hardcode_libdir_flag_spec=' '
15905+ allow_undefined_flag=unsupported
15906+ # Tell ltmain to make .lib files, not .a files.
15907+ libext=lib
15908+ # Tell ltmain to make .dll files, not .so files.
15909+ shrext_cmds=".dll"
15910+ # FIXME: Setting linknames here is a bad hack.
15911+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
15912+ # The linker will automatically build a .lib file if we build a DLL.
15913+ old_archive_from_new_cmds='true'
15914+ # FIXME: Should let the user specify the lib program.
15915+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15916+ enable_shared_with_static_runtimes=yes
15917+ ;;
15918+ esac
15919 ;;
15920
15921 darwin* | rhapsody*)
15922@@ -9370,7 +9953,7 @@ if test -z "$aix_libpath"; then aix_libp
15923
15924 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15925 freebsd* | dragonfly*)
15926- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
15927+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15928 hardcode_libdir_flag_spec='-R$libdir'
15929 hardcode_direct=yes
15930 hardcode_shlibpath_var=no
15931@@ -9378,7 +9961,7 @@ if test -z "$aix_libpath"; then aix_libp
15932
15933 hpux9*)
15934 if test "$GCC" = yes; then
15935- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
15936+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
15937 else
15938 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
15939 fi
15940@@ -9394,7 +9977,7 @@ if test -z "$aix_libpath"; then aix_libp
15941
15942 hpux10*)
15943 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
15944- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15945+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15946 else
15947 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15948 fi
15949@@ -9418,10 +10001,10 @@ if test -z "$aix_libpath"; then aix_libp
15950 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15951 ;;
15952 ia64*)
15953- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15954+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15955 ;;
15956 *)
15957- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15958+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15959 ;;
15960 esac
15961 else
15962@@ -9500,23 +10083,36 @@ fi
15963
15964 irix5* | irix6* | nonstopux*)
15965 if test "$GCC" = yes; then
15966- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15967+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15968 # Try to use the -exported_symbol ld option, if it does not
15969 # work, assume that -exports_file does not work either and
15970 # implicitly export all symbols.
15971- save_LDFLAGS="$LDFLAGS"
15972- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
15973- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15974+ # This should be the same for all languages, so no per-tag cache variable.
15975+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
15976+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
15977+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
15978+ $as_echo_n "(cached) " >&6
15979+else
15980+ save_LDFLAGS="$LDFLAGS"
15981+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
15982+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15983 /* end confdefs.h. */
15984-int foo(void) {}
15985+int foo (void) { return 0; }
15986 _ACEOF
15987 if ac_fn_c_try_link "$LINENO"; then :
15988- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
15989-
15990+ lt_cv_irix_exported_symbol=yes
15991+else
15992+ lt_cv_irix_exported_symbol=no
15993 fi
15994 rm -f core conftest.err conftest.$ac_objext \
15995 conftest$ac_exeext conftest.$ac_ext
15996- LDFLAGS="$save_LDFLAGS"
15997+ LDFLAGS="$save_LDFLAGS"
15998+fi
15999+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
16000+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
16001+ if test "$lt_cv_irix_exported_symbol" = yes; then
16002+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
16003+ fi
16004 else
16005 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
16006 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
16007@@ -9601,7 +10197,7 @@ rm -f core conftest.err conftest.$ac_obj
16008 osf4* | osf5*) # as osf3* with the addition of -msym flag
16009 if test "$GCC" = yes; then
16010 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
16011- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
16012+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
16013 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
16014 else
16015 allow_undefined_flag=' -expect_unresolved \*'
16016@@ -9620,9 +10216,9 @@ rm -f core conftest.err conftest.$ac_obj
16017 no_undefined_flag=' -z defs'
16018 if test "$GCC" = yes; then
16019 wlarc='${wl}'
16020- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
16021+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
16022 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
16023- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
16024+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
16025 else
16026 case `$CC -V 2>&1` in
16027 *"Compilers 5.0"*)
16028@@ -10198,8 +10794,9 @@ cygwin* | mingw* | pw32* | cegcc*)
16029 need_version=no
16030 need_lib_prefix=no
16031
16032- case $GCC,$host_os in
16033- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
16034+ case $GCC,$cc_basename in
16035+ yes,*)
16036+ # gcc
16037 library_names_spec='$libname.dll.a'
16038 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16039 postinstall_cmds='base_file=`basename \${file}`~
16040@@ -10232,13 +10829,71 @@ cygwin* | mingw* | pw32* | cegcc*)
16041 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16042 ;;
16043 esac
16044+ dynamic_linker='Win32 ld.exe'
16045+ ;;
16046+
16047+ *,cl*)
16048+ # Native MSVC
16049+ libname_spec='$name'
16050+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
16051+ library_names_spec='${libname}.dll.lib'
16052+
16053+ case $build_os in
16054+ mingw*)
16055+ sys_lib_search_path_spec=
16056+ lt_save_ifs=$IFS
16057+ IFS=';'
16058+ for lt_path in $LIB
16059+ do
16060+ IFS=$lt_save_ifs
16061+ # Let DOS variable expansion print the short 8.3 style file name.
16062+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
16063+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
16064+ done
16065+ IFS=$lt_save_ifs
16066+ # Convert to MSYS style.
16067+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
16068+ ;;
16069+ cygwin*)
16070+ # Convert to unix form, then to dos form, then back to unix form
16071+ # but this time dos style (no spaces!) so that the unix form looks
16072+ # like /cygdrive/c/PROGRA~1:/cygdr...
16073+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
16074+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
16075+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16076+ ;;
16077+ *)
16078+ sys_lib_search_path_spec="$LIB"
16079+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
16080+ # It is most probably a Windows format PATH.
16081+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
16082+ else
16083+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16084+ fi
16085+ # FIXME: find the short name or the path components, as spaces are
16086+ # common. (e.g. "Program Files" -> "PROGRA~1")
16087+ ;;
16088+ esac
16089+
16090+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
16091+ postinstall_cmds='base_file=`basename \${file}`~
16092+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
16093+ dldir=$destdir/`dirname \$dlpath`~
16094+ test -d \$dldir || mkdir -p \$dldir~
16095+ $install_prog $dir/$dlname \$dldir/$dlname'
16096+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16097+ dlpath=$dir/\$dldll~
16098+ $RM \$dlpath'
16099+ shlibpath_overrides_runpath=yes
16100+ dynamic_linker='Win32 link.exe'
16101 ;;
16102
16103 *)
16104+ # Assume MSVC wrapper
16105 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
16106+ dynamic_linker='Win32 ld.exe'
16107 ;;
16108 esac
16109- dynamic_linker='Win32 ld.exe'
16110 # FIXME: first we should search . and the directory the executable is in
16111 shlibpath_var=PATH
16112 ;;
16113@@ -10334,7 +10989,7 @@ haiku*)
16114 soname_spec='${libname}${release}${shared_ext}$major'
16115 shlibpath_var=LIBRARY_PATH
16116 shlibpath_overrides_runpath=yes
16117- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
16118+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
16119 hardcode_into_libs=yes
16120 ;;
16121
16122@@ -11130,7 +11785,7 @@ else
16123 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16124 lt_status=$lt_dlunknown
16125 cat > conftest.$ac_ext <<_LT_EOF
16126-#line 11128 "configure"
16127+#line $LINENO "configure"
16128 #include "confdefs.h"
16129
16130 #if HAVE_DLFCN_H
16131@@ -11174,10 +11829,10 @@ else
16132 /* When -fvisbility=hidden is used, assume the code has been annotated
16133 correspondingly for the symbols needed. */
16134 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16135-void fnord () __attribute__((visibility("default")));
16136+int fnord () __attribute__((visibility("default")));
16137 #endif
16138
16139-void fnord () { int i=42; }
16140+int fnord () { return 42; }
16141 int main ()
16142 {
16143 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16144@@ -11236,7 +11891,7 @@ else
16145 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16146 lt_status=$lt_dlunknown
16147 cat > conftest.$ac_ext <<_LT_EOF
16148-#line 11234 "configure"
16149+#line $LINENO "configure"
16150 #include "confdefs.h"
16151
16152 #if HAVE_DLFCN_H
16153@@ -11280,10 +11935,10 @@ else
16154 /* When -fvisbility=hidden is used, assume the code has been annotated
16155 correspondingly for the symbols needed. */
16156 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
16157-void fnord () __attribute__((visibility("default")));
16158+int fnord () __attribute__((visibility("default")));
16159 #endif
16160
16161-void fnord () { int i=42; }
16162+int fnord () { return 42; }
16163 int main ()
16164 {
16165 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
16166@@ -12825,13 +13480,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
16167 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
16168 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
16169 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
16170+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
16171+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
16172 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
16173 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
16174 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
16175 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
16176 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
16177+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
16178+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
16179+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
16180+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
16181 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
16182 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
16183+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
16184 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
16185 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
16186 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
16187@@ -12846,14 +13508,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
16188 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
16189 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
16190 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
16191+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
16192+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
16193 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
16194 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
16195 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
16196-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
16197 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
16198+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
16199 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
16200 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
16201 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
16202+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
16203 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
16204 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
16205 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
16206@@ -12886,12 +13551,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
16207 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
16208 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
16209 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
16210-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
16211 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
16212 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
16213 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
16214 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
16215 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
16216+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
16217 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
16218 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
16219 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
16220@@ -12946,8 +13611,13 @@ reload_flag \
16221 OBJDUMP \
16222 deplibs_check_method \
16223 file_magic_cmd \
16224+file_magic_glob \
16225+want_nocaseglob \
16226+DLLTOOL \
16227+sharedlib_from_linklib_cmd \
16228 AR \
16229 AR_FLAGS \
16230+archiver_list_spec \
16231 STRIP \
16232 RANLIB \
16233 CC \
16234@@ -12957,12 +13627,14 @@ lt_cv_sys_global_symbol_pipe \
16235 lt_cv_sys_global_symbol_to_cdecl \
16236 lt_cv_sys_global_symbol_to_c_name_address \
16237 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
16238+nm_file_list_spec \
16239 lt_prog_compiler_no_builtin_flag \
16240-lt_prog_compiler_wl \
16241 lt_prog_compiler_pic \
16242+lt_prog_compiler_wl \
16243 lt_prog_compiler_static \
16244 lt_cv_prog_compiler_c_o \
16245 need_locks \
16246+MANIFEST_TOOL \
16247 DSYMUTIL \
16248 NMEDIT \
16249 LIPO \
16250@@ -12978,7 +13650,6 @@ no_undefined_flag \
16251 hardcode_libdir_flag_spec \
16252 hardcode_libdir_flag_spec_ld \
16253 hardcode_libdir_separator \
16254-fix_srcfile_path \
16255 exclude_expsyms \
16256 include_expsyms \
16257 file_list_spec \
16258@@ -13014,6 +13685,7 @@ module_cmds \
16259 module_expsym_cmds \
16260 export_symbols_cmds \
16261 prelink_cmds \
16262+postlink_cmds \
16263 postinstall_cmds \
16264 postuninstall_cmds \
16265 finish_cmds \
16266@@ -13770,7 +14442,8 @@ $as_echo X"$file" |
16267 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
16268 #
16269 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
16270-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
16271+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
16272+# Inc.
16273 # Written by Gordon Matzigkeit, 1996
16274 #
16275 # This file is part of GNU Libtool.
16276@@ -13873,19 +14546,42 @@ SP2NL=$lt_lt_SP2NL
16277 # turn newlines into spaces.
16278 NL2SP=$lt_lt_NL2SP
16279
16280+# convert \$build file names to \$host format.
16281+to_host_file_cmd=$lt_cv_to_host_file_cmd
16282+
16283+# convert \$build files to toolchain format.
16284+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16285+
16286 # An object symbol dumper.
16287 OBJDUMP=$lt_OBJDUMP
16288
16289 # Method to check whether dependent libraries are shared objects.
16290 deplibs_check_method=$lt_deplibs_check_method
16291
16292-# Command to use when deplibs_check_method == "file_magic".
16293+# Command to use when deplibs_check_method = "file_magic".
16294 file_magic_cmd=$lt_file_magic_cmd
16295
16296+# How to find potential files when deplibs_check_method = "file_magic".
16297+file_magic_glob=$lt_file_magic_glob
16298+
16299+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
16300+want_nocaseglob=$lt_want_nocaseglob
16301+
16302+# DLL creation program.
16303+DLLTOOL=$lt_DLLTOOL
16304+
16305+# Command to associate shared and link libraries.
16306+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
16307+
16308 # The archiver.
16309 AR=$lt_AR
16310+
16311+# Flags to create an archive.
16312 AR_FLAGS=$lt_AR_FLAGS
16313
16314+# How to feed a file listing to the archiver.
16315+archiver_list_spec=$lt_archiver_list_spec
16316+
16317 # A symbol stripping program.
16318 STRIP=$lt_STRIP
16319
16320@@ -13915,6 +14611,12 @@ global_symbol_to_c_name_address=$lt_lt_c
16321 # Transform the output of nm in a C name address pair when lib prefix is needed.
16322 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
16323
16324+# Specify filename containing input files for \$NM.
16325+nm_file_list_spec=$lt_nm_file_list_spec
16326+
16327+# The root where to search for dependent libraries,and in which our libraries should be installed.
16328+lt_sysroot=$lt_sysroot
16329+
16330 # The name of the directory that contains temporary libtool files.
16331 objdir=$objdir
16332
16333@@ -13924,6 +14626,9 @@ MAGIC_CMD=$MAGIC_CMD
16334 # Must we lock files when doing compilation?
16335 need_locks=$lt_need_locks
16336
16337+# Manifest tool.
16338+MANIFEST_TOOL=$lt_MANIFEST_TOOL
16339+
16340 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
16341 DSYMUTIL=$lt_DSYMUTIL
16342
16343@@ -14038,12 +14743,12 @@ with_gcc=$GCC
16344 # Compiler flag to turn off builtin functions.
16345 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
16346
16347-# How to pass a linker flag through the compiler.
16348-wl=$lt_lt_prog_compiler_wl
16349-
16350 # Additional compiler flags for building library objects.
16351 pic_flag=$lt_lt_prog_compiler_pic
16352
16353+# How to pass a linker flag through the compiler.
16354+wl=$lt_lt_prog_compiler_wl
16355+
16356 # Compiler flag to prevent dynamic linking.
16357 link_static_flag=$lt_lt_prog_compiler_static
16358
16359@@ -14130,9 +14835,6 @@ inherit_rpath=$inherit_rpath
16360 # Whether libtool must link a program against all its dependency libraries.
16361 link_all_deplibs=$link_all_deplibs
16362
16363-# Fix the shell variable \$srcfile for the compiler.
16364-fix_srcfile_path=$lt_fix_srcfile_path
16365-
16366 # Set to "yes" if exported symbols are required.
16367 always_export_symbols=$always_export_symbols
16368
16369@@ -14148,6 +14850,9 @@ include_expsyms=$lt_include_expsyms
16370 # Commands necessary for linking programs (against libraries) with templates.
16371 prelink_cmds=$lt_prelink_cmds
16372
16373+# Commands necessary for finishing linking programs.
16374+postlink_cmds=$lt_postlink_cmds
16375+
16376 # Specify filename containing input files.
16377 file_list_spec=$lt_file_list_spec
16378
16379@@ -14180,210 +14885,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
16380 # if finds mixed CR/LF and LF-only lines. Since sed operates in
16381 # text mode, it properly converts lines to CR/LF. This bash problem
16382 # is reportedly fixed, but why not run on old versions too?
16383- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
16384- || (rm -f "$cfgfile"; exit 1)
16385-
16386- case $xsi_shell in
16387- yes)
16388- cat << \_LT_EOF >> "$cfgfile"
16389-
16390-# func_dirname file append nondir_replacement
16391-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
16392-# otherwise set result to NONDIR_REPLACEMENT.
16393-func_dirname ()
16394-{
16395- case ${1} in
16396- */*) func_dirname_result="${1%/*}${2}" ;;
16397- * ) func_dirname_result="${3}" ;;
16398- esac
16399-}
16400-
16401-# func_basename file
16402-func_basename ()
16403-{
16404- func_basename_result="${1##*/}"
16405-}
16406-
16407-# func_dirname_and_basename file append nondir_replacement
16408-# perform func_basename and func_dirname in a single function
16409-# call:
16410-# dirname: Compute the dirname of FILE. If nonempty,
16411-# add APPEND to the result, otherwise set result
16412-# to NONDIR_REPLACEMENT.
16413-# value returned in "$func_dirname_result"
16414-# basename: Compute filename of FILE.
16415-# value retuned in "$func_basename_result"
16416-# Implementation must be kept synchronized with func_dirname
16417-# and func_basename. For efficiency, we do not delegate to
16418-# those functions but instead duplicate the functionality here.
16419-func_dirname_and_basename ()
16420-{
16421- case ${1} in
16422- */*) func_dirname_result="${1%/*}${2}" ;;
16423- * ) func_dirname_result="${3}" ;;
16424- esac
16425- func_basename_result="${1##*/}"
16426-}
16427-
16428-# func_stripname prefix suffix name
16429-# strip PREFIX and SUFFIX off of NAME.
16430-# PREFIX and SUFFIX must not contain globbing or regex special
16431-# characters, hashes, percent signs, but SUFFIX may contain a leading
16432-# dot (in which case that matches only a dot).
16433-func_stripname ()
16434-{
16435- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
16436- # positional parameters, so assign one to ordinary parameter first.
16437- func_stripname_result=${3}
16438- func_stripname_result=${func_stripname_result#"${1}"}
16439- func_stripname_result=${func_stripname_result%"${2}"}
16440-}
16441-
16442-# func_opt_split
16443-func_opt_split ()
16444-{
16445- func_opt_split_opt=${1%%=*}
16446- func_opt_split_arg=${1#*=}
16447-}
16448-
16449-# func_lo2o object
16450-func_lo2o ()
16451-{
16452- case ${1} in
16453- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
16454- *) func_lo2o_result=${1} ;;
16455- esac
16456-}
16457-
16458-# func_xform libobj-or-source
16459-func_xform ()
16460-{
16461- func_xform_result=${1%.*}.lo
16462-}
16463-
16464-# func_arith arithmetic-term...
16465-func_arith ()
16466-{
16467- func_arith_result=$(( $* ))
16468-}
16469-
16470-# func_len string
16471-# STRING may not start with a hyphen.
16472-func_len ()
16473-{
16474- func_len_result=${#1}
16475-}
16476-
16477-_LT_EOF
16478- ;;
16479- *) # Bourne compatible functions.
16480- cat << \_LT_EOF >> "$cfgfile"
16481-
16482-# func_dirname file append nondir_replacement
16483-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
16484-# otherwise set result to NONDIR_REPLACEMENT.
16485-func_dirname ()
16486-{
16487- # Extract subdirectory from the argument.
16488- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
16489- if test "X$func_dirname_result" = "X${1}"; then
16490- func_dirname_result="${3}"
16491- else
16492- func_dirname_result="$func_dirname_result${2}"
16493- fi
16494-}
16495-
16496-# func_basename file
16497-func_basename ()
16498-{
16499- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
16500-}
16501-
16502-
16503-# func_stripname prefix suffix name
16504-# strip PREFIX and SUFFIX off of NAME.
16505-# PREFIX and SUFFIX must not contain globbing or regex special
16506-# characters, hashes, percent signs, but SUFFIX may contain a leading
16507-# dot (in which case that matches only a dot).
16508-# func_strip_suffix prefix name
16509-func_stripname ()
16510-{
16511- case ${2} in
16512- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
16513- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
16514- esac
16515-}
16516-
16517-# sed scripts:
16518-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
16519-my_sed_long_arg='1s/^-[^=]*=//'
16520-
16521-# func_opt_split
16522-func_opt_split ()
16523-{
16524- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
16525- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
16526-}
16527-
16528-# func_lo2o object
16529-func_lo2o ()
16530-{
16531- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
16532-}
16533-
16534-# func_xform libobj-or-source
16535-func_xform ()
16536-{
16537- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
16538-}
16539-
16540-# func_arith arithmetic-term...
16541-func_arith ()
16542-{
16543- func_arith_result=`expr "$@"`
16544-}
16545-
16546-# func_len string
16547-# STRING may not start with a hyphen.
16548-func_len ()
16549-{
16550- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
16551-}
16552-
16553-_LT_EOF
16554-esac
16555-
16556-case $lt_shell_append in
16557- yes)
16558- cat << \_LT_EOF >> "$cfgfile"
16559-
16560-# func_append var value
16561-# Append VALUE to the end of shell variable VAR.
16562-func_append ()
16563-{
16564- eval "$1+=\$2"
16565-}
16566-_LT_EOF
16567- ;;
16568- *)
16569- cat << \_LT_EOF >> "$cfgfile"
16570-
16571-# func_append var value
16572-# Append VALUE to the end of shell variable VAR.
16573-func_append ()
16574-{
16575- eval "$1=\$$1\$2"
16576-}
16577-
16578-_LT_EOF
16579- ;;
16580- esac
16581+ sed '$q' "$ltmain" >> "$cfgfile" \
16582+ || (rm -f "$cfgfile"; exit 1)
16583
16584+ if test x"$xsi_shell" = xyes; then
16585+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
16586+func_dirname ()\
16587+{\
16588+\ case ${1} in\
16589+\ */*) func_dirname_result="${1%/*}${2}" ;;\
16590+\ * ) func_dirname_result="${3}" ;;\
16591+\ esac\
16592+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
16593+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16594+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16595+test 0 -eq $? || _lt_function_replace_fail=:
16596+
16597+
16598+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
16599+func_basename ()\
16600+{\
16601+\ func_basename_result="${1##*/}"\
16602+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
16603+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16604+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16605+test 0 -eq $? || _lt_function_replace_fail=:
16606+
16607+
16608+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
16609+func_dirname_and_basename ()\
16610+{\
16611+\ case ${1} in\
16612+\ */*) func_dirname_result="${1%/*}${2}" ;;\
16613+\ * ) func_dirname_result="${3}" ;;\
16614+\ esac\
16615+\ func_basename_result="${1##*/}"\
16616+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
16617+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16618+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16619+test 0 -eq $? || _lt_function_replace_fail=:
16620+
16621+
16622+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
16623+func_stripname ()\
16624+{\
16625+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
16626+\ # positional parameters, so assign one to ordinary parameter first.\
16627+\ func_stripname_result=${3}\
16628+\ func_stripname_result=${func_stripname_result#"${1}"}\
16629+\ func_stripname_result=${func_stripname_result%"${2}"}\
16630+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
16631+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16632+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16633+test 0 -eq $? || _lt_function_replace_fail=:
16634+
16635+
16636+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
16637+func_split_long_opt ()\
16638+{\
16639+\ func_split_long_opt_name=${1%%=*}\
16640+\ func_split_long_opt_arg=${1#*=}\
16641+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
16642+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16643+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16644+test 0 -eq $? || _lt_function_replace_fail=:
16645+
16646+
16647+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
16648+func_split_short_opt ()\
16649+{\
16650+\ func_split_short_opt_arg=${1#??}\
16651+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
16652+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
16653+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16654+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16655+test 0 -eq $? || _lt_function_replace_fail=:
16656+
16657+
16658+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
16659+func_lo2o ()\
16660+{\
16661+\ case ${1} in\
16662+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
16663+\ *) func_lo2o_result=${1} ;;\
16664+\ esac\
16665+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
16666+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16667+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16668+test 0 -eq $? || _lt_function_replace_fail=:
16669+
16670+
16671+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
16672+func_xform ()\
16673+{\
16674+ func_xform_result=${1%.*}.lo\
16675+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
16676+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16677+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16678+test 0 -eq $? || _lt_function_replace_fail=:
16679+
16680+
16681+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
16682+func_arith ()\
16683+{\
16684+ func_arith_result=$(( $* ))\
16685+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
16686+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16687+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16688+test 0 -eq $? || _lt_function_replace_fail=:
16689+
16690+
16691+ sed -e '/^func_len ()$/,/^} # func_len /c\
16692+func_len ()\
16693+{\
16694+ func_len_result=${#1}\
16695+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
16696+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16697+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16698+test 0 -eq $? || _lt_function_replace_fail=:
16699+
16700+fi
16701+
16702+if test x"$lt_shell_append" = xyes; then
16703+ sed -e '/^func_append ()$/,/^} # func_append /c\
16704+func_append ()\
16705+{\
16706+ eval "${1}+=\\${2}"\
16707+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
16708+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16709+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16710+test 0 -eq $? || _lt_function_replace_fail=:
16711+
16712+
16713+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
16714+func_append_quoted ()\
16715+{\
16716+\ func_quote_for_eval "${2}"\
16717+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
16718+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
16719+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16720+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16721+test 0 -eq $? || _lt_function_replace_fail=:
16722+
16723+
16724+ # Save a `func_append' function call where possible by direct use of '+='
16725+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
16726+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16727+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16728+ test 0 -eq $? || _lt_function_replace_fail=:
16729+else
16730+ # Save a `func_append' function call even when '+=' is not available
16731+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
16732+ && mv -f "$cfgfile.tmp" "$cfgfile" \
16733+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
16734+ test 0 -eq $? || _lt_function_replace_fail=:
16735+fi
16736+
16737+if test x"$_lt_function_replace_fail" = x":"; then
16738+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
16739+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
16740+fi
16741
16742- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
16743- || (rm -f "$cfgfile"; exit 1)
16744
16745- mv -f "$cfgfile" "$ofile" ||
16746+ mv -f "$cfgfile" "$ofile" ||
16747 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
16748 chmod +x "$ofile"
16749
16750Index: binutils-2.21.1/ld/configure
16751===================================================================
16752--- binutils-2.21.1.orig/ld/configure
16753+++ binutils-2.21.1/ld/configure
16754@@ -644,8 +644,11 @@ OTOOL
16755 LIPO
16756 NMEDIT
16757 DSYMUTIL
16758+MANIFEST_TOOL
16759 RANLIB
16760+ac_ct_AR
16761 AR
16762+DLLTOOL
16763 OBJDUMP
16764 LN_S
16765 NM
16766@@ -783,6 +786,7 @@ enable_static
16767 with_pic
16768 enable_fast_install
16769 with_gnu_ld
16770+with_libtool_sysroot
16771 enable_libtool_lock
16772 enable_nls
16773 '
16774@@ -1447,6 +1451,8 @@ Optional Packages:
16775 --with-pic try to use only PIC/non-PIC objects [default=use
16776 both]
16777 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
16778+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
16779+ (or the compiler's sysroot if not specified).
16780
16781 Some influential environment variables:
16782 CC C compiler command
16783@@ -6081,8 +6087,8 @@ esac
16784
16785
16786
16787-macro_version='2.2.7a'
16788-macro_revision='1.3134'
16789+macro_version='2.4'
16790+macro_revision='1.3293'
16791
16792
16793
16794@@ -6122,7 +6128,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
16795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
16796 $as_echo_n "checking how to print strings... " >&6; }
16797 # Test print first, because it will be a builtin if present.
16798-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
16799+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
16800 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
16801 ECHO='print -r --'
16802 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
16803@@ -6808,8 +6814,8 @@ $as_echo_n "checking whether the shell u
16804 # Try some XSI features
16805 xsi_shell=no
16806 ( _lt_dummy="a/b/c"
16807- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
16808- = c,a/b,, \
16809+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
16810+ = c,a/b,b/c, \
16811 && eval 'test $(( 1 + 1 )) -eq 2 \
16812 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
16813 && xsi_shell=yes
16814@@ -6858,6 +6864,80 @@ esac
16815
16816
16817
16818+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
16819+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
16820+if test "${lt_cv_to_host_file_cmd+set}" = set; then :
16821+ $as_echo_n "(cached) " >&6
16822+else
16823+ case $host in
16824+ *-*-mingw* )
16825+ case $build in
16826+ *-*-mingw* ) # actually msys
16827+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
16828+ ;;
16829+ *-*-cygwin* )
16830+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
16831+ ;;
16832+ * ) # otherwise, assume *nix
16833+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
16834+ ;;
16835+ esac
16836+ ;;
16837+ *-*-cygwin* )
16838+ case $build in
16839+ *-*-mingw* ) # actually msys
16840+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
16841+ ;;
16842+ *-*-cygwin* )
16843+ lt_cv_to_host_file_cmd=func_convert_file_noop
16844+ ;;
16845+ * ) # otherwise, assume *nix
16846+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
16847+ ;;
16848+ esac
16849+ ;;
16850+ * ) # unhandled hosts (and "normal" native builds)
16851+ lt_cv_to_host_file_cmd=func_convert_file_noop
16852+ ;;
16853+esac
16854+
16855+fi
16856+
16857+to_host_file_cmd=$lt_cv_to_host_file_cmd
16858+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
16859+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
16860+
16861+
16862+
16863+
16864+
16865+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
16866+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
16867+if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
16868+ $as_echo_n "(cached) " >&6
16869+else
16870+ #assume ordinary cross tools, or native build.
16871+lt_cv_to_tool_file_cmd=func_convert_file_noop
16872+case $host in
16873+ *-*-mingw* )
16874+ case $build in
16875+ *-*-mingw* ) # actually msys
16876+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
16877+ ;;
16878+ esac
16879+ ;;
16880+esac
16881+
16882+fi
16883+
16884+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16885+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
16886+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
16887+
16888+
16889+
16890+
16891+
16892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
16893 $as_echo_n "checking for $LD option to reload object files... " >&6; }
16894 if test "${lt_cv_ld_reload_flag+set}" = set; then :
16895@@ -6874,6 +6954,11 @@ case $reload_flag in
16896 esac
16897 reload_cmds='$LD$reload_flag -o $output$reload_objs'
16898 case $host_os in
16899+ cygwin* | mingw* | pw32* | cegcc*)
16900+ if test "$GCC" != yes; then
16901+ reload_cmds=false
16902+ fi
16903+ ;;
16904 darwin*)
16905 if test "$GCC" = yes; then
16906 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
16907@@ -7042,7 +7127,8 @@ mingw* | pw32*)
16908 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16909 lt_cv_file_magic_cmd='func_win32_libid'
16910 else
16911- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
16912+ # Keep this pattern in sync with the one in func_win32_libid.
16913+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
16914 lt_cv_file_magic_cmd='$OBJDUMP -f'
16915 fi
16916 ;;
16917@@ -7196,6 +7282,21 @@ esac
16918 fi
16919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
16920 $as_echo "$lt_cv_deplibs_check_method" >&6; }
16921+
16922+file_magic_glob=
16923+want_nocaseglob=no
16924+if test "$build" = "$host"; then
16925+ case $host_os in
16926+ mingw* | pw32*)
16927+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
16928+ want_nocaseglob=yes
16929+ else
16930+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
16931+ fi
16932+ ;;
16933+ esac
16934+fi
16935+
16936 file_magic_cmd=$lt_cv_file_magic_cmd
16937 deplibs_check_method=$lt_cv_deplibs_check_method
16938 test -z "$deplibs_check_method" && deplibs_check_method=unknown
16939@@ -7211,9 +7312,162 @@ test -z "$deplibs_check_method" && depli
16940
16941
16942
16943+
16944+
16945+
16946+
16947+
16948+
16949+
16950+
16951+
16952+
16953 if test -n "$ac_tool_prefix"; then
16954- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
16955-set dummy ${ac_tool_prefix}ar; ac_word=$2
16956+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
16957+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
16958+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16959+$as_echo_n "checking for $ac_word... " >&6; }
16960+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
16961+ $as_echo_n "(cached) " >&6
16962+else
16963+ if test -n "$DLLTOOL"; then
16964+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
16965+else
16966+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16967+for as_dir in $PATH
16968+do
16969+ IFS=$as_save_IFS
16970+ test -z "$as_dir" && as_dir=.
16971+ for ac_exec_ext in '' $ac_executable_extensions; do
16972+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16973+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
16974+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16975+ break 2
16976+ fi
16977+done
16978+ done
16979+IFS=$as_save_IFS
16980+
16981+fi
16982+fi
16983+DLLTOOL=$ac_cv_prog_DLLTOOL
16984+if test -n "$DLLTOOL"; then
16985+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
16986+$as_echo "$DLLTOOL" >&6; }
16987+else
16988+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16989+$as_echo "no" >&6; }
16990+fi
16991+
16992+
16993+fi
16994+if test -z "$ac_cv_prog_DLLTOOL"; then
16995+ ac_ct_DLLTOOL=$DLLTOOL
16996+ # Extract the first word of "dlltool", so it can be a program name with args.
16997+set dummy dlltool; ac_word=$2
16998+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16999+$as_echo_n "checking for $ac_word... " >&6; }
17000+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
17001+ $as_echo_n "(cached) " >&6
17002+else
17003+ if test -n "$ac_ct_DLLTOOL"; then
17004+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
17005+else
17006+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17007+for as_dir in $PATH
17008+do
17009+ IFS=$as_save_IFS
17010+ test -z "$as_dir" && as_dir=.
17011+ for ac_exec_ext in '' $ac_executable_extensions; do
17012+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17013+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
17014+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17015+ break 2
17016+ fi
17017+done
17018+ done
17019+IFS=$as_save_IFS
17020+
17021+fi
17022+fi
17023+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
17024+if test -n "$ac_ct_DLLTOOL"; then
17025+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
17026+$as_echo "$ac_ct_DLLTOOL" >&6; }
17027+else
17028+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17029+$as_echo "no" >&6; }
17030+fi
17031+
17032+ if test "x$ac_ct_DLLTOOL" = x; then
17033+ DLLTOOL="false"
17034+ else
17035+ case $cross_compiling:$ac_tool_warned in
17036+yes:)
17037+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17038+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17039+ac_tool_warned=yes ;;
17040+esac
17041+ DLLTOOL=$ac_ct_DLLTOOL
17042+ fi
17043+else
17044+ DLLTOOL="$ac_cv_prog_DLLTOOL"
17045+fi
17046+
17047+test -z "$DLLTOOL" && DLLTOOL=dlltool
17048+
17049+
17050+
17051+
17052+
17053+
17054+
17055+
17056+
17057+
17058+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
17059+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
17060+if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
17061+ $as_echo_n "(cached) " >&6
17062+else
17063+ lt_cv_sharedlib_from_linklib_cmd='unknown'
17064+
17065+case $host_os in
17066+cygwin* | mingw* | pw32* | cegcc*)
17067+ # two different shell functions defined in ltmain.sh
17068+ # decide which to use based on capabilities of $DLLTOOL
17069+ case `$DLLTOOL --help 2>&1` in
17070+ *--identify-strict*)
17071+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
17072+ ;;
17073+ *)
17074+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
17075+ ;;
17076+ esac
17077+ ;;
17078+*)
17079+ # fallback: assume linklib IS sharedlib
17080+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
17081+ ;;
17082+esac
17083+
17084+fi
17085+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
17086+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
17087+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
17088+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
17089+
17090+
17091+
17092+
17093+
17094+
17095+
17096+if test -n "$ac_tool_prefix"; then
17097+ for ac_prog in ar
17098+ do
17099+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17100+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17102 $as_echo_n "checking for $ac_word... " >&6; }
17103 if test "${ac_cv_prog_AR+set}" = set; then :
17104@@ -7229,7 +7483,7 @@ do
17105 test -z "$as_dir" && as_dir=.
17106 for ac_exec_ext in '' $ac_executable_extensions; do
17107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17108- ac_cv_prog_AR="${ac_tool_prefix}ar"
17109+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
17110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17111 break 2
17112 fi
17113@@ -7249,11 +7503,15 @@ $as_echo "no" >&6; }
17114 fi
17115
17116
17117+ test -n "$AR" && break
17118+ done
17119 fi
17120-if test -z "$ac_cv_prog_AR"; then
17121+if test -z "$AR"; then
17122 ac_ct_AR=$AR
17123- # Extract the first word of "ar", so it can be a program name with args.
17124-set dummy ar; ac_word=$2
17125+ for ac_prog in ar
17126+do
17127+ # Extract the first word of "$ac_prog", so it can be a program name with args.
17128+set dummy $ac_prog; ac_word=$2
17129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17130 $as_echo_n "checking for $ac_word... " >&6; }
17131 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
17132@@ -7269,7 +7527,7 @@ do
17133 test -z "$as_dir" && as_dir=.
17134 for ac_exec_ext in '' $ac_executable_extensions; do
17135 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17136- ac_cv_prog_ac_ct_AR="ar"
17137+ ac_cv_prog_ac_ct_AR="$ac_prog"
17138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17139 break 2
17140 fi
17141@@ -7288,6 +7546,10 @@ else
17142 $as_echo "no" >&6; }
17143 fi
17144
17145+
17146+ test -n "$ac_ct_AR" && break
17147+done
17148+
17149 if test "x$ac_ct_AR" = x; then
17150 AR="false"
17151 else
17152@@ -7299,12 +7561,10 @@ ac_tool_warned=yes ;;
17153 esac
17154 AR=$ac_ct_AR
17155 fi
17156-else
17157- AR="$ac_cv_prog_AR"
17158 fi
17159
17160-test -z "$AR" && AR=ar
17161-test -z "$AR_FLAGS" && AR_FLAGS=cru
17162+: ${AR=ar}
17163+: ${AR_FLAGS=cru}
17164
17165
17166
17167@@ -7316,6 +7576,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
17168
17169
17170
17171+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
17172+$as_echo_n "checking for archiver @FILE support... " >&6; }
17173+if test "${lt_cv_ar_at_file+set}" = set; then :
17174+ $as_echo_n "(cached) " >&6
17175+else
17176+ lt_cv_ar_at_file=no
17177+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17178+/* end confdefs.h. */
17179+
17180+int
17181+main ()
17182+{
17183+
17184+ ;
17185+ return 0;
17186+}
17187+_ACEOF
17188+if ac_fn_c_try_compile "$LINENO"; then :
17189+ echo conftest.$ac_objext > conftest.lst
17190+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
17191+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17192+ (eval $lt_ar_try) 2>&5
17193+ ac_status=$?
17194+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17195+ test $ac_status = 0; }
17196+ if test "$ac_status" -eq 0; then
17197+ # Ensure the archiver fails upon bogus file names.
17198+ rm -f conftest.$ac_objext libconftest.a
17199+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17200+ (eval $lt_ar_try) 2>&5
17201+ ac_status=$?
17202+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17203+ test $ac_status = 0; }
17204+ if test "$ac_status" -ne 0; then
17205+ lt_cv_ar_at_file=@
17206+ fi
17207+ fi
17208+ rm -f conftest.* libconftest.a
17209+
17210+fi
17211+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17212+
17213+fi
17214+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
17215+$as_echo "$lt_cv_ar_at_file" >&6; }
17216+
17217+if test "x$lt_cv_ar_at_file" = xno; then
17218+ archiver_list_spec=
17219+else
17220+ archiver_list_spec=$lt_cv_ar_at_file
17221+fi
17222+
17223+
17224+
17225+
17226+
17227+
17228+
17229 if test -n "$ac_tool_prefix"; then
17230 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17231 set dummy ${ac_tool_prefix}strip; ac_word=$2
17232@@ -7650,8 +7968,8 @@ esac
17233 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
17234
17235 # Transform an extracted symbol line into symbol name and symbol address
17236-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
17237-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
17238+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
17239+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
17240
17241 # Handle CRLF in mingw tool chain
17242 opt_cr=
17243@@ -7687,6 +8005,7 @@ for ac_symprfx in "" "_"; do
17244 else
17245 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
17246 fi
17247+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
17248
17249 # Check to see that the pipe works correctly.
17250 pipe_works=no
17251@@ -7728,6 +8047,18 @@ _LT_EOF
17252 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
17253 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
17254 cat <<_LT_EOF > conftest.$ac_ext
17255+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
17256+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
17257+/* DATA imports from DLLs on WIN32 con't be const, because runtime
17258+ relocations are performed -- see ld's documentation on pseudo-relocs. */
17259+# define LT_DLSYM_CONST
17260+#elif defined(__osf__)
17261+/* This system does not cope well with relocations in const data. */
17262+# define LT_DLSYM_CONST
17263+#else
17264+# define LT_DLSYM_CONST const
17265+#endif
17266+
17267 #ifdef __cplusplus
17268 extern "C" {
17269 #endif
17270@@ -7739,7 +8070,7 @@ _LT_EOF
17271 cat <<_LT_EOF >> conftest.$ac_ext
17272
17273 /* The mapping between symbol names and symbols. */
17274-const struct {
17275+LT_DLSYM_CONST struct {
17276 const char *name;
17277 void *address;
17278 }
17279@@ -7765,8 +8096,8 @@ static const void *lt_preloaded_setup()
17280 _LT_EOF
17281 # Now try linking the two files.
17282 mv conftest.$ac_objext conftstm.$ac_objext
17283- lt_save_LIBS="$LIBS"
17284- lt_save_CFLAGS="$CFLAGS"
17285+ lt_globsym_save_LIBS=$LIBS
17286+ lt_globsym_save_CFLAGS=$CFLAGS
17287 LIBS="conftstm.$ac_objext"
17288 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
17289 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17290@@ -7776,8 +8107,8 @@ _LT_EOF
17291 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
17292 pipe_works=yes
17293 fi
17294- LIBS="$lt_save_LIBS"
17295- CFLAGS="$lt_save_CFLAGS"
17296+ LIBS=$lt_globsym_save_LIBS
17297+ CFLAGS=$lt_globsym_save_CFLAGS
17298 else
17299 echo "cannot find nm_test_func in $nlist" >&5
17300 fi
17301@@ -7814,6 +8145,21 @@ else
17302 $as_echo "ok" >&6; }
17303 fi
17304
17305+# Response file support.
17306+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17307+ nm_file_list_spec='@'
17308+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
17309+ nm_file_list_spec='@'
17310+fi
17311+
17312+
17313+
17314+
17315+
17316+
17317+
17318+
17319+
17320
17321
17322
17323@@ -7832,6 +8178,40 @@ fi
17324
17325
17326
17327+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17328+$as_echo_n "checking for sysroot... " >&6; }
17329+
17330+# Check whether --with-libtool-sysroot was given.
17331+if test "${with_libtool_sysroot+set}" = set; then :
17332+ withval=$with_libtool_sysroot;
17333+else
17334+ with_libtool_sysroot=no
17335+fi
17336+
17337+
17338+lt_sysroot=
17339+case ${with_libtool_sysroot} in #(
17340+ yes)
17341+ if test "$GCC" = yes; then
17342+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
17343+ fi
17344+ ;; #(
17345+ /*)
17346+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
17347+ ;; #(
17348+ no|'')
17349+ ;; #(
17350+ *)
17351+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
17352+$as_echo "${with_libtool_sysroot}" >&6; }
17353+ as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
17354+ ;;
17355+esac
17356+
17357+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
17358+$as_echo "${lt_sysroot:-no}" >&6; }
17359+
17360+
17361
17362
17363
17364@@ -8022,11 +8402,128 @@ sparc*-*solaris*)
17365 ;;
17366 esac
17367 fi
17368- rm -rf conftest*
17369- ;;
17370+ rm -rf conftest*
17371+ ;;
17372+esac
17373+
17374+need_locks="$enable_libtool_lock"
17375+
17376+if test -n "$ac_tool_prefix"; then
17377+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
17378+set dummy ${ac_tool_prefix}mt; ac_word=$2
17379+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17380+$as_echo_n "checking for $ac_word... " >&6; }
17381+if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
17382+ $as_echo_n "(cached) " >&6
17383+else
17384+ if test -n "$MANIFEST_TOOL"; then
17385+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
17386+else
17387+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17388+for as_dir in $PATH
17389+do
17390+ IFS=$as_save_IFS
17391+ test -z "$as_dir" && as_dir=.
17392+ for ac_exec_ext in '' $ac_executable_extensions; do
17393+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17394+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
17395+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17396+ break 2
17397+ fi
17398+done
17399+ done
17400+IFS=$as_save_IFS
17401+
17402+fi
17403+fi
17404+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
17405+if test -n "$MANIFEST_TOOL"; then
17406+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
17407+$as_echo "$MANIFEST_TOOL" >&6; }
17408+else
17409+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17410+$as_echo "no" >&6; }
17411+fi
17412+
17413+
17414+fi
17415+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
17416+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
17417+ # Extract the first word of "mt", so it can be a program name with args.
17418+set dummy mt; ac_word=$2
17419+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17420+$as_echo_n "checking for $ac_word... " >&6; }
17421+if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
17422+ $as_echo_n "(cached) " >&6
17423+else
17424+ if test -n "$ac_ct_MANIFEST_TOOL"; then
17425+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
17426+else
17427+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17428+for as_dir in $PATH
17429+do
17430+ IFS=$as_save_IFS
17431+ test -z "$as_dir" && as_dir=.
17432+ for ac_exec_ext in '' $ac_executable_extensions; do
17433+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17434+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
17435+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17436+ break 2
17437+ fi
17438+done
17439+ done
17440+IFS=$as_save_IFS
17441+
17442+fi
17443+fi
17444+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
17445+if test -n "$ac_ct_MANIFEST_TOOL"; then
17446+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
17447+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
17448+else
17449+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17450+$as_echo "no" >&6; }
17451+fi
17452+
17453+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
17454+ MANIFEST_TOOL=":"
17455+ else
17456+ case $cross_compiling:$ac_tool_warned in
17457+yes:)
17458+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17459+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17460+ac_tool_warned=yes ;;
17461 esac
17462+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
17463+ fi
17464+else
17465+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
17466+fi
17467+
17468+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
17469+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
17470+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
17471+if test "${lt_cv_path_mainfest_tool+set}" = set; then :
17472+ $as_echo_n "(cached) " >&6
17473+else
17474+ lt_cv_path_mainfest_tool=no
17475+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
17476+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
17477+ cat conftest.err >&5
17478+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
17479+ lt_cv_path_mainfest_tool=yes
17480+ fi
17481+ rm -f conftest*
17482+fi
17483+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
17484+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
17485+if test "x$lt_cv_path_mainfest_tool" != xyes; then
17486+ MANIFEST_TOOL=:
17487+fi
17488+
17489+
17490+
17491
17492-need_locks="$enable_libtool_lock"
17493
17494
17495 case $host_os in
17496@@ -8591,6 +9088,8 @@ _LT_EOF
17497 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
17498 echo "$AR cru libconftest.a conftest.o" >&5
17499 $AR cru libconftest.a conftest.o 2>&5
17500+ echo "$RANLIB libconftest.a" >&5
17501+ $RANLIB libconftest.a 2>&5
17502 cat > conftest.c << _LT_EOF
17503 int main() { return 0;}
17504 _LT_EOF
17505@@ -8787,7 +9286,8 @@ fi
17506 LIBTOOL_DEPS="$ltmain"
17507
17508 # Always use our own libtool.
17509-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
17510+LIBTOOL='$(SHELL) $(top_builddir)'
17511+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
17512
17513
17514
17515@@ -8876,7 +9376,7 @@ aix3*)
17516 esac
17517
17518 # Global variables:
17519-ofile=libtool
17520+ofile=${host_alias}-libtool
17521 can_build_shared=yes
17522
17523 # All known linkers require a `.a' archive for static linking (except MSVC,
17524@@ -9174,8 +9674,6 @@ fi
17525 lt_prog_compiler_pic=
17526 lt_prog_compiler_static=
17527
17528-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
17529-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
17530
17531 if test "$GCC" = yes; then
17532 lt_prog_compiler_wl='-Wl,'
17533@@ -9340,6 +9838,12 @@ $as_echo_n "checking for $compiler optio
17534 lt_prog_compiler_pic='--shared'
17535 lt_prog_compiler_static='--static'
17536 ;;
17537+ nagfor*)
17538+ # NAG Fortran compiler
17539+ lt_prog_compiler_wl='-Wl,-Wl,,'
17540+ lt_prog_compiler_pic='-PIC'
17541+ lt_prog_compiler_static='-Bstatic'
17542+ ;;
17543 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
17544 # Portland Group compilers (*not* the Pentium gcc compiler,
17545 # which looks to be a dead project)
17546@@ -9402,7 +9906,7 @@ $as_echo_n "checking for $compiler optio
17547 lt_prog_compiler_pic='-KPIC'
17548 lt_prog_compiler_static='-Bstatic'
17549 case $cc_basename in
17550- f77* | f90* | f95*)
17551+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
17552 lt_prog_compiler_wl='-Qoption ld ';;
17553 *)
17554 lt_prog_compiler_wl='-Wl,';;
17555@@ -9459,13 +9963,17 @@ case $host_os in
17556 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
17557 ;;
17558 esac
17559-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
17560-$as_echo "$lt_prog_compiler_pic" >&6; }
17561-
17562-
17563-
17564-
17565
17566+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
17567+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
17568+if test "${lt_cv_prog_compiler_pic+set}" = set; then :
17569+ $as_echo_n "(cached) " >&6
17570+else
17571+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
17572+fi
17573+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
17574+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
17575+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
17576
17577 #
17578 # Check to make sure the PIC flag actually works.
17579@@ -9526,6 +10034,11 @@ fi
17580
17581
17582
17583+
17584+
17585+
17586+
17587+
17588 #
17589 # Check to make sure the static flag actually works.
17590 #
17591@@ -9876,7 +10389,8 @@ _LT_EOF
17592 allow_undefined_flag=unsupported
17593 always_export_symbols=no
17594 enable_shared_with_static_runtimes=yes
17595- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17596+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
17597+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
17598
17599 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
17600 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17601@@ -9924,7 +10438,7 @@ _LT_EOF
17602 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
17603 && test "$tmp_diet" = no
17604 then
17605- tmp_addflag=
17606+ tmp_addflag=' $pic_flag'
17607 tmp_sharedflag='-shared'
17608 case $cc_basename,$host_cpu in
17609 pgcc*) # Portland Group C compiler
17610@@ -9975,12 +10489,12 @@ _LT_EOF
17611 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
17612 hardcode_libdir_flag_spec=
17613 hardcode_libdir_flag_spec_ld='-rpath $libdir'
17614- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
17615+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
17616 if test "x$supports_anon_versioning" = xyes; then
17617 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
17618 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17619 echo "local: *; };" >> $output_objdir/$libname.ver~
17620- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
17621+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
17622 fi
17623 ;;
17624 esac
17625@@ -9994,8 +10508,8 @@ _LT_EOF
17626 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17627 wlarc=
17628 else
17629- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17630- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17631+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17632+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17633 fi
17634 ;;
17635
17636@@ -10013,8 +10527,8 @@ _LT_EOF
17637
17638 _LT_EOF
17639 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17640- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17641- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17642+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17643+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17644 else
17645 ld_shlibs=no
17646 fi
17647@@ -10060,8 +10574,8 @@ _LT_EOF
17648
17649 *)
17650 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
17651- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17652- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17653+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17654+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17655 else
17656 ld_shlibs=no
17657 fi
17658@@ -10191,7 +10705,13 @@ _LT_EOF
17659 allow_undefined_flag='-berok'
17660 # Determine the default libpath from the value encoded in an
17661 # empty executable.
17662- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17663+ if test "${lt_cv_aix_libpath+set}" = set; then
17664+ aix_libpath=$lt_cv_aix_libpath
17665+else
17666+ if test "${lt_cv_aix_libpath_+set}" = set; then :
17667+ $as_echo_n "(cached) " >&6
17668+else
17669+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17670 /* end confdefs.h. */
17671
17672 int
17673@@ -10204,22 +10724,29 @@ main ()
17674 _ACEOF
17675 if ac_fn_c_try_link "$LINENO"; then :
17676
17677-lt_aix_libpath_sed='
17678- /Import File Strings/,/^$/ {
17679- /^0/ {
17680- s/^0 *\(.*\)$/\1/
17681- p
17682- }
17683- }'
17684-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17685-# Check for a 64-bit object if we didn't find anything.
17686-if test -z "$aix_libpath"; then
17687- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17688-fi
17689+ lt_aix_libpath_sed='
17690+ /Import File Strings/,/^$/ {
17691+ /^0/ {
17692+ s/^0 *\([^ ]*\) *$/\1/
17693+ p
17694+ }
17695+ }'
17696+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17697+ # Check for a 64-bit object if we didn't find anything.
17698+ if test -z "$lt_cv_aix_libpath_"; then
17699+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17700+ fi
17701 fi
17702 rm -f core conftest.err conftest.$ac_objext \
17703 conftest$ac_exeext conftest.$ac_ext
17704-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17705+ if test -z "$lt_cv_aix_libpath_"; then
17706+ lt_cv_aix_libpath_="/usr/lib:/lib"
17707+ fi
17708+
17709+fi
17710+
17711+ aix_libpath=$lt_cv_aix_libpath_
17712+fi
17713
17714 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17715 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
17716@@ -10231,7 +10758,13 @@ if test -z "$aix_libpath"; then aix_libp
17717 else
17718 # Determine the default libpath from the value encoded in an
17719 # empty executable.
17720- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17721+ if test "${lt_cv_aix_libpath+set}" = set; then
17722+ aix_libpath=$lt_cv_aix_libpath
17723+else
17724+ if test "${lt_cv_aix_libpath_+set}" = set; then :
17725+ $as_echo_n "(cached) " >&6
17726+else
17727+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17728 /* end confdefs.h. */
17729
17730 int
17731@@ -10244,22 +10777,29 @@ main ()
17732 _ACEOF
17733 if ac_fn_c_try_link "$LINENO"; then :
17734
17735-lt_aix_libpath_sed='
17736- /Import File Strings/,/^$/ {
17737- /^0/ {
17738- s/^0 *\(.*\)$/\1/
17739- p
17740- }
17741- }'
17742-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17743-# Check for a 64-bit object if we didn't find anything.
17744-if test -z "$aix_libpath"; then
17745- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17746-fi
17747+ lt_aix_libpath_sed='
17748+ /Import File Strings/,/^$/ {
17749+ /^0/ {
17750+ s/^0 *\([^ ]*\) *$/\1/
17751+ p
17752+ }
17753+ }'
17754+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17755+ # Check for a 64-bit object if we didn't find anything.
17756+ if test -z "$lt_cv_aix_libpath_"; then
17757+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17758+ fi
17759 fi
17760 rm -f core conftest.err conftest.$ac_objext \
17761 conftest$ac_exeext conftest.$ac_ext
17762-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17763+ if test -z "$lt_cv_aix_libpath_"; then
17764+ lt_cv_aix_libpath_="/usr/lib:/lib"
17765+ fi
17766+
17767+fi
17768+
17769+ aix_libpath=$lt_cv_aix_libpath_
17770+fi
17771
17772 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
17773 # Warning - without using the other run time loading flags,
17774@@ -10304,20 +10844,63 @@ if test -z "$aix_libpath"; then aix_libp
17775 # Microsoft Visual C++.
17776 # hardcode_libdir_flag_spec is actually meaningless, as there is
17777 # no search path for DLLs.
17778- hardcode_libdir_flag_spec=' '
17779- allow_undefined_flag=unsupported
17780- # Tell ltmain to make .lib files, not .a files.
17781- libext=lib
17782- # Tell ltmain to make .dll files, not .so files.
17783- shrext_cmds=".dll"
17784- # FIXME: Setting linknames here is a bad hack.
17785- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
17786- # The linker will automatically build a .lib file if we build a DLL.
17787- old_archive_from_new_cmds='true'
17788- # FIXME: Should let the user specify the lib program.
17789- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
17790- fix_srcfile_path='`cygpath -w "$srcfile"`'
17791- enable_shared_with_static_runtimes=yes
17792+ case $cc_basename in
17793+ cl*)
17794+ # Native MSVC
17795+ hardcode_libdir_flag_spec=' '
17796+ allow_undefined_flag=unsupported
17797+ always_export_symbols=yes
17798+ file_list_spec='@'
17799+ # Tell ltmain to make .lib files, not .a files.
17800+ libext=lib
17801+ # Tell ltmain to make .dll files, not .so files.
17802+ shrext_cmds=".dll"
17803+ # FIXME: Setting linknames here is a bad hack.
17804+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
17805+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17806+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
17807+ else
17808+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
17809+ fi~
17810+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
17811+ linknames='
17812+ # The linker will not automatically build a static lib if we build a DLL.
17813+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
17814+ enable_shared_with_static_runtimes=yes
17815+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17816+ # Don't use ranlib
17817+ old_postinstall_cmds='chmod 644 $oldlib'
17818+ postlink_cmds='lt_outputfile="@OUTPUT@"~
17819+ lt_tool_outputfile="@TOOL_OUTPUT@"~
17820+ case $lt_outputfile in
17821+ *.exe|*.EXE) ;;
17822+ *)
17823+ lt_outputfile="$lt_outputfile.exe"
17824+ lt_tool_outputfile="$lt_tool_outputfile.exe"
17825+ ;;
17826+ esac~
17827+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
17828+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
17829+ $RM "$lt_outputfile.manifest";
17830+ fi'
17831+ ;;
17832+ *)
17833+ # Assume MSVC wrapper
17834+ hardcode_libdir_flag_spec=' '
17835+ allow_undefined_flag=unsupported
17836+ # Tell ltmain to make .lib files, not .a files.
17837+ libext=lib
17838+ # Tell ltmain to make .dll files, not .so files.
17839+ shrext_cmds=".dll"
17840+ # FIXME: Setting linknames here is a bad hack.
17841+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
17842+ # The linker will automatically build a .lib file if we build a DLL.
17843+ old_archive_from_new_cmds='true'
17844+ # FIXME: Should let the user specify the lib program.
17845+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
17846+ enable_shared_with_static_runtimes=yes
17847+ ;;
17848+ esac
17849 ;;
17850
17851 darwin* | rhapsody*)
17852@@ -10382,7 +10965,7 @@ if test -z "$aix_libpath"; then aix_libp
17853
17854 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17855 freebsd* | dragonfly*)
17856- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17857+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17858 hardcode_libdir_flag_spec='-R$libdir'
17859 hardcode_direct=yes
17860 hardcode_shlibpath_var=no
17861@@ -10390,7 +10973,7 @@ if test -z "$aix_libpath"; then aix_libp
17862
17863 hpux9*)
17864 if test "$GCC" = yes; then
17865- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17866+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17867 else
17868 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17869 fi
17870@@ -10406,7 +10989,7 @@ if test -z "$aix_libpath"; then aix_libp
17871
17872 hpux10*)
17873 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
17874- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17875+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17876 else
17877 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17878 fi
17879@@ -10430,10 +11013,10 @@ if test -z "$aix_libpath"; then aix_libp
17880 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17881 ;;
17882 ia64*)
17883- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17884+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17885 ;;
17886 *)
17887- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17888+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17889 ;;
17890 esac
17891 else
17892@@ -10512,23 +11095,36 @@ fi
17893
17894 irix5* | irix6* | nonstopux*)
17895 if test "$GCC" = yes; then
17896- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17897+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17898 # Try to use the -exported_symbol ld option, if it does not
17899 # work, assume that -exports_file does not work either and
17900 # implicitly export all symbols.
17901- save_LDFLAGS="$LDFLAGS"
17902- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
17903- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17904+ # This should be the same for all languages, so no per-tag cache variable.
17905+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
17906+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
17907+if test "${lt_cv_irix_exported_symbol+set}" = set; then :
17908+ $as_echo_n "(cached) " >&6
17909+else
17910+ save_LDFLAGS="$LDFLAGS"
17911+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
17912+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17913 /* end confdefs.h. */
17914-int foo(void) {}
17915+int foo (void) { return 0; }
17916 _ACEOF
17917 if ac_fn_c_try_link "$LINENO"; then :
17918- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
17919-
17920+ lt_cv_irix_exported_symbol=yes
17921+else
17922+ lt_cv_irix_exported_symbol=no
17923 fi
17924 rm -f core conftest.err conftest.$ac_objext \
17925 conftest$ac_exeext conftest.$ac_ext
17926- LDFLAGS="$save_LDFLAGS"
17927+ LDFLAGS="$save_LDFLAGS"
17928+fi
17929+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
17930+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
17931+ if test "$lt_cv_irix_exported_symbol" = yes; then
17932+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
17933+ fi
17934 else
17935 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
17936 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
17937@@ -10613,7 +11209,7 @@ rm -f core conftest.err conftest.$ac_obj
17938 osf4* | osf5*) # as osf3* with the addition of -msym flag
17939 if test "$GCC" = yes; then
17940 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
17941- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17942+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17943 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
17944 else
17945 allow_undefined_flag=' -expect_unresolved \*'
17946@@ -10632,9 +11228,9 @@ rm -f core conftest.err conftest.$ac_obj
17947 no_undefined_flag=' -z defs'
17948 if test "$GCC" = yes; then
17949 wlarc='${wl}'
17950- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17951+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17952 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17953- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17954+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17955 else
17956 case `$CC -V 2>&1` in
17957 *"Compilers 5.0"*)
17958@@ -11210,8 +11806,9 @@ cygwin* | mingw* | pw32* | cegcc*)
17959 need_version=no
17960 need_lib_prefix=no
17961
17962- case $GCC,$host_os in
17963- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
17964+ case $GCC,$cc_basename in
17965+ yes,*)
17966+ # gcc
17967 library_names_spec='$libname.dll.a'
17968 # DLL is installed to $(libdir)/../bin by postinstall_cmds
17969 postinstall_cmds='base_file=`basename \${file}`~
17970@@ -11244,13 +11841,71 @@ cygwin* | mingw* | pw32* | cegcc*)
17971 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17972 ;;
17973 esac
17974+ dynamic_linker='Win32 ld.exe'
17975+ ;;
17976+
17977+ *,cl*)
17978+ # Native MSVC
17979+ libname_spec='$name'
17980+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17981+ library_names_spec='${libname}.dll.lib'
17982+
17983+ case $build_os in
17984+ mingw*)
17985+ sys_lib_search_path_spec=
17986+ lt_save_ifs=$IFS
17987+ IFS=';'
17988+ for lt_path in $LIB
17989+ do
17990+ IFS=$lt_save_ifs
17991+ # Let DOS variable expansion print the short 8.3 style file name.
17992+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
17993+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
17994+ done
17995+ IFS=$lt_save_ifs
17996+ # Convert to MSYS style.
17997+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
17998+ ;;
17999+ cygwin*)
18000+ # Convert to unix form, then to dos form, then back to unix form
18001+ # but this time dos style (no spaces!) so that the unix form looks
18002+ # like /cygdrive/c/PROGRA~1:/cygdr...
18003+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
18004+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
18005+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18006+ ;;
18007+ *)
18008+ sys_lib_search_path_spec="$LIB"
18009+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
18010+ # It is most probably a Windows format PATH.
18011+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18012+ else
18013+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18014+ fi
18015+ # FIXME: find the short name or the path components, as spaces are
18016+ # common. (e.g. "Program Files" -> "PROGRA~1")
18017+ ;;
18018+ esac
18019+
18020+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
18021+ postinstall_cmds='base_file=`basename \${file}`~
18022+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
18023+ dldir=$destdir/`dirname \$dlpath`~
18024+ test -d \$dldir || mkdir -p \$dldir~
18025+ $install_prog $dir/$dlname \$dldir/$dlname'
18026+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18027+ dlpath=$dir/\$dldll~
18028+ $RM \$dlpath'
18029+ shlibpath_overrides_runpath=yes
18030+ dynamic_linker='Win32 link.exe'
18031 ;;
18032
18033 *)
18034+ # Assume MSVC wrapper
18035 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18036+ dynamic_linker='Win32 ld.exe'
18037 ;;
18038 esac
18039- dynamic_linker='Win32 ld.exe'
18040 # FIXME: first we should search . and the directory the executable is in
18041 shlibpath_var=PATH
18042 ;;
18043@@ -11346,7 +12001,7 @@ haiku*)
18044 soname_spec='${libname}${release}${shared_ext}$major'
18045 shlibpath_var=LIBRARY_PATH
18046 shlibpath_overrides_runpath=yes
18047- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
18048+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
18049 hardcode_into_libs=yes
18050 ;;
18051
18052@@ -12142,7 +12797,7 @@ else
18053 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18054 lt_status=$lt_dlunknown
18055 cat > conftest.$ac_ext <<_LT_EOF
18056-#line 12145 "configure"
18057+#line $LINENO "configure"
18058 #include "confdefs.h"
18059
18060 #if HAVE_DLFCN_H
18061@@ -12186,10 +12841,10 @@ else
18062 /* When -fvisbility=hidden is used, assume the code has been annotated
18063 correspondingly for the symbols needed. */
18064 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18065-void fnord () __attribute__((visibility("default")));
18066+int fnord () __attribute__((visibility("default")));
18067 #endif
18068
18069-void fnord () { int i=42; }
18070+int fnord () { return 42; }
18071 int main ()
18072 {
18073 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18074@@ -12248,7 +12903,7 @@ else
18075 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18076 lt_status=$lt_dlunknown
18077 cat > conftest.$ac_ext <<_LT_EOF
18078-#line 12251 "configure"
18079+#line $LINENO "configure"
18080 #include "confdefs.h"
18081
18082 #if HAVE_DLFCN_H
18083@@ -12292,10 +12947,10 @@ else
18084 /* When -fvisbility=hidden is used, assume the code has been annotated
18085 correspondingly for the symbols needed. */
18086 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18087-void fnord () __attribute__((visibility("default")));
18088+int fnord () __attribute__((visibility("default")));
18089 #endif
18090
18091-void fnord () { int i=42; }
18092+int fnord () { return 42; }
18093 int main ()
18094 {
18095 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18096@@ -17606,13 +18261,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_
18097 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
18098 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
18099 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
18100+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
18101+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
18102 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
18103 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
18104 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
18105 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
18106 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
18107+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
18108+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
18109+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
18110+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
18111 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
18112 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
18113+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
18114 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
18115 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
18116 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
18117@@ -17627,14 +18289,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l
18118 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
18119 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
18120 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
18121+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
18122+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
18123 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
18124 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
18125 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
18126-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
18127 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
18128+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
18129 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
18130 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
18131 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
18132+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
18133 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
18134 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
18135 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
18136@@ -17667,12 +18332,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod
18137 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
18138 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
18139 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
18140-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
18141 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
18142 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
18143 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
18144 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
18145 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
18146+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
18147 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
18148 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
18149 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
18150@@ -17782,8 +18447,13 @@ reload_flag \
18151 OBJDUMP \
18152 deplibs_check_method \
18153 file_magic_cmd \
18154+file_magic_glob \
18155+want_nocaseglob \
18156+DLLTOOL \
18157+sharedlib_from_linklib_cmd \
18158 AR \
18159 AR_FLAGS \
18160+archiver_list_spec \
18161 STRIP \
18162 RANLIB \
18163 CC \
18164@@ -17793,12 +18463,14 @@ lt_cv_sys_global_symbol_pipe \
18165 lt_cv_sys_global_symbol_to_cdecl \
18166 lt_cv_sys_global_symbol_to_c_name_address \
18167 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
18168+nm_file_list_spec \
18169 lt_prog_compiler_no_builtin_flag \
18170-lt_prog_compiler_wl \
18171 lt_prog_compiler_pic \
18172+lt_prog_compiler_wl \
18173 lt_prog_compiler_static \
18174 lt_cv_prog_compiler_c_o \
18175 need_locks \
18176+MANIFEST_TOOL \
18177 DSYMUTIL \
18178 NMEDIT \
18179 LIPO \
18180@@ -17814,7 +18486,6 @@ no_undefined_flag \
18181 hardcode_libdir_flag_spec \
18182 hardcode_libdir_flag_spec_ld \
18183 hardcode_libdir_separator \
18184-fix_srcfile_path \
18185 exclude_expsyms \
18186 include_expsyms \
18187 file_list_spec \
18188@@ -17883,6 +18554,7 @@ module_cmds \
18189 module_expsym_cmds \
18190 export_symbols_cmds \
18191 prelink_cmds \
18192+postlink_cmds \
18193 postinstall_cmds \
18194 postuninstall_cmds \
18195 finish_cmds \
18196@@ -18690,7 +19362,8 @@ $as_echo X"$file" |
18197 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
18198 #
18199 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
18200-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
18201+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
18202+# Inc.
18203 # Written by Gordon Matzigkeit, 1996
18204 #
18205 # This file is part of GNU Libtool.
18206@@ -18793,19 +19466,42 @@ SP2NL=$lt_lt_SP2NL
18207 # turn newlines into spaces.
18208 NL2SP=$lt_lt_NL2SP
18209
18210+# convert \$build file names to \$host format.
18211+to_host_file_cmd=$lt_cv_to_host_file_cmd
18212+
18213+# convert \$build files to toolchain format.
18214+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
18215+
18216 # An object symbol dumper.
18217 OBJDUMP=$lt_OBJDUMP
18218
18219 # Method to check whether dependent libraries are shared objects.
18220 deplibs_check_method=$lt_deplibs_check_method
18221
18222-# Command to use when deplibs_check_method == "file_magic".
18223+# Command to use when deplibs_check_method = "file_magic".
18224 file_magic_cmd=$lt_file_magic_cmd
18225
18226+# How to find potential files when deplibs_check_method = "file_magic".
18227+file_magic_glob=$lt_file_magic_glob
18228+
18229+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
18230+want_nocaseglob=$lt_want_nocaseglob
18231+
18232+# DLL creation program.
18233+DLLTOOL=$lt_DLLTOOL
18234+
18235+# Command to associate shared and link libraries.
18236+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
18237+
18238 # The archiver.
18239 AR=$lt_AR
18240+
18241+# Flags to create an archive.
18242 AR_FLAGS=$lt_AR_FLAGS
18243
18244+# How to feed a file listing to the archiver.
18245+archiver_list_spec=$lt_archiver_list_spec
18246+
18247 # A symbol stripping program.
18248 STRIP=$lt_STRIP
18249
18250@@ -18835,6 +19531,12 @@ global_symbol_to_c_name_address=$lt_lt_c
18251 # Transform the output of nm in a C name address pair when lib prefix is needed.
18252 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
18253
18254+# Specify filename containing input files for \$NM.
18255+nm_file_list_spec=$lt_nm_file_list_spec
18256+
18257+# The root where to search for dependent libraries,and in which our libraries should be installed.
18258+lt_sysroot=$lt_sysroot
18259+
18260 # The name of the directory that contains temporary libtool files.
18261 objdir=$objdir
18262
18263@@ -18844,6 +19546,9 @@ MAGIC_CMD=$MAGIC_CMD
18264 # Must we lock files when doing compilation?
18265 need_locks=$lt_need_locks
18266
18267+# Manifest tool.
18268+MANIFEST_TOOL=$lt_MANIFEST_TOOL
18269+
18270 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
18271 DSYMUTIL=$lt_DSYMUTIL
18272
18273@@ -18958,12 +19663,12 @@ with_gcc=$GCC
18274 # Compiler flag to turn off builtin functions.
18275 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
18276
18277-# How to pass a linker flag through the compiler.
18278-wl=$lt_lt_prog_compiler_wl
18279-
18280 # Additional compiler flags for building library objects.
18281 pic_flag=$lt_lt_prog_compiler_pic
18282
18283+# How to pass a linker flag through the compiler.
18284+wl=$lt_lt_prog_compiler_wl
18285+
18286 # Compiler flag to prevent dynamic linking.
18287 link_static_flag=$lt_lt_prog_compiler_static
18288
18289@@ -19050,9 +19755,6 @@ inherit_rpath=$inherit_rpath
18290 # Whether libtool must link a program against all its dependency libraries.
18291 link_all_deplibs=$link_all_deplibs
18292
18293-# Fix the shell variable \$srcfile for the compiler.
18294-fix_srcfile_path=$lt_fix_srcfile_path
18295-
18296 # Set to "yes" if exported symbols are required.
18297 always_export_symbols=$always_export_symbols
18298
18299@@ -19068,6 +19770,9 @@ include_expsyms=$lt_include_expsyms
18300 # Commands necessary for linking programs (against libraries) with templates.
18301 prelink_cmds=$lt_prelink_cmds
18302
18303+# Commands necessary for finishing linking programs.
18304+postlink_cmds=$lt_postlink_cmds
18305+
18306 # Specify filename containing input files.
18307 file_list_spec=$lt_file_list_spec
18308
18309@@ -19114,210 +19819,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
18310 # if finds mixed CR/LF and LF-only lines. Since sed operates in
18311 # text mode, it properly converts lines to CR/LF. This bash problem
18312 # is reportedly fixed, but why not run on old versions too?
18313- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
18314- || (rm -f "$cfgfile"; exit 1)
18315-
18316- case $xsi_shell in
18317- yes)
18318- cat << \_LT_EOF >> "$cfgfile"
18319-
18320-# func_dirname file append nondir_replacement
18321-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
18322-# otherwise set result to NONDIR_REPLACEMENT.
18323-func_dirname ()
18324-{
18325- case ${1} in
18326- */*) func_dirname_result="${1%/*}${2}" ;;
18327- * ) func_dirname_result="${3}" ;;
18328- esac
18329-}
18330-
18331-# func_basename file
18332-func_basename ()
18333-{
18334- func_basename_result="${1##*/}"
18335-}
18336-
18337-# func_dirname_and_basename file append nondir_replacement
18338-# perform func_basename and func_dirname in a single function
18339-# call:
18340-# dirname: Compute the dirname of FILE. If nonempty,
18341-# add APPEND to the result, otherwise set result
18342-# to NONDIR_REPLACEMENT.
18343-# value returned in "$func_dirname_result"
18344-# basename: Compute filename of FILE.
18345-# value retuned in "$func_basename_result"
18346-# Implementation must be kept synchronized with func_dirname
18347-# and func_basename. For efficiency, we do not delegate to
18348-# those functions but instead duplicate the functionality here.
18349-func_dirname_and_basename ()
18350-{
18351- case ${1} in
18352- */*) func_dirname_result="${1%/*}${2}" ;;
18353- * ) func_dirname_result="${3}" ;;
18354- esac
18355- func_basename_result="${1##*/}"
18356-}
18357-
18358-# func_stripname prefix suffix name
18359-# strip PREFIX and SUFFIX off of NAME.
18360-# PREFIX and SUFFIX must not contain globbing or regex special
18361-# characters, hashes, percent signs, but SUFFIX may contain a leading
18362-# dot (in which case that matches only a dot).
18363-func_stripname ()
18364-{
18365- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
18366- # positional parameters, so assign one to ordinary parameter first.
18367- func_stripname_result=${3}
18368- func_stripname_result=${func_stripname_result#"${1}"}
18369- func_stripname_result=${func_stripname_result%"${2}"}
18370-}
18371-
18372-# func_opt_split
18373-func_opt_split ()
18374-{
18375- func_opt_split_opt=${1%%=*}
18376- func_opt_split_arg=${1#*=}
18377-}
18378-
18379-# func_lo2o object
18380-func_lo2o ()
18381-{
18382- case ${1} in
18383- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
18384- *) func_lo2o_result=${1} ;;
18385- esac
18386-}
18387-
18388-# func_xform libobj-or-source
18389-func_xform ()
18390-{
18391- func_xform_result=${1%.*}.lo
18392-}
18393-
18394-# func_arith arithmetic-term...
18395-func_arith ()
18396-{
18397- func_arith_result=$(( $* ))
18398-}
18399-
18400-# func_len string
18401-# STRING may not start with a hyphen.
18402-func_len ()
18403-{
18404- func_len_result=${#1}
18405-}
18406-
18407-_LT_EOF
18408- ;;
18409- *) # Bourne compatible functions.
18410- cat << \_LT_EOF >> "$cfgfile"
18411-
18412-# func_dirname file append nondir_replacement
18413-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
18414-# otherwise set result to NONDIR_REPLACEMENT.
18415-func_dirname ()
18416-{
18417- # Extract subdirectory from the argument.
18418- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
18419- if test "X$func_dirname_result" = "X${1}"; then
18420- func_dirname_result="${3}"
18421- else
18422- func_dirname_result="$func_dirname_result${2}"
18423- fi
18424-}
18425-
18426-# func_basename file
18427-func_basename ()
18428-{
18429- func_basename_result=`$ECHO "${1}" | $SED "$basename"`
18430-}
18431-
18432-
18433-# func_stripname prefix suffix name
18434-# strip PREFIX and SUFFIX off of NAME.
18435-# PREFIX and SUFFIX must not contain globbing or regex special
18436-# characters, hashes, percent signs, but SUFFIX may contain a leading
18437-# dot (in which case that matches only a dot).
18438-# func_strip_suffix prefix name
18439-func_stripname ()
18440-{
18441- case ${2} in
18442- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
18443- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
18444- esac
18445-}
18446-
18447-# sed scripts:
18448-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
18449-my_sed_long_arg='1s/^-[^=]*=//'
18450-
18451-# func_opt_split
18452-func_opt_split ()
18453-{
18454- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
18455- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
18456-}
18457-
18458-# func_lo2o object
18459-func_lo2o ()
18460-{
18461- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
18462-}
18463-
18464-# func_xform libobj-or-source
18465-func_xform ()
18466-{
18467- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
18468-}
18469-
18470-# func_arith arithmetic-term...
18471-func_arith ()
18472-{
18473- func_arith_result=`expr "$@"`
18474-}
18475-
18476-# func_len string
18477-# STRING may not start with a hyphen.
18478-func_len ()
18479-{
18480- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
18481-}
18482-
18483-_LT_EOF
18484-esac
18485-
18486-case $lt_shell_append in
18487- yes)
18488- cat << \_LT_EOF >> "$cfgfile"
18489-
18490-# func_append var value
18491-# Append VALUE to the end of shell variable VAR.
18492-func_append ()
18493-{
18494- eval "$1+=\$2"
18495-}
18496-_LT_EOF
18497- ;;
18498- *)
18499- cat << \_LT_EOF >> "$cfgfile"
18500-
18501-# func_append var value
18502-# Append VALUE to the end of shell variable VAR.
18503-func_append ()
18504-{
18505- eval "$1=\$$1\$2"
18506-}
18507-
18508-_LT_EOF
18509- ;;
18510- esac
18511+ sed '$q' "$ltmain" >> "$cfgfile" \
18512+ || (rm -f "$cfgfile"; exit 1)
18513
18514+ if test x"$xsi_shell" = xyes; then
18515+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
18516+func_dirname ()\
18517+{\
18518+\ case ${1} in\
18519+\ */*) func_dirname_result="${1%/*}${2}" ;;\
18520+\ * ) func_dirname_result="${3}" ;;\
18521+\ esac\
18522+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
18523+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18524+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18525+test 0 -eq $? || _lt_function_replace_fail=:
18526+
18527+
18528+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
18529+func_basename ()\
18530+{\
18531+\ func_basename_result="${1##*/}"\
18532+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
18533+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18534+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18535+test 0 -eq $? || _lt_function_replace_fail=:
18536+
18537+
18538+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
18539+func_dirname_and_basename ()\
18540+{\
18541+\ case ${1} in\
18542+\ */*) func_dirname_result="${1%/*}${2}" ;;\
18543+\ * ) func_dirname_result="${3}" ;;\
18544+\ esac\
18545+\ func_basename_result="${1##*/}"\
18546+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
18547+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18548+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18549+test 0 -eq $? || _lt_function_replace_fail=:
18550+
18551+
18552+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
18553+func_stripname ()\
18554+{\
18555+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
18556+\ # positional parameters, so assign one to ordinary parameter first.\
18557+\ func_stripname_result=${3}\
18558+\ func_stripname_result=${func_stripname_result#"${1}"}\
18559+\ func_stripname_result=${func_stripname_result%"${2}"}\
18560+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
18561+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18562+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18563+test 0 -eq $? || _lt_function_replace_fail=:
18564+
18565+
18566+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
18567+func_split_long_opt ()\
18568+{\
18569+\ func_split_long_opt_name=${1%%=*}\
18570+\ func_split_long_opt_arg=${1#*=}\
18571+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
18572+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18573+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18574+test 0 -eq $? || _lt_function_replace_fail=:
18575+
18576+
18577+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
18578+func_split_short_opt ()\
18579+{\
18580+\ func_split_short_opt_arg=${1#??}\
18581+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
18582+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
18583+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18584+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18585+test 0 -eq $? || _lt_function_replace_fail=:
18586+
18587+
18588+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
18589+func_lo2o ()\
18590+{\
18591+\ case ${1} in\
18592+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
18593+\ *) func_lo2o_result=${1} ;;\
18594+\ esac\
18595+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
18596+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18597+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18598+test 0 -eq $? || _lt_function_replace_fail=:
18599+
18600+
18601+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
18602+func_xform ()\
18603+{\
18604+ func_xform_result=${1%.*}.lo\
18605+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
18606+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18607+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18608+test 0 -eq $? || _lt_function_replace_fail=:
18609+
18610+
18611+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
18612+func_arith ()\
18613+{\
18614+ func_arith_result=$(( $* ))\
18615+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
18616+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18617+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18618+test 0 -eq $? || _lt_function_replace_fail=:
18619+
18620+
18621+ sed -e '/^func_len ()$/,/^} # func_len /c\
18622+func_len ()\
18623+{\
18624+ func_len_result=${#1}\
18625+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
18626+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18627+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18628+test 0 -eq $? || _lt_function_replace_fail=:
18629+
18630+fi
18631+
18632+if test x"$lt_shell_append" = xyes; then
18633+ sed -e '/^func_append ()$/,/^} # func_append /c\
18634+func_append ()\
18635+{\
18636+ eval "${1}+=\\${2}"\
18637+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
18638+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18639+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18640+test 0 -eq $? || _lt_function_replace_fail=:
18641+
18642+
18643+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
18644+func_append_quoted ()\
18645+{\
18646+\ func_quote_for_eval "${2}"\
18647+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
18648+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
18649+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18650+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18651+test 0 -eq $? || _lt_function_replace_fail=:
18652+
18653+
18654+ # Save a `func_append' function call where possible by direct use of '+='
18655+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
18656+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18657+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18658+ test 0 -eq $? || _lt_function_replace_fail=:
18659+else
18660+ # Save a `func_append' function call even when '+=' is not available
18661+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
18662+ && mv -f "$cfgfile.tmp" "$cfgfile" \
18663+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
18664+ test 0 -eq $? || _lt_function_replace_fail=:
18665+fi
18666+
18667+if test x"$_lt_function_replace_fail" = x":"; then
18668+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
18669+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
18670+fi
18671
18672- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
18673- || (rm -f "$cfgfile"; exit 1)
18674
18675- mv -f "$cfgfile" "$ofile" ||
18676+ mv -f "$cfgfile" "$ofile" ||
18677 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
18678 chmod +x "$ofile"
18679
18680Index: binutils-2.21.1/bfd/configure.in
18681===================================================================
18682--- binutils-2.21.1.orig/bfd/configure.in
18683+++ binutils-2.21.1/bfd/configure.in
18684@@ -536,7 +536,7 @@ changequote(,)dnl
18685 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
18686 changequote([,])dnl
18687 if test -n "$x"; then
18688- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
18689+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a"
18690 fi
18691
18692 # More hacks to build DLLs on Windows.
18693Index: binutils-2.21.1/opcodes/configure.in
18694===================================================================
18695--- binutils-2.21.1.orig/opcodes/configure.in
18696+++ binutils-2.21.1/opcodes/configure.in
18697@@ -134,7 +134,7 @@ changequote(,)dnl
18698 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
18699 changequote([,])dnl
18700 if test -n "$x"; then
18701- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
18702+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a"
18703 fi
18704
18705 case "${host}" in
diff --git a/recipes-devtools/eglibc/eglibc-fsl.inc b/recipes-devtools/eglibc/eglibc-fsl.inc
deleted file mode 100644
index 88876f0..0000000
--- a/recipes-devtools/eglibc/eglibc-fsl.inc
+++ /dev/null
@@ -1,14 +0,0 @@
1SRC_URI_fsl = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \
2 file://glibc.undefined_static.patch \
3 file://glibc.fixgcc4.6.patch \
4 file://glibc.readv_proto.patch \
5 file://glibc.fix_sqrt.patch \
6 file://glibc.fix_prof.patch \
7 file://glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch \
8 file://etc/ld.so.conf \
9 file://generate-supported.mk \
10"
11
12FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
13
14PR_append_fsl = "+${DISTRO}.0"
diff --git a/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend b/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend
deleted file mode 100644
index 4f61361..0000000
--- a/recipes-devtools/eglibc/eglibc-initial_2.13.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require eglibc-fsl.inc
diff --git a/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend b/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend
deleted file mode 100644
index 4f61361..0000000
--- a/recipes-devtools/eglibc/eglibc-locale_2.13.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require eglibc-fsl.inc
diff --git a/recipes-devtools/eglibc/eglibc_2.13.bbappend b/recipes-devtools/eglibc/eglibc_2.13.bbappend
deleted file mode 100644
index 4f61361..0000000
--- a/recipes-devtools/eglibc/eglibc_2.13.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require eglibc-fsl.inc
diff --git a/recipes-devtools/eglibc/files/etc/ld.so.conf b/recipes-devtools/eglibc/files/etc/ld.so.conf
deleted file mode 100644
index e69de29..0000000
--- a/recipes-devtools/eglibc/files/etc/ld.so.conf
+++ /dev/null
diff --git a/recipes-devtools/eglibc/files/generate-supported.mk b/recipes-devtools/eglibc/files/generate-supported.mk
deleted file mode 100644
index d2a28c2..0000000
--- a/recipes-devtools/eglibc/files/generate-supported.mk
+++ /dev/null
@@ -1,11 +0,0 @@
1#!/usr/bin/make
2
3include $(IN)
4
5all:
6 rm -f $(OUT)
7 touch $(OUT)
8 for locale in $(SUPPORTED-LOCALES); do \
9 [ $$locale = true ] && continue; \
10 echo $$locale | sed 's,/, ,' >> $(OUT); \
11 done
diff --git a/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch b/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch
deleted file mode 100644
index 6feb76e..0000000
--- a/recipes-devtools/eglibc/files/glibc.e500mc_subspecies_of_powerpc_is_not_supported.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- a/configure 2012-03-05 07:00:49.600200254 -0600
2+++ b/configure 2012-03-05 07:01:13.249394037 -0600
3@@ -4581,7 +4581,7 @@
4 if test -z "$submachine_used" && test -n "$submachine"; then
5 { { $as_echo "$as_me:$LINENO: error: The $submachine subspecies of $host_cpu is not supported." >&5
6 $as_echo "$as_me: error: The $submachine subspecies of $host_cpu is not supported." >&2;}
7- { (exit 1); exit 1; }; }
8+ }
9 fi
10
11
diff --git a/recipes-devtools/eglibc/files/glibc.fix_prof.patch b/recipes-devtools/eglibc/files/glibc.fix_prof.patch
deleted file mode 100644
index 966e9e3..0000000
--- a/recipes-devtools/eglibc/files/glibc.fix_prof.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1diff -ruN libc-orig/elf/dl-runtime.c libc-e5500/elf/dl-runtime.c
2--- libc-orig/elf/dl-runtime.c 2011-12-08 04:25:09.201995061 -0600
3+++ libc-e5500/elf/dl-runtime.c 2011-12-08 04:26:12.760996794 -0600
4@@ -156,7 +156,7 @@
5 }
6 #endif
7
8-#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
9+#if !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
10 DL_FIXUP_VALUE_TYPE
11 __attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE
12 _dl_profile_fixup (
13@@ -425,7 +425,7 @@
14 return value;
15 }
16
17-#endif /* PROF && ELF_MACHINE_NO_PLT */
18+#endif /* ELF_MACHINE_NO_PLT */
19
20
21 #include <stdio.h>
22diff -ruN libc-orig/sysdeps/powerpc/powerpc32/dl-trampoline.S libc-e5500/sysdeps/powerpc/powerpc32/dl-trampoline.S
23--- libc-orig/sysdeps/powerpc/powerpc32/dl-trampoline.S 2011-12-08 04:25:12.103998210 -0600
24+++ libc-e5500/sysdeps/powerpc/powerpc32/dl-trampoline.S 2011-12-08 04:26:19.310748350 -0600
25@@ -71,7 +71,6 @@
26 cfi_endproc
27 .size _dl_runtime_resolve,.-_dl_runtime_resolve
28
29-#ifndef PROF
30 .align 2
31 .globl _dl_prof_resolve
32 .type _dl_prof_resolve,@function
33@@ -183,4 +182,4 @@
34 bctr
35 cfi_endproc
36 .size _dl_prof_resolve,.-_dl_prof_resolve
37-#endif
38+
diff --git a/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch b/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch
deleted file mode 100644
index a648b4f..0000000
--- a/recipes-devtools/eglibc/files/glibc.fix_sqrt.patch
+++ /dev/null
@@ -1,500 +0,0 @@
1Implements sqrt with fsqrte.
2Adds functions for 603e (also used for e300c3, e600 and e500mc)
3Adds functions for e5500 in 64 bit mode (also used for e6500)
4
5diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
6--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
7+++ libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2011-05-18 13:00:40.423986787 -0500
8@@ -0,0 +1,134 @@
9+/* Double-precision floating point square root.
10+ Copyright (C) 2010 Free Software Foundation, Inc.
11+ This file is part of the GNU C Library.
12+
13+ The GNU C Library is free software; you can redistribute it and/or
14+ modify it under the terms of the GNU Lesser General Public
15+ License as published by the Free Software Foundation; either
16+ version 2.1 of the License, or (at your option) any later version.
17+
18+ The GNU C Library is distributed in the hope that it will be useful,
19+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21+ Lesser General Public License for more details.
22+
23+ You should have received a copy of the GNU Lesser General Public
24+ License along with the GNU C Library; if not, write to the Free
25+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26+ 02111-1307 USA. */
27+
28+#include <math.h>
29+#include <math_private.h>
30+#include <fenv_libc.h>
31+#include <inttypes.h>
32+
33+#include <sysdep.h>
34+#include <ldsodefs.h>
35+
36+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
37+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
38+static const float two108 = 3.245185536584267269e+32;
39+static const float twom54 = 5.551115123125782702e-17;
40+static const float half = 0.5;
41+
42+/* The method is based on the descriptions in:
43+
44+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
45+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
46+
47+ We find the actual square root and half of its reciprocal
48+ simultaneously. */
49+
50+#ifdef __STDC__
51+double
52+__ieee754_sqrt (double b)
53+#else
54+double
55+__ieee754_sqrt (b)
56+ double b;
57+#endif
58+{
59+ if (__builtin_expect (b > 0, 1))
60+ {
61+ double y, g, h, d, r;
62+ ieee_double_shape_type u;
63+
64+ if (__builtin_expect (b != a_inf.value, 1))
65+ {
66+ fenv_t fe;
67+
68+ fe = fegetenv_register ();
69+
70+ u.value = b;
71+
72+ relax_fenv_state ();
73+
74+ __asm__ ("frsqrte %[estimate], %[x]\n"
75+ : [estimate] "=f" (y) : [x] "f" (b));
76+
77+ /* Following Muller et al, page 168, equation 5.20.
78+
79+ h goes to 1/(2*sqrt(b))
80+ g goes to sqrt(b).
81+
82+ We need three iterations to get within 1ulp. */
83+
84+ /* Indicate that these can be performed prior to the branch. GCC
85+ insists on sinking them below the branch, however; it seems like
86+ they'd be better before the branch so that we can cover any latency
87+ from storing the argument and loading its high word. Oh well. */
88+
89+ g = b * y;
90+ h = 0.5 * y;
91+
92+ /* Handle small numbers by scaling. */
93+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
94+ return __ieee754_sqrt (b * two108) * twom54;
95+
96+#define FMADD(a_, c_, b_) \
97+ ({ double __r; \
98+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
99+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
100+ __r;})
101+#define FNMSUB(a_, c_, b_) \
102+ ({ double __r; \
103+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
104+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
105+ __r;})
106+
107+ r = FNMSUB (g, h, half);
108+ g = FMADD (g, r, g);
109+ h = FMADD (h, r, h);
110+
111+ r = FNMSUB (g, h, half);
112+ g = FMADD (g, r, g);
113+ h = FMADD (h, r, h);
114+
115+ r = FNMSUB (g, h, half);
116+ g = FMADD (g, r, g);
117+ h = FMADD (h, r, h);
118+
119+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
120+
121+ /* Final refinement. */
122+ d = FNMSUB (g, g, b);
123+
124+ fesetenv_register (fe);
125+ return FMADD (d, h, g);
126+ }
127+ }
128+ else if (b < 0)
129+ {
130+ /* For some reason, some PowerPC32 processors don't implement
131+ FE_INVALID_SQRT. */
132+#ifdef FE_INVALID_SQRT
133+ feraiseexcept (FE_INVALID_SQRT);
134+
135+ fenv_union_t u = { .fenv = fegetenv_register () };
136+ if ((u.l[1] & FE_INVALID) == 0)
137+#endif
138+ feraiseexcept (FE_INVALID);
139+ b = a_nan.value;
140+ }
141+ return f_wash (b);
142+}
143diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
144--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
145+++ libc-e5500/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2011-05-18 13:00:40.423986787 -0500
146@@ -0,0 +1,101 @@
147+/* Single-precision floating point square root.
148+ Copyright (C) 2010 Free Software Foundation, Inc.
149+ This file is part of the GNU C Library.
150+
151+ The GNU C Library is free software; you can redistribute it and/or
152+ modify it under the terms of the GNU Lesser General Public
153+ License as published by the Free Software Foundation; either
154+ version 2.1 of the License, or (at your option) any later version.
155+
156+ The GNU C Library is distributed in the hope that it will be useful,
157+ but WITHOUT ANY WARRANTY; without even the implied warranty of
158+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
159+ Lesser General Public License for more details.
160+
161+ You should have received a copy of the GNU Lesser General Public
162+ License along with the GNU C Library; if not, write to the Free
163+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
164+ 02111-1307 USA. */
165+
166+#include <math.h>
167+#include <math_private.h>
168+#include <fenv_libc.h>
169+#include <inttypes.h>
170+
171+#include <sysdep.h>
172+#include <ldsodefs.h>
173+
174+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
175+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
176+static const float threehalf = 1.5;
177+
178+/* The method is based on the descriptions in:
179+
180+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
181+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
182+
183+ We find the reciprocal square root and use that to compute the actual
184+ square root. */
185+
186+#ifdef __STDC__
187+float
188+__ieee754_sqrtf (float b)
189+#else
190+float
191+__ieee754_sqrtf (b)
192+ float b;
193+#endif
194+{
195+ if (__builtin_expect (b > 0, 1))
196+ {
197+#define FMSUB(a_, c_, b_) \
198+ ({ double __r; \
199+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
200+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
201+ __r;})
202+#define FNMSUB(a_, c_, b_) \
203+ ({ double __r; \
204+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
205+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
206+ __r;})
207+
208+ if (__builtin_expect (b != a_inf.value, 1))
209+ {
210+ double y, x;
211+ fenv_t fe;
212+
213+ fe = fegetenv_register ();
214+
215+ relax_fenv_state ();
216+
217+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
218+ y = FMSUB (threehalf, b, b);
219+
220+ /* Initial estimate. */
221+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
222+
223+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
224+ x = x * FNMSUB (y, x * x, threehalf);
225+ x = x * FNMSUB (y, x * x, threehalf);
226+ x = x * FNMSUB (y, x * x, threehalf);
227+
228+ /* All done. */
229+ fesetenv_register (fe);
230+ return x * b;
231+ }
232+ }
233+ else if (b < 0)
234+ {
235+ /* For some reason, some PowerPC32 processors don't implement
236+ FE_INVALID_SQRT. */
237+#ifdef FE_INVALID_SQRT
238+ feraiseexcept (FE_INVALID_SQRT);
239+
240+ fenv_union_t u = { .fenv = fegetenv_register () };
241+ if ((u.l[1] & FE_INVALID) == 0)
242+#endif
243+ feraiseexcept (FE_INVALID);
244+ b = a_nan.value;
245+ }
246+ return f_washf (b);
247+}
248diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
249--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
250+++ libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2011-05-18 11:15:22.467987000 -0500
251@@ -0,0 +1,134 @@
252+/* Double-precision floating point square root.
253+ Copyright (C) 2010 Free Software Foundation, Inc.
254+ This file is part of the GNU C Library.
255+
256+ The GNU C Library is free software; you can redistribute it and/or
257+ modify it under the terms of the GNU Lesser General Public
258+ License as published by the Free Software Foundation; either
259+ version 2.1 of the License, or (at your option) any later version.
260+
261+ The GNU C Library is distributed in the hope that it will be useful,
262+ but WITHOUT ANY WARRANTY; without even the implied warranty of
263+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
264+ Lesser General Public License for more details.
265+
266+ You should have received a copy of the GNU Lesser General Public
267+ License along with the GNU C Library; if not, write to the Free
268+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
269+ 02111-1307 USA. */
270+
271+#include <math.h>
272+#include <math_private.h>
273+#include <fenv_libc.h>
274+#include <inttypes.h>
275+
276+#include <sysdep.h>
277+#include <ldsodefs.h>
278+
279+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
280+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
281+static const float two108 = 3.245185536584267269e+32;
282+static const float twom54 = 5.551115123125782702e-17;
283+static const float half = 0.5;
284+
285+/* The method is based on the descriptions in:
286+
287+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
288+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
289+
290+ We find the actual square root and half of its reciprocal
291+ simultaneously. */
292+
293+#ifdef __STDC__
294+double
295+__ieee754_sqrt (double b)
296+#else
297+double
298+__ieee754_sqrt (b)
299+ double b;
300+#endif
301+{
302+ if (__builtin_expect (b > 0, 1))
303+ {
304+ double y, g, h, d, r;
305+ ieee_double_shape_type u;
306+
307+ if (__builtin_expect (b != a_inf.value, 1))
308+ {
309+ fenv_t fe;
310+
311+ fe = fegetenv_register ();
312+
313+ u.value = b;
314+
315+ relax_fenv_state ();
316+
317+ __asm__ ("frsqrte %[estimate], %[x]\n"
318+ : [estimate] "=f" (y) : [x] "f" (b));
319+
320+ /* Following Muller et al, page 168, equation 5.20.
321+
322+ h goes to 1/(2*sqrt(b))
323+ g goes to sqrt(b).
324+
325+ We need three iterations to get within 1ulp. */
326+
327+ /* Indicate that these can be performed prior to the branch. GCC
328+ insists on sinking them below the branch, however; it seems like
329+ they'd be better before the branch so that we can cover any latency
330+ from storing the argument and loading its high word. Oh well. */
331+
332+ g = b * y;
333+ h = 0.5 * y;
334+
335+ /* Handle small numbers by scaling. */
336+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
337+ return __ieee754_sqrt (b * two108) * twom54;
338+
339+#define FMADD(a_, c_, b_) \
340+ ({ double __r; \
341+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
342+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
343+ __r;})
344+#define FNMSUB(a_, c_, b_) \
345+ ({ double __r; \
346+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
347+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
348+ __r;})
349+
350+ r = FNMSUB (g, h, half);
351+ g = FMADD (g, r, g);
352+ h = FMADD (h, r, h);
353+
354+ r = FNMSUB (g, h, half);
355+ g = FMADD (g, r, g);
356+ h = FMADD (h, r, h);
357+
358+ r = FNMSUB (g, h, half);
359+ g = FMADD (g, r, g);
360+ h = FMADD (h, r, h);
361+
362+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
363+
364+ /* Final refinement. */
365+ d = FNMSUB (g, g, b);
366+
367+ fesetenv_register (fe);
368+ return FMADD (d, h, g);
369+ }
370+ }
371+ else if (b < 0)
372+ {
373+ /* For some reason, some PowerPC32 processors don't implement
374+ FE_INVALID_SQRT. */
375+#ifdef FE_INVALID_SQRT
376+ feraiseexcept (FE_INVALID_SQRT);
377+
378+ fenv_union_t u = { .fenv = fegetenv_register () };
379+ if ((u.l[1] & FE_INVALID) == 0)
380+#endif
381+ feraiseexcept (FE_INVALID);
382+ b = a_nan.value;
383+ }
384+ return f_wash (b);
385+}
386diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
387--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
388+++ libc-e5500/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2011-05-18 11:15:22.467987000 -0500
389@@ -0,0 +1,101 @@
390+/* Single-precision floating point square root.
391+ Copyright (C) 2010 Free Software Foundation, Inc.
392+ This file is part of the GNU C Library.
393+
394+ The GNU C Library is free software; you can redistribute it and/or
395+ modify it under the terms of the GNU Lesser General Public
396+ License as published by the Free Software Foundation; either
397+ version 2.1 of the License, or (at your option) any later version.
398+
399+ The GNU C Library is distributed in the hope that it will be useful,
400+ but WITHOUT ANY WARRANTY; without even the implied warranty of
401+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
402+ Lesser General Public License for more details.
403+
404+ You should have received a copy of the GNU Lesser General Public
405+ License along with the GNU C Library; if not, write to the Free
406+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
407+ 02111-1307 USA. */
408+
409+#include <math.h>
410+#include <math_private.h>
411+#include <fenv_libc.h>
412+#include <inttypes.h>
413+
414+#include <sysdep.h>
415+#include <ldsodefs.h>
416+
417+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
418+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
419+static const float threehalf = 1.5;
420+
421+/* The method is based on the descriptions in:
422+
423+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
424+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
425+
426+ We find the reciprocal square root and use that to compute the actual
427+ square root. */
428+
429+#ifdef __STDC__
430+float
431+__ieee754_sqrtf (float b)
432+#else
433+float
434+__ieee754_sqrtf (b)
435+ float b;
436+#endif
437+{
438+ if (__builtin_expect (b > 0, 1))
439+ {
440+#define FMSUB(a_, c_, b_) \
441+ ({ double __r; \
442+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
443+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
444+ __r;})
445+#define FNMSUB(a_, c_, b_) \
446+ ({ double __r; \
447+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
448+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
449+ __r;})
450+
451+ if (__builtin_expect (b != a_inf.value, 1))
452+ {
453+ double y, x;
454+ fenv_t fe;
455+
456+ fe = fegetenv_register ();
457+
458+ relax_fenv_state ();
459+
460+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
461+ y = FMSUB (threehalf, b, b);
462+
463+ /* Initial estimate. */
464+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
465+
466+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
467+ x = x * FNMSUB (y, x * x, threehalf);
468+ x = x * FNMSUB (y, x * x, threehalf);
469+ x = x * FNMSUB (y, x * x, threehalf);
470+
471+ /* All done. */
472+ fesetenv_register (fe);
473+ return x * b;
474+ }
475+ }
476+ else if (b < 0)
477+ {
478+ /* For some reason, some PowerPC32 processors don't implement
479+ FE_INVALID_SQRT. */
480+#ifdef FE_INVALID_SQRT
481+ feraiseexcept (FE_INVALID_SQRT);
482+
483+ fenv_union_t u = { .fenv = fegetenv_register () };
484+ if ((u.l[1] & FE_INVALID) == 0)
485+#endif
486+ feraiseexcept (FE_INVALID);
487+ b = a_nan.value;
488+ }
489+ return f_washf (b);
490+}
491diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
492--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
493+++ libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2011-05-18 13:01:33.987988922 -0500
494@@ -0,0 +1 @@
495+powerpc/powerpc32/603e/fpu
496diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
497--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
498+++ libc-e5500/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2011-05-18 11:15:22.412987000 -0500
499@@ -0,0 +1 @@
500+powerpc/powerpc64/e5500/fpu
diff --git a/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch b/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch
deleted file mode 100644
index 4288769..0000000
--- a/recipes-devtools/eglibc/files/glibc.fixgcc4.6.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1glibc.fixgcc4.6
2
3Glibc build scripts relies on information given by "gcc -v --help".
4With gcc-4.6 and latter, this information is not printed with "--help"
5anymore, but with "--target-help". This patch should be used until
6glibs sources catches up with gcc.
7
8--- libc/configure.in-orig 2010-06-07 11:11:01.000000000 -0500
9+++ libc/configure.in 2010-06-07 11:11:28.000000000 -0500
10@@ -1620,7 +1620,7 @@
11 AC_CACHE_CHECK(for -z relro option,
12 libc_cv_z_relro, [dnl
13 libc_cv_z_relro=no
14- if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
15+ if AC_TRY_COMMAND([${CC-cc} -v --target-help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
16 then
17 if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
18 then
19--- libc/configure-orig 2010-06-07 11:11:13.000000000 -0500
20+++ libc/configure 2010-06-07 11:12:00.000000000 -0500
21@@ -6670,7 +6670,7 @@
22 $as_echo_n "(cached) " >&6
23 else
24 libc_cv_z_relro=no
25- if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5'
26+ if { ac_try='${CC-cc} -v --target-help 2>&1|grep "z relro" 1>&5'
27 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28 (eval $ac_try) 2>&5
29 ac_status=$?
diff --git a/recipes-devtools/eglibc/files/glibc.readv_proto.patch b/recipes-devtools/eglibc/files/glibc.readv_proto.patch
deleted file mode 100644
index fbeee69..0000000
--- a/recipes-devtools/eglibc/files/glibc.readv_proto.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1glibc.readv_proto
2
3Unfortunate choice of variable names. Causes syntax errors on Altivec
4enabled targets.
5
6diff -u libc-orig/sysdeps/unix/sysv/linux/readv.c libc/sysdeps/unix/sysv/linux/readv.c
7--- libc-orig/sysdeps/unix/sysv/linux/readv.c 2011-05-11 11:01:36.625600000 -0500
8+++ libc/sysdeps/unix/sysv/linux/readv.c 2011-05-11 11:03:19.443599768 -0500
9@@ -40,20 +40,20 @@
10
11
12 ssize_t
13-__libc_readv (fd, vector, count)
14+__libc_readv (fd, vec_tor, count)
15 int fd;
16- const struct iovec *vector;
17+ const struct iovec *vec_tor;
18 int count;
19 {
20 ssize_t result;
21
22 if (SINGLE_THREAD_P)
23- result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
24+ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vec_tor, count), count);
25 else
26 {
27 int oldtype = LIBC_CANCEL_ASYNC ();
28
29- result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
30+ result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vec_tor, count), count);
31
32 LIBC_CANCEL_RESET (oldtype);
33 }
34@@ -64,7 +64,7 @@
35 if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
36 return result;
37
38- return __atomic_readv_replacement (fd, vector, count);
39+ return __atomic_readv_replacement (fd, vec_tor, count);
40 #endif
41 }
42 strong_alias (__libc_readv, __readv)
43diff -u libc-orig/sysdeps/unix/sysv/linux/writev.c libc/sysdeps/unix/sysv/linux/writev.c
44--- libc-orig/sysdeps/unix/sysv/linux/writev.c 2011-05-11 11:01:36.577599548 -0500
45+++ libc/sysdeps/unix/sysv/linux/writev.c 2011-05-11 11:03:33.994599785 -0500
46@@ -40,20 +40,20 @@
47
48
49 ssize_t
50-__libc_writev (fd, vector, count)
51+__libc_writev (fd, vec_tor, count)
52 int fd;
53- const struct iovec *vector;
54+ const struct iovec *vec_tor;
55 int count;
56 {
57 ssize_t result;
58
59 if (SINGLE_THREAD_P)
60- result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
61+ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vec_tor, count), count);
62 else
63 {
64 int oldtype = LIBC_CANCEL_ASYNC ();
65
66- result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
67+ result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vec_tor, count), count);
68
69 LIBC_CANCEL_RESET (oldtype);
70 }
71@@ -64,7 +64,7 @@
72 if (result >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
73 return result;
74
75- return __atomic_writev_replacement (fd, vector, count);
76+ return __atomic_writev_replacement (fd, vec_tor, count);
77 #endif
78 }
79 strong_alias (__libc_writev, __writev)
80diff -u libc-orig/include/sys/uio.h libc/include/sys/uio.h
81--- libc-orig/include/sys/uio.h 2011-05-11 11:07:53.953602501 -0500
82+++ libc/include/sys/uio.h 2011-05-11 11:08:25.117599576 -0500
83@@ -2,12 +2,12 @@
84 #include <misc/sys/uio.h>
85
86 /* Now define the internal interfaces. */
87-extern ssize_t __readv (int __fd, __const struct iovec *__vector,
88+extern ssize_t __readv (int __fd, __const struct iovec *__vec_tor,
89 int __count);
90-extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
91+extern ssize_t __libc_readv (int __fd, __const struct iovec *__vec_tor,
92 int __count);
93-extern ssize_t __writev (int __fd, __const struct iovec *__vector,
94+extern ssize_t __writev (int __fd, __const struct iovec *__vec_tor,
95 int __count);
96-extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
97+extern ssize_t __libc_writev (int __fd, __const struct iovec *__vec_tor,
98 int __count);
99 #endif
diff --git a/recipes-devtools/eglibc/files/glibc.undefined_static.patch b/recipes-devtools/eglibc/files/glibc.undefined_static.patch
deleted file mode 100644
index aba5285..0000000
--- a/recipes-devtools/eglibc/files/glibc.undefined_static.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1glibc.undefined_static
2
3This works around an old binutils bug, which would delete static
4constants out of the code, thus causing undefined symbols. Not sure if
5this patch is still needed.
6
7diff -rc libc-orig/stdio-common/psiginfo-define.h libc-new/stdio-common/psiginfo-define.h
8*** libc-orig/stdio-common/psiginfo-define.h 2009-04-09 08:12:53.000000000 -0500
9--- libc-new/stdio-common/psiginfo-define.h 2009-04-09 08:20:36.000000000 -0500
10***************
11*** 1,4 ****
12! static const union C(codestrs_t_, NOW) {
13 struct {
14 #define P(n, s) char MF(__LINE__)[sizeof (s)];
15 #include "psiginfo-data.h"
16--- 1,4 ----
17! const union C(codestrs_t_, NOW) {
18 struct {
19 #define P(n, s) char MF(__LINE__)[sizeof (s)];
20 #include "psiginfo-data.h"
21***************
22*** 8,14 ****
23 #define P(n, s) s,
24 #include "psiginfo-data.h"
25 } };
26! static const uint8_t C(codes_, NOW)[] = {
27 #define P(n, s) [(n) - 1] = offsetof (union C(codestrs_t_, NOW), MF(__LINE__)),
28 #include "psiginfo-data.h"
29 };
30--- 8,14 ----
31 #define P(n, s) s,
32 #include "psiginfo-data.h"
33 } };
34! const uint8_t C(codes_, NOW)[] = {
35 #define P(n, s) [(n) - 1] = offsetof (union C(codestrs_t_, NOW), MF(__LINE__)),
36 #include "psiginfo-data.h"
37 };
diff --git a/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch b/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch
deleted file mode 100644
index 6ae6190..0000000
--- a/recipes-devtools/gcc/files/GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch
+++ /dev/null
@@ -1,186 +0,0 @@
1source: http://patchwork.ozlabs.org/patch/129800/
2Upstream-Status: Submitted
3
4ChangeLog
5 * Makefile.in (gcc_gxx_include_dir_add_sysroot): New.
6 (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT.
7
8 * cppdefault.c (cpp_include_defaults): replace hard coded "1" with
9 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field.
10
11 * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to
12 control whether sysroot should be prepended to gxx include dir.
13
14 * configure: Regenerate.
15
16Hi, this is a follow up for issue "http://codereview.appspot.com/4641076".
17
18The rationale for the patch copied from previous thread:
19=======================================
20The setup:
21
22Configuring a toolchain targeting x86-64 GNU Linux (Ubuntu Lucid), as a
23cross-compiler. Using a sysroot to provide the Lucid headers+libraries,
24with the sysroot path being within the GCC install tree. Want to use the
25Lucid system libstdc++ and headers, which means that I'm not
26building/installing libstdc++-v3.
27
28So, configuring with:
29 --with-sysroot="$SYSROOT"
30 --disable-libstdc++-v3 \
31 --with-gxx-include-dir="$SYSROOT/usr/include/c++/4.4" \
32(among other options).
33
34Hoping to support two usage models with this configuration, w.r.t. use of
35the sysroot:
36
37(1) somebody installs the sysroot in the normal location relative to the
38GCC install, and relocates the whole bundle (sysroot+GCC). This works
39great AFAICT, GCC finds its includes (including the C++ includes) thanks
40to the add_standard_paths iprefix handling.
41
42(2) somebody installs the sysroot in a non-standard location, and uses
43--sysroot to try to access it. This works fine for the C headers, but
44doesn't work.
45
46For the C headers, add_standard_paths prepends the sysroot location to
47the /usr/include path (since that's what's specified in cppdefault.c for
48that path). It doesn't do the same for the C++ include path, though
49(again, as specified in cppdefault.c).
50
51add_standard_paths doesn't attempt to relocate built-in include paths that
52start with the compiled-in sysroot location (e.g., the g++ include dir, in
53this case). This isn't surprising really: normally you either prepend the
54sysroot location or you don't (as specified by cppdefault.c); none of the
55built-in paths normally *start* with the sysroot location and need to be
56relocated. However, in this odd-ball case of trying to use the C++ headers
57from the sysroot, one of the paths *does* need to be relocated in this way.
58===========================
59Index: gcc-4_6-branch/gcc/Makefile.in
60===================================================================
61--- gcc-4_6-branch.orig/gcc/Makefile.in
62+++ gcc-4_6-branch/gcc/Makefile.in
63@@ -587,6 +587,7 @@ slibdir = @slibdir@
64 build_tooldir = $(exec_prefix)/$(target_noncanonical)
65 # Directory in which the compiler finds target-independent g++ includes.
66 gcc_gxx_include_dir = @gcc_gxx_include_dir@
67+gcc_gxx_include_dir_add_sysroot = @gcc_gxx_include_dir_add_sysroot@
68 # Directory to search for site-specific includes.
69 local_includedir = $(local_prefix)/include
70 includedir = $(prefix)/include
71@@ -3982,6 +3983,7 @@ PREPROCESSOR_DEFINES = \
72 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
73 -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
74 -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
75+ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
76 -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
77 -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
78 -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
79Index: gcc-4_6-branch/gcc/configure.ac
80===================================================================
81--- gcc-4_6-branch.orig/gcc/configure.ac
82+++ gcc-4_6-branch/gcc/configure.ac
83@@ -144,6 +144,15 @@ if test x${gcc_gxx_include_dir} = x; the
84 fi
85 fi
86
87+gcc_gxx_include_dir_add_sysroot=0
88+if test "${with_sysroot+set}" = set; then :
89+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
90+ if test "${gcc_gxx_without_sysroot}"; then :
91+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
92+ gcc_gxx_include_dir_add_sysroot=1
93+ fi
94+fi
95+
96 AC_ARG_WITH(cpp_install_dir,
97 [ --with-cpp-install-dir=DIR
98 install the user visible C preprocessor in DIR
99@@ -4732,6 +4741,7 @@ AC_SUBST(extra_programs)
100 AC_SUBST(float_h_file)
101 AC_SUBST(gcc_config_arguments)
102 AC_SUBST(gcc_gxx_include_dir)
103+AC_SUBST(gcc_gxx_include_dir_add_sysroot)
104 AC_SUBST(host_exeext)
105 AC_SUBST(host_xm_file_list)
106 AC_SUBST(host_xm_include_list)
107Index: gcc-4_6-branch/gcc/cppdefault.c
108===================================================================
109--- gcc-4_6-branch.orig/gcc/cppdefault.c
110+++ gcc-4_6-branch/gcc/cppdefault.c
111@@ -48,15 +48,18 @@ const struct default_include cpp_include
112 = {
113 #ifdef GPLUSPLUS_INCLUDE_DIR
114 /* Pick up GNU C++ generic include files. */
115- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
116+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
117+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
118 #endif
119 #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
120 /* Pick up GNU C++ target-dependent include files. */
121- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 },
122+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
123+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
124 #endif
125 #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
126 /* Pick up GNU C++ backward and deprecated include files. */
127- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
128+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
129+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
130 #endif
131 #ifdef GCC_INCLUDE_DIR
132 /* This is the dir for gcc's private headers. */
133Index: gcc-4_6-branch/gcc/configure
134===================================================================
135--- gcc-4_6-branch.orig/gcc/configure
136+++ gcc-4_6-branch/gcc/configure
137@@ -636,6 +636,7 @@ host_xm_defines
138 host_xm_include_list
139 host_xm_file_list
140 host_exeext
141+gcc_gxx_include_dir_add_sysroot
142 gcc_gxx_include_dir
143 gcc_config_arguments
144 float_h_file
145@@ -3306,6 +3307,15 @@ if test x${gcc_gxx_include_dir} = x; the
146 fi
147 fi
148
149+gcc_gxx_include_dir_add_sysroot=0
150+if test "${with_sysroot+set}" = set; then :
151+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
152+ if test "${gcc_gxx_without_sysroot}"; then :
153+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
154+ gcc_gxx_include_dir_add_sysroot=1
155+ fi
156+fi
157+
158
159 # Check whether --with-cpp_install_dir was given.
160 if test "${with_cpp_install_dir+set}" = set; then :
161@@ -17505,7 +17515,7 @@ else
162 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
163 lt_status=$lt_dlunknown
164 cat > conftest.$ac_ext <<_LT_EOF
165-#line 17508 "configure"
166+#line 17518 "configure"
167 #include "confdefs.h"
168
169 #if HAVE_DLFCN_H
170@@ -17611,7 +17621,7 @@ else
171 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
172 lt_status=$lt_dlunknown
173 cat > conftest.$ac_ext <<_LT_EOF
174-#line 17614 "configure"
175+#line 17624 "configure"
176 #include "confdefs.h"
177
178 #if HAVE_DLFCN_H
179@@ -26195,6 +26205,7 @@ fi
180
181
182
183+
184 # Echo link setup.
185 if test x${build} = x${host} ; then
186 if test x${host} = x${target} ; then
diff --git a/recipes-devtools/gcc/files/gcc.builtin_isel.patch b/recipes-devtools/gcc/files/gcc.builtin_isel.patch
deleted file mode 100644
index 10e5999..0000000
--- a/recipes-devtools/gcc/files/gcc.builtin_isel.patch
+++ /dev/null
@@ -1,1059 +0,0 @@
1diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-builtin.def gcc-4.6.0-new/gcc/config/rs6000/rs6000-builtin.def
2--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-builtin.def 2011-02-21 15:38:21.000000000 -0600
3+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-builtin.def 2011-07-25 12:32:26.626006000 -0500
4@@ -750,6 +750,71 @@
5 RS6000_BUILTIN(SPE_BUILTIN_MFSPEFSCR, RS6000_BTC_MISC)
6 RS6000_BUILTIN(SPE_BUILTIN_BRINC, RS6000_BTC_MISC)
7
8+/* ISEL builtins. */
9+/* Generic versions that get resolved to specific builtins. */
10+RS6000_BUILTIN(RS6000_BUILTIN_ISELEQ, RS6000_BTC_PURE)
11+RS6000_BUILTIN_EQUATE(ISEL_BUILTIN_OVERLOADED_FIRST,
12+ RS6000_BUILTIN_ISELEQ)
13+RS6000_BUILTIN(RS6000_BUILTIN_ISELGT, RS6000_BTC_PURE)
14+RS6000_BUILTIN(RS6000_BUILTIN_ISELLT, RS6000_BTC_PURE)
15+RS6000_BUILTIN(RS6000_BUILTIN_ISELGTU, RS6000_BTC_PURE)
16+RS6000_BUILTIN(RS6000_BUILTIN_ISELLTU, RS6000_BTC_PURE)
17+/* Same deal, but for 64-bit comparisons. */
18+RS6000_BUILTIN(RS6000_BUILTIN_ISELEQD, RS6000_BTC_PURE)
19+RS6000_BUILTIN(RS6000_BUILTIN_ISELGTD, RS6000_BTC_PURE)
20+RS6000_BUILTIN(RS6000_BUILTIN_ISELLTD, RS6000_BTC_PURE)
21+RS6000_BUILTIN(RS6000_BUILTIN_ISELGTDU, RS6000_BTC_PURE)
22+RS6000_BUILTIN(RS6000_BUILTIN_ISELLTDU, RS6000_BTC_PURE)
23+RS6000_BUILTIN_EQUATE(ISEL_BUILTIN_OVERLOADED_LAST,
24+ RS6000_BUILTIN_ISELLTDU)
25+
26+/* Each set of arguments is polymorphic in selected arguments and return
27+ value. */
28+#undef RS6000_ISEL_BASE
29+#define RS6000_ISEL_BASE(ARG, PRED, CMP) \
30+ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_SS, RS6000_BTC_PURE) \
31+ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_PP, RS6000_BTC_PURE) \
32+ RS6000_BUILTIN(RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_UU, RS6000_BTC_PURE)
33+#undef RS6000_ISEL_PTR_ARG
34+#define RS6000_ISEL_PTR_ARG(PRED, CMP) RS6000_ISEL_BASE(PP, PRED, CMP)
35+#undef RS6000_ISEL_SIGNED_ARG
36+#define RS6000_ISEL_SIGNED_ARG(PRED, CMP) RS6000_ISEL_BASE(SS, PRED, CMP)
37+#undef RS6000_ISEL_UNSIGNED_ARG
38+#define RS6000_ISEL_UNSIGNED_ARG(PRED, CMP) RS6000_ISEL_BASE(UU, PRED, CMP)
39+
40+#undef RS6000_ISEL_EQ
41+#define RS6000_ISEL_EQ(CMP) \
42+ RS6000_ISEL_PTR_ARG(EQ, CMP) \
43+ RS6000_ISEL_SIGNED_ARG(EQ, CMP) \
44+ RS6000_ISEL_UNSIGNED_ARG(EQ, CMP)
45+
46+#undef RS6000_ISEL_LT
47+#define RS6000_ISEL_LT(CMP) RS6000_ISEL_SIGNED_ARG(LT, CMP)
48+
49+#undef RS6000_ISEL_GT
50+#define RS6000_ISEL_GT(CMP) RS6000_ISEL_SIGNED_ARG(GT, CMP)
51+
52+#undef RS6000_ISEL_LTU
53+#define RS6000_ISEL_LTU(CMP) \
54+ RS6000_ISEL_PTR_ARG(LTU, CMP) \
55+ RS6000_ISEL_UNSIGNED_ARG(LTU, CMP)
56+
57+#undef RS6000_ISEL_GTU
58+#define RS6000_ISEL_GTU(CMP) \
59+ RS6000_ISEL_PTR_ARG(GTU, CMP) \
60+ RS6000_ISEL_UNSIGNED_ARG(GTU, CMP)
61+
62+RS6000_ISEL_EQ(CMPW)
63+RS6000_ISEL_LT(CMPW)
64+RS6000_ISEL_GT(CMPW)
65+RS6000_ISEL_LTU(CMPW)
66+RS6000_ISEL_GTU(CMPW)
67+RS6000_ISEL_EQ(CMPD)
68+RS6000_ISEL_LT(CMPD)
69+RS6000_ISEL_GT(CMPD)
70+RS6000_ISEL_LTU(CMPD)
71+RS6000_ISEL_GTU(CMPD)
72+
73 /* PAIRED builtins. */
74 RS6000_BUILTIN(PAIRED_BUILTIN_DIVV2SF3, RS6000_BTC_MISC)
75 RS6000_BUILTIN(PAIRED_BUILTIN_ABSV2SF2, RS6000_BTC_MISC)
76diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000.c gcc-4.6.0-new/gcc/config/rs6000/rs6000.c
77--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000.c 2011-03-15 07:57:37.000000000 -0500
78+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000.c 2011-07-25 13:19:52.415921000 -0500
79@@ -12402,6 +12402,289 @@
80 return target;
81 }
82
83+/* isel builtins are a bit funny, because we want the user to be able to do:
84+
85+ char *p, *q, *r;
86+ int x, y, z;
87+ unsigned int a, b, c;
88+ ...
89+ p = __builtin_iseleq (i, j, q, r);
90+ x = __builtin_iseleq (i, j, y, z);
91+ a = __builtin_iseleq (i, j, b, c);
92+
93+ and, of course, i and j may be of several different types depending on the
94+ condition.
95+
96+ We handle this by having generic builtins that
97+ TARGET_RESOLVE_OVERLOADED_BUILTIN takes and turns into calls to our
98+ specific builtins. */
99+
100+/* Macros to help constructing the isel_builtin_desc arrays.
101+ These closely mirror the macros in rs6000-builtins.def. */
102+/* HACK: Use VOIDmode here as a constant approximation to Pmode and fix
103+ at runtime. We can't use Pmode because in biarch its definition is
104+ not constant. */
105+#define ISEL_Pmode VOIDmode
106+#define ISEL_BASE(FLAGS, ARG, RESULT, PRED, CMP, MODE, RMODE) \
107+ { NULL, FLAGS, RS6000_BUILTIN_ISEL_##PRED##CMP##_##ARG##_##RESULT, \
108+ PRED, MODE, RMODE },
109+#define ISEL_P_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \
110+ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_PTR, ARG, PP, PRED, \
111+ CMP, MODE, ISEL_Pmode)
112+#define ISEL_S_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \
113+ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_SIGNED, ARG, SS, PRED, \
114+ CMP, MODE, RMODE)
115+#define ISEL_U_RESULT(FLAGS, ARG, PRED, CMP, MODE, RMODE) \
116+ ISEL_BASE (FLAGS | ISEL_FLAG_SEL_UNSIGNED, ARG, UU, PRED, \
117+ CMP, MODE, RMODE)
118+
119+#define ISEL_EXPAND_ARG(FLAG, ARG, PRED, CMP, MODE, RMODE) \
120+ ISEL_P_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) \
121+ ISEL_S_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE) \
122+ ISEL_U_RESULT (FLAG, ARG, PRED, CMP, MODE, RMODE)
123+#define ISEL_PTR_ARG(PRED, CMP, MODE) \
124+ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_PTR, PP, PRED, CMP, ISEL_Pmode, MODE)
125+#define ISEL_SIGNED_ARG(PRED, CMP, MODE) \
126+ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_SIGNED, SS, PRED, CMP, MODE, MODE)
127+#define ISEL_UNSIGNED_ARG(PRED, CMP, MODE) \
128+ ISEL_EXPAND_ARG (ISEL_FLAG_CMP_UNSIGNED, UU, PRED, CMP, MODE, MODE)
129+
130+#define ISEL_EQ(CMP, MODE) \
131+ ISEL_PTR_ARG (EQ, CMP, MODE) \
132+ ISEL_SIGNED_ARG (EQ, CMP, MODE) \
133+ ISEL_UNSIGNED_ARG (EQ, CMP, MODE)
134+#define ISEL_LT(CMP, MODE) ISEL_SIGNED_ARG (LT, CMP, MODE)
135+#define ISEL_GT(CMP, MODE) ISEL_SIGNED_ARG (GT, CMP, MODE)
136+#define ISEL_LTU(CMP, MODE) \
137+ ISEL_PTR_ARG (LTU, CMP, MODE) \
138+ ISEL_UNSIGNED_ARG (LTU, CMP, MODE)
139+#define ISEL_GTU(CMP, MODE) \
140+ ISEL_PTR_ARG (GTU, CMP, MODE) \
141+ ISEL_UNSIGNED_ARG (GTU, CMP, MODE)
142+
143+const struct isel_builtin_desc builtin_iselw[32] = {
144+ ISEL_EQ (CMPW, SImode)
145+ ISEL_LT (CMPW, SImode)
146+ ISEL_GT (CMPW, SImode)
147+ ISEL_LTU (CMPW, SImode)
148+ ISEL_GTU (CMPW, SImode)
149+ { "__builtin_iseleq", 0, RS6000_BUILTIN_ISELEQ, EQ, SImode, SImode },
150+ { "__builtin_isellt", 0, RS6000_BUILTIN_ISELLT, LT, SImode, SImode },
151+ { "__builtin_iselgt", 0, RS6000_BUILTIN_ISELGT, GT, SImode, SImode },
152+ { "__builtin_iselltu", 0, RS6000_BUILTIN_ISELLTU, LTU, SImode, SImode },
153+ { "__builtin_iselgtu", 0, RS6000_BUILTIN_ISELGTU, GTU, SImode, SImode }
154+};
155+
156+const struct isel_builtin_desc builtin_iseld[32] = {
157+ ISEL_EQ (CMPD, DImode)
158+ ISEL_LT (CMPD, DImode)
159+ ISEL_GT (CMPD, DImode)
160+ ISEL_LTU (CMPD, DImode)
161+ ISEL_GTU (CMPD, DImode)
162+ { "__builtin_isel64eq", 0, RS6000_BUILTIN_ISELEQD, EQ, DImode, DImode },
163+ { "__builtin_isel64lt", 0, RS6000_BUILTIN_ISELLTD, LT, DImode, DImode },
164+ { "__builtin_isel64gt", 0, RS6000_BUILTIN_ISELGTD, GT, DImode, DImode },
165+ { "__builtin_isel64ltu", 0, RS6000_BUILTIN_ISELLTDU, LTU, DImode, DImode },
166+ { "__builtin_isel64gtu", 0, RS6000_BUILTIN_ISELGTDU, GTU, DImode, DImode }
167+};
168+
169+/* Return the mode which DESC uses for comparisons. */
170+
171+static enum machine_mode
172+isel_cmp_mode (const struct isel_builtin_desc *desc)
173+{
174+ enum machine_mode mode = (enum machine_mode) desc->cmp_mode;
175+
176+ return (mode == VOIDmode ? Pmode : mode);
177+}
178+
179+/* Return the mode in which DESC selects arguments. */
180+
181+static enum machine_mode
182+isel_sel_mode (const struct isel_builtin_desc *desc)
183+{
184+ enum machine_mode mode = (enum machine_mode) desc->sel_mode;
185+
186+ return (mode == VOIDmode ? Pmode : mode);
187+}
188+
189+/* Return a tree describing the arguments for DESC according to CMPP:
190+ true for comparison arguments, false for select arguments. */
191+
192+static tree
193+isel_argtype (const struct isel_builtin_desc *desc, bool cmpp)
194+{
195+ switch (desc->arg_flags & (cmpp
196+ ? ISEL_FLAG_CMP_MASK
197+ : ISEL_FLAG_SEL_MASK))
198+ {
199+ case ISEL_FLAG_CMP_PTR:
200+ case ISEL_FLAG_SEL_PTR:
201+ return ptr_type_node;
202+ case ISEL_FLAG_CMP_SIGNED:
203+ return (isel_cmp_mode (desc) == SImode
204+ ? integer_type_node
205+ : long_integer_type_node);
206+ case ISEL_FLAG_SEL_SIGNED:
207+ return (isel_sel_mode (desc) == SImode
208+ ? integer_type_node
209+ : long_integer_type_node);
210+ case ISEL_FLAG_CMP_UNSIGNED:
211+ return (isel_cmp_mode (desc) == SImode
212+ ? unsigned_type_node
213+ : long_unsigned_type_node);
214+ case ISEL_FLAG_SEL_UNSIGNED:
215+ default:
216+ return (isel_sel_mode (desc) == SImode
217+ ? unsigned_type_node
218+ : long_unsigned_type_node);
219+ }
220+}
221+
222+/* Return a mnemonic string describing the argument or result of FLAGS
223+ depending on CMPP. */
224+
225+static const char *
226+isel_strdesc (int flags, bool cmpp)
227+{
228+ switch (flags & (cmpp ? ISEL_FLAG_CMP_MASK : ISEL_FLAG_SEL_MASK))
229+ {
230+ case ISEL_FLAG_CMP_PTR:
231+ case ISEL_FLAG_SEL_PTR:
232+ return "p";
233+ case ISEL_FLAG_CMP_SIGNED:
234+ case ISEL_FLAG_SEL_SIGNED:
235+ return "s";
236+ case ISEL_FLAG_CMP_UNSIGNED:
237+ case ISEL_FLAG_SEL_UNSIGNED:
238+ return "u";
239+ default:
240+ gcc_unreachable ();
241+ }
242+}
243+
244+/* Initialize N_DESC isel builtins from DESC. SIGNED_TYPE holds the
245+ basic type for signed variants of isel, UNSIGNED_TYPE the type for
246+ unsigned variants. */
247+
248+static void
249+rs6000_init_isel_builtins (const struct isel_builtin_desc *desc, int n_descs)
250+{
251+ int i;
252+ const char *is64 = (desc == &builtin_iselw[0] ? "32" : "64");
253+
254+ for (i = 0; i < n_descs; i++)
255+ {
256+ const struct isel_builtin_desc *d = &desc[i];
257+ tree cmptype, seltype, ftype;
258+
259+ cmptype = isel_argtype (d, true);
260+ seltype = isel_argtype (d, false);
261+
262+ ftype = build_function_type_list (seltype, cmptype, cmptype,
263+ seltype, seltype, NULL_TREE);
264+
265+ if (d->name)
266+ def_builtin (MASK_ISEL, d->name, ftype, d->code);
267+ else
268+ {
269+ char builtin_name[40];
270+
271+ sprintf (builtin_name, "__builtin_isel%s%s%s%s%s%s",
272+ is64,
273+ GET_RTX_NAME (d->cmp_code),
274+ GET_MODE_NAME (isel_cmp_mode (d)),
275+ isel_strdesc (d->arg_flags, true),
276+ isel_strdesc (d->arg_flags, false),
277+ GET_MODE_NAME (isel_sel_mode (d)));
278+
279+ def_builtin (MASK_ISEL, ggc_strdup (builtin_name), ftype, d->code);
280+ }
281+ }
282+}
283+
284+static rtx
285+rs6000_expand_isel_builtin (const struct isel_builtin_desc *desc,
286+ int n_descs, tree exp, rtx target, int fcode)
287+{
288+ int i;
289+
290+ for (i = 0; i < n_descs; i++)
291+ {
292+ const struct isel_builtin_desc *d = &desc[i];
293+
294+ if (fcode == (int) d->code)
295+ {
296+ int opidx;
297+ unsigned int j;
298+ rtx cmp;
299+ rtx operands[4];
300+ enum insn_code icode;
301+ enum machine_mode opmode;
302+ enum machine_mode cmpmode = isel_cmp_mode (d);
303+ enum machine_mode selmode = isel_sel_mode (d);
304+
305+ /* Determine underlying isel insn. */
306+ switch (d->cmp_code)
307+ {
308+ case GTU:
309+ case LTU:
310+ icode = (Pmode == SImode
311+ ? CODE_FOR_isel_unsigned_si
312+ : CODE_FOR_isel_unsigned_di);
313+ break;
314+ default:
315+ icode = (Pmode == SImode
316+ ? CODE_FOR_isel_signed_si
317+ : CODE_FOR_isel_signed_di);
318+ break;
319+ }
320+
321+ for (j = 0; j < ARRAY_SIZE (operands); j++)
322+ {
323+ tree arg = CALL_EXPR_ARG (exp, j);
324+
325+ /* If we got invalid arguments, bail out before generating
326+ bad rtl. */
327+ if (arg == error_mark_node)
328+ return const0_rtx;
329+
330+ operands[j] = expand_normal (arg);
331+
332+ /* Validate. */
333+ /* HACK: The isel pattern doesn't actually consume all the
334+ operands to the builtin; it only consumes 2 and 3. The
335+ other two will be handed off to a compare
336+ insn. Unfortunately, said insn is not named, so we
337+ can't directly access its insn_data here. Fake it by
338+ validating operands 0 and 1 with the isel pattern; that
339+ should be good enough. */
340+ opidx = (j < 2 ? 2 : j);
341+ opmode = (j < 2 ? cmpmode : selmode);
342+ if (! (*insn_data[icode].operand[opidx].predicate) (operands[j],
343+ opmode))
344+ operands[j] = copy_to_mode_reg (opmode, operands[j]);
345+ }
346+
347+ /* Validate target. */
348+ if (target == NULL_RTX
349+ || GET_MODE (target) != selmode
350+ || ! (*insn_data[icode].operand[0].predicate) (target, selmode))
351+ target = gen_reg_rtx (selmode);
352+
353+ /* Generate comparison. */
354+ cmp = gen_rtx_fmt_ee ((enum rtx_code)d->cmp_code, cmpmode,
355+ operands[0], operands[1]);
356+
357+ rs6000_emit_int_cmove (target, cmp, operands[2], operands[3]);
358+
359+ return target;
360+ }
361+ }
362+
363+ return NULL_RTX;
364+}
365+
366 /* Expand an expression EXP that calls a built-in function,
367 with result going to TARGET if that's convenient
368 (and in mode MODE if that's convenient).
369@@ -12520,6 +12803,24 @@
370 if (success)
371 return ret;
372 }
373+ if (TARGET_ISEL)
374+ {
375+ ret = rs6000_expand_isel_builtin (builtin_iselw,
376+ ARRAY_SIZE (builtin_iselw),
377+ exp, target, fcode);
378+
379+ if (ret != NULL_RTX)
380+ return ret;
381+ }
382+ if (TARGET_ISEL64)
383+ {
384+ ret = rs6000_expand_isel_builtin (builtin_iseld,
385+ ARRAY_SIZE (builtin_iseld),
386+ exp, target, fcode);
387+
388+ if (ret != NULL_RTX)
389+ return ret;
390+ }
391
392 gcc_assert (TARGET_ALTIVEC || TARGET_VSX || TARGET_SPE || TARGET_PAIRED_FLOAT);
393
394@@ -12738,6 +13039,10 @@
395 spe_init_builtins ();
396 if (TARGET_ALTIVEC)
397 altivec_init_builtins ();
398+ if (TARGET_ISEL)
399+ rs6000_init_isel_builtins (builtin_iselw, ARRAY_SIZE (builtin_iselw));
400+ if (TARGET_ISEL64)
401+ rs6000_init_isel_builtins (builtin_iseld, ARRAY_SIZE (builtin_iseld));
402 if (TARGET_ALTIVEC || TARGET_SPE || TARGET_PAIRED_FLOAT || TARGET_VSX)
403 rs6000_common_init_builtins ();
404 if (TARGET_FRE)
405diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-c.c gcc-4.6.0-new/gcc/config/rs6000/rs6000-c.c
406--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-c.c 2011-02-02 23:42:19.000000000 -0600
407+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-c.c 2011-07-25 16:07:14.616209000 -0500
408@@ -3439,7 +3439,7 @@
409 /* Implementation of the resolve_overloaded_builtin target hook, to
410 support Altivec's overloaded builtins. */
411
412-tree
413+static tree
414 altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
415 void *passed_arglist)
416 {
417@@ -3770,3 +3770,148 @@
418 error ("invalid parameter combination for AltiVec intrinsic");
419 return error_mark_node;
420 }
421+
422+/* Return true if the pair of arguments in ARGS is acceptable according
423+ to DECLTYPES and FLAGS. CMPP determines whether this is for the
424+ comparison arguments. */
425+
426+static bool
427+isel_arguments_valid (tree *args, tree *decltypes, int flags, bool cmpp)
428+{
429+ tree type0 = TREE_TYPE (args[0]);
430+ tree type1 = TREE_TYPE (args[1]);
431+ tree decltype0 = decltypes[0];
432+ tree decltype1 = decltypes[1];
433+
434+ switch (flags & (cmpp ? ISEL_FLAG_CMP_MASK : ISEL_FLAG_SEL_MASK))
435+ {
436+ /* For pointer arguments and results, we just need to make sure
437+ we're receiving pointers, and they can be freely converted to
438+ and from void *. For pointer results, we also need to ensure
439+ that the types of the passed arguments are compatible: this is
440+ similar to what the ?: construct would need to ensure. */
441+ case ISEL_FLAG_CMP_PTR:
442+ case ISEL_FLAG_SEL_PTR:
443+ {
444+ /* Results compatible with each other? */
445+ if (!lang_hooks.types_compatible_p (type0, type1))
446+ return false;
447+
448+ return (POINTER_TYPE_P (type0)
449+ && POINTER_TYPE_P (type1));
450+ }
451+ break;
452+ /* For signed and unsigned arguments and results, we just need to
453+ make sure that the argument types are compatible with the
454+ declared types; we can insert conversions to make everything
455+ match up. */
456+ case ISEL_FLAG_CMP_SIGNED:
457+ case ISEL_FLAG_SEL_SIGNED:
458+ case ISEL_FLAG_CMP_UNSIGNED:
459+ case ISEL_FLAG_SEL_UNSIGNED:
460+ return (lang_hooks.types_compatible_p (type0, decltype0)
461+ && lang_hooks.types_compatible_p (type1, decltype1));
462+ default:
463+ ;
464+ }
465+
466+ gcc_unreachable ();
467+}
468+
469+/* Determine if FNDECL is a generic isel intrinsic and if it can be
470+ resolved to a non-generic version with a proper type using the
471+ descriptions found in DESC. Return a call to the non-generic builtin
472+ if so. */
473+
474+static tree
475+rs6000_resolve_isel_builtin (location_t loc, tree fndecl,
476+ void *passed_arglist,
477+ const struct isel_builtin_desc *desc,
478+ int n_descs)
479+{
480+ VEC(tree,gc) *arglist = (VEC(tree,gc) *) passed_arglist;
481+ unsigned int nargs = VEC_length (tree, arglist);
482+ int i;
483+ unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
484+ const struct isel_builtin_desc *generic = NULL;
485+
486+ /* Is this even a builtin we care about? */
487+ if (fcode < ISEL_BUILTIN_OVERLOADED_FIRST
488+ || fcode > ISEL_BUILTIN_OVERLOADED_LAST)
489+ return NULL_TREE;
490+
491+ if (nargs != 4)
492+ {
493+ error ("isel intrinsics only accept 4 arguments");
494+ return error_mark_node;
495+ }
496+
497+ /* Find the generic builtin we're resolving. */
498+ for (i = 0; i < n_descs; i++)
499+ if (desc[i].code == fcode)
500+ {
501+ generic = &desc[i];
502+ break;
503+ }
504+
505+ /* Happens if we're looking for a 64-bit builtin in the 32-bit
506+ descriptors. */
507+ if (generic == NULL)
508+ return NULL_TREE;
509+
510+ /* Try all the builtins whose comparison matches the generic one. */
511+ for (i = 0; i < n_descs; i++)
512+ {
513+ const struct isel_builtin_desc *d = &desc[i];
514+ int j;
515+ tree *argp = VEC_address (tree, arglist);
516+ tree impl_fndecl;
517+ tree decltypes[4], t;
518+ tree converted_args[4];
519+
520+ if (d == generic || d->cmp_code != generic->cmp_code)
521+ continue;
522+
523+ impl_fndecl = rs6000_builtin_decls[d->code];
524+ t = TYPE_ARG_TYPES (TREE_TYPE (impl_fndecl));
525+ for (j = 0 ; t != void_list_node; j++, t = TREE_CHAIN (t))
526+ decltypes[j] = TREE_VALUE (t);
527+
528+ if (!isel_arguments_valid (argp, decltypes, d->arg_flags, true)
529+ || !isel_arguments_valid (argp+2, decltypes+2, d->arg_flags, false))
530+ continue;
531+
532+ /* We got here, we're ok. Build a new, resolved CALL_EXPR. */
533+ for (j = 0; j < 4; j++)
534+ converted_args[j] = fold_convert (decltypes[j], argp[j]);
535+
536+ return build_call_expr_loc (loc, impl_fndecl, 4,
537+ converted_args[0], converted_args[1],
538+ converted_args[2], converted_args[3]);
539+ }
540+
541+ error ("invalid parameter combination for isel intrinsic");
542+ return error_mark_node;
543+}
544+
545+tree
546+rs6000_resolve_overloaded_builtin (location_t loc, tree fndecl, void *arglist)
547+{
548+ tree t;
549+
550+ t = altivec_resolve_overloaded_builtin (loc, fndecl, arglist);
551+ if (t)
552+ return t;
553+
554+ t = rs6000_resolve_isel_builtin (loc, fndecl, arglist,
555+ builtin_iselw, ARRAY_SIZE (builtin_iselw));
556+ if (t)
557+ return t;
558+
559+ t = rs6000_resolve_isel_builtin (loc, fndecl, arglist,
560+ builtin_iseld, ARRAY_SIZE (builtin_iseld));
561+ if (t)
562+ return t;
563+
564+ return NULL_TREE;
565+}
566diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000.h gcc-4.6.0-new/gcc/config/rs6000/rs6000.h
567--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000.h 2011-03-07 13:27:09.000000000 -0600
568+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000.h 2011-07-25 16:07:04.045105000 -0500
569@@ -535,7 +535,7 @@
570 #define REGISTER_TARGET_PRAGMAS() do { \
571 c_register_pragma (0, "longcall", rs6000_pragma_longcall); \
572 targetm.target_option.pragma_parse = rs6000_pragma_target_parse; \
573- targetm.resolve_overloaded_builtin = altivec_resolve_overloaded_builtin; \
574+ targetm.resolve_overloaded_builtin = rs6000_resolve_overloaded_builtin; \
575 } while (0)
576
577 /* Target #defines. */
578@@ -2446,3 +2446,41 @@
579 extern GTY(()) tree rs6000_builtin_types[RS6000_BTI_MAX];
580 extern GTY(()) tree rs6000_builtin_decls[RS6000_BUILTIN_COUNT];
581
582+/* Values for struct isel_builtin_desc.arg_flags. */
583+enum {
584+ ISEL_FLAG_CMP_PTR = 0x1,
585+ ISEL_FLAG_CMP_SIGNED = 0x2,
586+ ISEL_FLAG_CMP_UNSIGNED = 0x4,
587+ ISEL_FLAG_CMP_MASK = 0x7,
588+ ISEL_FLAG_SEL_PTR = 0x10,
589+ ISEL_FLAG_SEL_SIGNED = 0x20,
590+ ISEL_FLAG_SEL_UNSIGNED = 0x40,
591+ ISEL_FLAG_SEL_MASK = 0x70
592+};
593+
594+struct isel_builtin_desc {
595+ /* Name of this builtin. NULL if we should construct it. */
596+ const char *name;
597+
598+ /* Flags for argument combinations accepted by the builtin.
599+ Zero if this builtin is a generic builtin, to be resolved later. */
600+ int arg_flags;
601+
602+ /* The code of the builtin. */
603+ enum rs6000_builtins code;
604+
605+ /* rtx_code and machine_mode are not available here; use ints instead. */
606+ /* The comparison code the builtin uses. */
607+ int cmp_code;
608+
609+ /* The mode the builtin does comparisons in. */
610+ int cmp_mode;
611+
612+ /* The mode the builtin's selected arguments are in.
613+ Also happens to be its result mode. */
614+ int sel_mode;
615+};
616+
617+/* Arrays describing isel builtins. */
618+extern const struct isel_builtin_desc builtin_iselw[32];
619+extern const struct isel_builtin_desc builtin_iseld[32];
620diff -ruN gcc-4.6.0-orig/gcc/config/rs6000/rs6000-protos.h gcc-4.6.0-new/gcc/config/rs6000/rs6000-protos.h
621--- gcc-4.6.0-orig/gcc/config/rs6000/rs6000-protos.h 2011-03-15 07:57:37.000000000 -0500
622+++ gcc-4.6.0-new/gcc/config/rs6000/rs6000-protos.h 2011-07-25 16:07:50.484773000 -0500
623@@ -142,7 +142,7 @@
624 unsigned int);
625 extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
626 unsigned int);
627-extern tree altivec_resolve_overloaded_builtin (location_t, tree, void *);
628+extern tree rs6000_resolve_overloaded_builtin (location_t, tree, void *);
629 extern rtx rs6000_libcall_value (enum machine_mode);
630 extern rtx rs6000_va_arg (tree, tree);
631 extern int function_ok_for_sibcall (tree);
632diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c
633--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c 1969-12-31 18:00:00.000000000 -0600
634+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64.c 2011-07-25 12:27:55.343932000 -0500
635@@ -0,0 +1,75 @@
636+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
637+/* { dg-options "-mcpu=e500mc64" } */
638+
639+#include "builtin-isel.h"
640+
641+/* Equality comparisons. */
642+
643+#undef FUNCTION_NAME
644+#define FUNCTION_NAME isel64eq
645+
646+SIGNED64_PROTO
647+{
648+ L = ISEL_BUILTIN (x, y, a, b);
649+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b);
650+ r = ISEL_BUILTIN (x, y, p, q);
651+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
652+ L = ISEL_BUILTIN (p, q, a, b);
653+ /* Equality checks explicitly permit unsigned comparison operands. */
654+ L = ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b);
655+ r = ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, p, q);
656+}
657+
658+/* less-than, greater-than. */
659+
660+#undef FUNCTION_NAME
661+#define FUNCTION_NAME isel64lt
662+
663+SIGNED64_PROTO
664+{
665+ L = ISEL_BUILTIN (x, y, a, b);
666+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b);
667+ r = ISEL_BUILTIN (x, y, p, q);
668+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
669+}
670+
671+#undef FUNCTION_NAME
672+#define FUNCTION_NAME isel64gt
673+
674+SIGNED64_PROTO
675+{
676+ L = ISEL_BUILTIN (x, y, a, b);
677+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b);
678+ r = ISEL_BUILTIN (x, y, p, q);
679+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
680+}
681+
682+/* Unsigned variants. These permit unsigned and pointer operands for
683+ comparison only. */
684+
685+#undef FUNCTION_NAME
686+#define FUNCTION_NAME isel64ltu
687+
688+UNSIGNED64_PROTO
689+{
690+ L = ISEL_BUILTIN (x, y, a, b);
691+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b);
692+ r = ISEL_BUILTIN (x, y, p, q);
693+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
694+ L = ISEL_BUILTIN (p, q, a, b);
695+}
696+
697+#undef FUNCTION_NAME
698+#define FUNCTION_NAME isel64gtu
699+
700+UNSIGNED64_PROTO
701+{
702+ L = ISEL_BUILTIN (x, y, a, b);
703+ U = ISEL_BUILTIN (x, y, (unsigned long) a, (unsigned long) b);
704+ r = ISEL_BUILTIN (x, y, p, q);
705+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
706+ L = ISEL_BUILTIN (p, q, a, b);
707+}
708+
709+/* Don't use bare isel, as that'll match function names and the like. */
710+/* { dg-final { scan-assembler-times "isel " 26 } } */
711diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c
712--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c 1969-12-31 18:00:00.000000000 -0600
713+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel64-errors.c 2011-07-25 12:27:55.372965000 -0500
714@@ -0,0 +1,110 @@
715+/* Test rejection of invalid parameter combinations in isel builtins. */
716+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
717+/* { dg-options "-mcpu=e5500" } */
718+
719+#include "builtin-isel.h"
720+
721+
722+/* Equality comparisons. */
723+
724+#undef FUNCTION_NAME
725+#define FUNCTION_NAME isel64eq
726+
727+SIGNED64_PROTO
728+{
729+ /* Mismatches in argument type. */
730+ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */
731+ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */
732+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */
733+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */
734+ /* Mismatches in return type. */
735+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */
736+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */
737+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */
738+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */
739+}
740+
741+/* less-than, greater-than. */
742+
743+#undef FUNCTION_NAME
744+#define FUNCTION_NAME isel64lt
745+
746+SIGNED64_PROTO
747+{
748+ /* Unsigned comparison should be done with the *u variants. */
749+ ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */
750+ /* So should pointer comparison. */
751+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */
752+ /* Mismatches in argument type. */
753+ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */
754+ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */
755+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */
756+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */
757+ /* Mismatches in return type. */
758+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */
759+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */
760+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */
761+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */
762+}
763+
764+#undef FUNCTION_NAME
765+#define FUNCTION_NAME isel64gt
766+
767+SIGNED64_PROTO
768+{
769+ /* Unsigned comparison should be done with the *u variants. */
770+ ISEL_BUILTIN ((unsigned long) x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */
771+ /* So should pointer comparison. */
772+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */
773+ /* Mismatches in argument type. */
774+ ISEL_BUILTIN ((unsigned long) x, y, a, b); /* { dg-error "isel intrinsic" } */
775+ ISEL_BUILTIN (x, (unsigned long) y, a, b); /* { dg-error "isel intrinsic" } */
776+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */
777+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */
778+ /* Mismatches in return type. */
779+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */
780+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */
781+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */
782+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */
783+}
784+
785+/* Unsigned variants. These permit unsigned and pointer operands for
786+ comparison only. */
787+
788+#undef FUNCTION_NAME
789+#define FUNCTION_NAME isel64ltu
790+
791+UNSIGNED64_PROTO
792+{
793+ /* Signed comparison should be done with the signed variants. */
794+ ISEL_BUILTIN ((long) x, (long) y, a, b); /* { dg-error "isel intrinsic" } */
795+ /* Mismatches in argument type. */
796+ ISEL_BUILTIN ((long) x, y, a, b); /* { dg-error "isel intrinsic" } */
797+ ISEL_BUILTIN (x, (long) y, a, b); /* { dg-error "isel intrinsic" } */
798+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */
799+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */
800+ /* Mismatches in return type. */
801+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */
802+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */
803+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */
804+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */
805+}
806+
807+#undef FUNCTION_NAME
808+#define FUNCTION_NAME isel64gtu
809+
810+UNSIGNED64_PROTO
811+{
812+ /* Signed comparison should be done with the signed variants. */
813+ ISEL_BUILTIN ((long) x, (long) y, a, b); /* { dg-error "isel intrinsic" } */
814+ /* Mismatches in argument type. */
815+ ISEL_BUILTIN ((long) x, y, a, b); /* { dg-error "isel intrinsic" } */
816+ ISEL_BUILTIN (x, (long) y, a, b); /* { dg-error "isel intrinsic" } */
817+ ISEL_BUILTIN ((long *) p, q, a, b); /* { dg-error "isel intrinsic" } */
818+ ISEL_BUILTIN (p, (long *) q, a, b); /* { dg-error "isel intrinsic" } */
819+ /* Mismatches in return type. */
820+ ISEL_BUILTIN (x, y, (unsigned long) a, b); /* { dg-error "isel intrinsic" } */
821+ ISEL_BUILTIN (x, y, a, (unsigned long) b); /* { dg-error "isel intrinsic" } */
822+ ISEL_BUILTIN (x, y, (long *) p, q); /* { dg-error "isel intrinsic" } */
823+ ISEL_BUILTIN (x, y, p, (long *) q); /* { dg-error "isel intrinsic" } */
824+}
825diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.c
826--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.c 1969-12-31 18:00:00.000000000 -0600
827+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.c 2011-07-25 12:27:55.405959000 -0500
828@@ -0,0 +1,81 @@
829+/* { dg-do compile } */
830+/* { dg-options "-mcpu=e500mc" } */
831+
832+#include "builtin-isel.h"
833+
834+/* We're not being clever with the preprocessor here because DejaGNU
835+ will get confused. We do try to use it to eliminate what duplication
836+ we can. */
837+
838+/* We check to see that the resolution permits polymorphic results. */
839+
840+/* Equality comparisons. */
841+
842+#undef FUNCTION_NAME
843+#define FUNCTION_NAME iseleq
844+
845+SIGNED_PROTO
846+{
847+ i = ISEL_BUILTIN (x, y, a, b);
848+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b);
849+ r = ISEL_BUILTIN (x, y, p, q);
850+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
851+ i = ISEL_BUILTIN (p, q, a, b);
852+ /* Equality checks explicitly permit unsigned comparison operands. */
853+ i = ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b);
854+ r = ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, p, q);
855+}
856+
857+/* less-than, greater-than. */
858+
859+#undef FUNCTION_NAME
860+#define FUNCTION_NAME isellt
861+
862+SIGNED_PROTO
863+{
864+ i = ISEL_BUILTIN (x, y, a, b);
865+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b);
866+ r = ISEL_BUILTIN (x, y, p, q);
867+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
868+}
869+
870+#undef FUNCTION_NAME
871+#define FUNCTION_NAME iselgt
872+
873+SIGNED_PROTO
874+{
875+ i = ISEL_BUILTIN (x, y, a, b);
876+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b);
877+ r = ISEL_BUILTIN (x, y, p, q);
878+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
879+}
880+
881+/* Unsigned variants. These permit unsigned and pointer operands for
882+ comparison only. */
883+
884+#undef FUNCTION_NAME
885+#define FUNCTION_NAME iselltu
886+
887+UNSIGNED_PROTO
888+{
889+ i = ISEL_BUILTIN (x, y, a, b);
890+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b);
891+ r = ISEL_BUILTIN (x, y, p, q);
892+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
893+ i = ISEL_BUILTIN (p, q, a, b);
894+}
895+
896+#undef FUNCTION_NAME
897+#define FUNCTION_NAME iselgtu
898+
899+UNSIGNED_PROTO
900+{
901+ i = ISEL_BUILTIN (x, y, a, b);
902+ u = ISEL_BUILTIN (x, y, (unsigned int) a, (unsigned int) b);
903+ r = ISEL_BUILTIN (x, y, p, q);
904+ r = ISEL_BUILTIN (x, y, (char *) p, (char *) q);
905+ i = ISEL_BUILTIN (p, q, a, b);
906+}
907+
908+/* Don't use bare isel, as that'll match function names and the like. */
909+/* { dg-final { scan-assembler-times "isel " 26 } } */
910diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c
911--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c 1969-12-31 18:00:00.000000000 -0600
912+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel-errors.c 2011-07-25 12:27:55.443938000 -0500
913@@ -0,0 +1,117 @@
914+/* Test rejection of invalid parameter combinations in isel builtins. */
915+/* { dg-do compile } */
916+/* { dg-options "-mcpu=e500mc" } */
917+
918+#include "builtin-isel.h"
919+
920+/* We're not being clever with the preprocessor here because DejaGNU
921+ will get confused. We do try to use it to eliminate what duplication
922+ we can. */
923+
924+/* We check basic resolution of each builtin. We also check to see that
925+ the resolution permits polymorphic results. Argument type mismatches
926+ and result type mismatches are not permitted, except where noted. */
927+
928+/* Equality comparisons. */
929+
930+#undef FUNCTION_NAME
931+#define FUNCTION_NAME iseleq
932+
933+SIGNED_PROTO
934+{
935+ /* Mismatches in argument type. */
936+ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */
937+ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */
938+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */
939+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */
940+ /* Mismatches in return type. */
941+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */
942+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */
943+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */
944+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */
945+}
946+
947+/* less-than, greater-than. */
948+
949+#undef FUNCTION_NAME
950+#define FUNCTION_NAME isellt
951+
952+SIGNED_PROTO
953+{
954+ /* Unsigned comparison should be done with the *u variants. */
955+ ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */
956+ /* So should pointer comparison. */
957+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */
958+ /* Mismatches in argument type. */
959+ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */
960+ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */
961+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */
962+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */
963+ /* Mismatches in return type. */
964+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */
965+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */
966+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */
967+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */
968+}
969+
970+#undef FUNCTION_NAME
971+#define FUNCTION_NAME iselgt
972+
973+SIGNED_PROTO
974+{
975+ /* Unsigned comparison should be done with the *u variants. */
976+ ISEL_BUILTIN ((unsigned int) x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */
977+ /* So should pointer comparison. */
978+ ISEL_BUILTIN (p, q, a, b); /* { dg-error "isel intrinsic" } */
979+ /* Mismatches in argument type. */
980+ ISEL_BUILTIN ((unsigned int) x, y, a, b); /* { dg-error "isel intrinsic" } */
981+ ISEL_BUILTIN (x, (unsigned int) y, a, b); /* { dg-error "isel intrinsic" } */
982+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */
983+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */
984+ /* Mismatches in return type. */
985+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */
986+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */
987+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */
988+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */
989+}
990+
991+/* Unsigned variants. These permit unsigned and pointer operands for
992+ comparison only. */
993+
994+#undef FUNCTION_NAME
995+#define FUNCTION_NAME iselltu
996+
997+UNSIGNED_PROTO
998+{
999+ /* Signed comparison should be done with the signed variants. */
1000+ ISEL_BUILTIN ((int) x, (int) y, a, b); /* { dg-error "isel intrinsic" } */
1001+ /* Mismatches in argument type. */
1002+ ISEL_BUILTIN ((int) x, y, a, b); /* { dg-error "isel intrinsic" } */
1003+ ISEL_BUILTIN (x, (int) y, a, b); /* { dg-error "isel intrinsic" } */
1004+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */
1005+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */
1006+ /* Mismatches in return type. */
1007+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */
1008+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */
1009+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */
1010+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */
1011+}
1012+
1013+#undef FUNCTION_NAME
1014+#define FUNCTION_NAME iselgtu
1015+
1016+UNSIGNED_PROTO
1017+{
1018+ /* Signed comparison should be done with the signed variants. */
1019+ ISEL_BUILTIN ((int) x, (int) y, a, b); /* { dg-error "isel intrinsic" } */
1020+ /* Mismatches in argument type. */
1021+ ISEL_BUILTIN ((int) x, y, a, b); /* { dg-error "isel intrinsic" } */
1022+ ISEL_BUILTIN (x, (int) y, a, b); /* { dg-error "isel intrinsic" } */
1023+ ISEL_BUILTIN ((int *) p, q, a, b); /* { dg-error "isel intrinsic" } */
1024+ ISEL_BUILTIN (p, (int *) q, a, b); /* { dg-error "isel intrinsic" } */
1025+ /* Mismatches in return type. */
1026+ ISEL_BUILTIN (x, y, (unsigned int) a, b); /* { dg-error "isel intrinsic" } */
1027+ ISEL_BUILTIN (x, y, a, (unsigned int) b); /* { dg-error "isel intrinsic" } */
1028+ ISEL_BUILTIN (x, y, (int *) p, q); /* { dg-error "isel intrinsic" } */
1029+ ISEL_BUILTIN (x, y, p, (int *) q); /* { dg-error "isel intrinsic" } */
1030+}
1031diff -ruN gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.h gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.h
1032--- gcc-4.6.0-orig/gcc/testsuite/gcc.target/powerpc/builtin-isel.h 1969-12-31 18:00:00.000000000 -0600
1033+++ gcc-4.6.0-new/gcc/testsuite/gcc.target/powerpc/builtin-isel.h 2011-07-25 12:27:55.483942000 -0500
1034@@ -0,0 +1,25 @@
1035+/* Common definitions for builtin isel testing. */
1036+
1037+#define SIGNED_ARGLIST (int x, int y, int a, int b, void *p, void *q)
1038+#define UNSIGNED_ARGLIST (unsigned int x, unsigned int y, \
1039+ int a, int b, void *p, void *q)
1040+
1041+#define SIGNED_PROTO void FUNCTION_NAME SIGNED_ARGLIST
1042+#define UNSIGNED_PROTO void FUNCTION_NAME UNSIGNED_ARGLIST
1043+
1044+#define SIGNED64_ARGLIST (long x, long y, long a, long b, void *p, void *q)
1045+#define UNSIGNED64_ARGLIST (unsigned long x, unsigned long y, \
1046+ long a, long b, void *p, void *q)
1047+
1048+#define SIGNED64_PROTO void FUNCTION_NAME SIGNED64_ARGLIST
1049+#define UNSIGNED64_PROTO void FUNCTION_NAME UNSIGNED64_ARGLIST
1050+
1051+#define CONCAT2(X,Y) X##Y
1052+#define CONCAT(X,Y) CONCAT2(X, Y)
1053+#define ISEL_BUILTIN CONCAT(__builtin_, FUNCTION_NAME)
1054+
1055+volatile int i;
1056+volatile unsigned int u;
1057+volatile void *r;
1058+volatile long L;
1059+volatile unsigned long U;
diff --git a/recipes-devtools/gcc/files/gcc.case_values.patch b/recipes-devtools/gcc/files/gcc.case_values.patch
deleted file mode 100644
index 5be766d..0000000
--- a/recipes-devtools/gcc/files/gcc.case_values.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1--- gcc-4.6.0/gcc/params.def-orig 2011-06-16 11:39:42.412634260 -0500
2+++ gcc-4.6.0/gcc/params.def 2011-06-16 11:41:29.457630886 -0500
3@@ -39,6 +39,11 @@
4
5 Be sure to add an entry to invoke.texi summarizing the parameter. */
6
7+DEFPARAM (PARAM_CASE_VALUES_THRESHOLD,
8+ "case-values-threshold",
9+ "Minimum number of case statements for each a jump table will be used",
10+ 4, 4, 1000)
11+
12 /* The threshold ratio between current and hottest structure counts.
13 We say that if the ratio of the current structure count,
14 calculated by profiling, to the hottest structure count
15--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-16 12:24:03.440630751 -0500
16+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-16 12:24:51.450630163 -0500
17@@ -1282,6 +1282,7 @@
18 struct cl_target_option *);
19 static bool rs6000_can_inline_p (tree, tree);
20 static void rs6000_set_current_function (tree);
21+static unsigned int rs6000_case_values_threshold (void);
22
23
24 /* Default register names. */
25--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-16 11:18:27.131631000 -0500
26+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-16 11:38:15.225631714 -0500
27@@ -1704,6 +1704,9 @@
28 #undef TARGET_SET_CURRENT_FUNCTION
29 #define TARGET_SET_CURRENT_FUNCTION rs6000_set_current_function
30
31+#undef TARGET_CASE_VALUES_THRESHOLD
32+#define TARGET_CASE_VALUES_THRESHOLD rs6000_case_values_threshold
33+
34 struct gcc_target targetm = TARGET_INITIALIZER;
35
36
37@@ -28179,6 +28182,12 @@
38 }
39
40
41+static unsigned int
42+rs6000_case_values_threshold (void)
43+{
44+ return PARAM_VALUE (PARAM_CASE_VALUES_THRESHOLD);
45+}
46+
47 /* Save the current options */
48
49 static void
50--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-06-17 12:19:00.463631000 -0500
51+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-06-17 12:06:28.904630840 -0500
52@@ -2906,6 +2906,13 @@
53 if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32))
54 rs6000_block_move_inline_limit = (TARGET_POWERPC64 ? 64 : 32);
55
56+ if ((rs6000_cpu == PROCESSOR_PPC8540
57+ || rs6000_cpu == PROCESSOR_PPCE500MC
58+ || rs6000_cpu == PROCESSOR_PPCE5500
59+ || rs6000_cpu == PROCESSOR_PPCE6500)
60+ && global_options_set.x_param_values[(int) PARAM_CASE_VALUES_THRESHOLD] != true)
61+ global_options.x_param_values[(int) PARAM_CASE_VALUES_THRESHOLD] = 8;
62+
63 if (global_init_p)
64 {
65 /* If the appropriate debug option is enabled, replace the target hooks
diff --git a/recipes-devtools/gcc/files/gcc.check_path_validity.patch b/recipes-devtools/gcc/files/gcc.check_path_validity.patch
deleted file mode 100644
index 5d70a39..0000000
--- a/recipes-devtools/gcc/files/gcc.check_path_validity.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1--- gcc-4_6-branch/gcc/Makefile.in.orig 2012-03-06 01:10:15.277196930 -0600
2+++ gcc-4_6-branch/gcc/Makefile.in 2012-03-06 01:10:54.083378912 -0600
3@@ -4170,6 +4170,9 @@
4 else \
5 set -e; for ml in `cat fixinc_list`; do \
6 sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
7+ if test "x$${sysroot_headers_suffix}" = "x"; then \
8+ continue; \
9+ fi; \
10 multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
11 fix_dir=include-fixed$${multi_dir}; \
12 if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
diff --git a/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch b/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch
deleted file mode 100644
index 16b3538..0000000
--- a/recipes-devtools/gcc/files/gcc.e5500_mfocr.patch
+++ /dev/null
@@ -1,181 +0,0 @@
1# Problem: Although gcc is prepared to avoid "mfocr" instructions
2 (which takes 5 cycles in our parts and 2 cycles on IBM parts). This
3 instruction is used on the mentioned program. What is suspicious
4 about it, is that the code compiled for 32 bits does not use the
5 instruction. So, it could be a omission in the previous
6 implementation, or a bug, or a new opportunity.
7# Reported by: Performance team (PARC)
8# Owned by: Ping Hu
9# Action:
10 * 'mfocr' flag problem: that 'mfocr' flag was uncorrectly set for E5500,
11 which caused the 'mfocr' instructions generated even on E5500.
12 * avoid generating 'mfcr' and 'mfocr' instructions: due to the fact
13 that both instructions are expensive on Freescale processors.
14 * A target specific flag, -mslow-mfocr, can be used to avoid generating
15 'mfcr' and 'mfocr' instructions in 64-bit mode, thus restoring legacy
16 operations if desired.
17
18diff -ruN gcc-4.6.2-clean/gcc/config/rs6000/rs6000.c gcc-4.6.2/gcc/config/rs6000/rs6000.c
19--- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.c 2011-11-22 11:11:47.479144000 -0600
20+++ gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-11-29 16:23:45.074279998 -0600
21@@ -1885,6 +1885,7 @@
22 POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_POWERPC64}
23 };
24
25+
26 /* Look up a processor name for -mcpu=xxx and -mtune=xxx. Return -1 if the
27 name is invalid. */
28
29@@ -2902,6 +2903,10 @@
30 || rs6000_cpu == PROCESSOR_PPCE6500)
31 target_flags &= ~MASK_PPC_GPOPT;
32
33+ if (rs6000_cpu == PROCESSOR_PPCE5500)
34+ target_flags &= ~MASK_MFCRF;
35+
36+
37 /* store_one_arg depends on expand_block_move to handle at least the
38 size of reg_parm_stack_space. */
39 if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32))
40diff -ruN gcc-4.6.2-clean/gcc/config/rs6000/rs6000.md gcc-4.6.2/gcc/config/rs6000/rs6000.md
41--- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.md 2011-11-22 11:11:47.036144001 -0600
42+++ gcc-4.6.2/gcc/config/rs6000/rs6000.md 2011-11-29 16:24:04.705280001 -0600
43@@ -215,6 +215,8 @@
44 ; (one with a '.') will compare; and the size used for arithmetic carries.
45 (define_mode_iterator P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")])
46
47+(define_mode_iterator P2 [(SI "TARGET_32BIT || TARGET_SLOW_MFOCR") (DI "TARGET_64BIT")])
48+
49 ; Any hardware-supported floating-point mode
50 (define_mode_iterator FP [
51 (SF "TARGET_HARD_FLOAT
52@@ -2208,9 +2210,9 @@
53
54 (define_insn ""
55 [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")
56- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r"))
57+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r"))
58 (const_int 0)))
59- (clobber (match_scratch:P 2 "=r,r"))]
60+ (clobber (match_scratch:P2 2 "=r,r"))]
61 ""
62 "@
63 neg. %2,%1
64@@ -2220,12 +2222,12 @@
65
66 (define_split
67 [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")
68- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" ""))
69+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" ""))
70 (const_int 0)))
71- (clobber (match_scratch:P 2 ""))]
72+ (clobber (match_scratch:P2 2 ""))]
73 "reload_completed"
74 [(set (match_dup 2)
75- (neg:P (match_dup 1)))
76+ (neg:P2 (match_dup 1)))
77 (set (match_dup 0)
78 (compare:CC (match_dup 2)
79 (const_int 0)))]
80@@ -2233,10 +2235,10 @@
81
82 (define_insn ""
83 [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
84- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r"))
85+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r"))
86 (const_int 0)))
87- (set (match_operand:P 0 "gpc_reg_operand" "=r,r")
88- (neg:P (match_dup 1)))]
89+ (set (match_operand:P2 0 "gpc_reg_operand" "=r,r")
90+ (neg:P2 (match_dup 1)))]
91 ""
92 "@
93 neg. %0,%1
94@@ -2246,13 +2248,13 @@
95
96 (define_split
97 [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")
98- (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" ""))
99+ (compare:CC (neg:P2 (match_operand:P2 1 "gpc_reg_operand" ""))
100 (const_int 0)))
101- (set (match_operand:P 0 "gpc_reg_operand" "")
102- (neg:P (match_dup 1)))]
103+ (set (match_operand:P2 0 "gpc_reg_operand" "")
104+ (neg:P2 (match_dup 1)))]
105 "reload_completed"
106 [(set (match_dup 0)
107- (neg:P (match_dup 1)))
108+ (neg:P2 (match_dup 1)))
109 (set (match_dup 2)
110 (compare:CC (match_dup 0)
111 (const_int 0)))]
112@@ -15286,31 +15288,31 @@
113 [(set_attr "length" "12")])
114
115 (define_insn_and_split "*gtu<mode>"
116- [(set (match_operand:P 0 "gpc_reg_operand" "=r")
117- (gtu:P (match_operand:P 1 "gpc_reg_operand" "r")
118- (match_operand:P 2 "reg_or_short_operand" "rI")))]
119+ [(set (match_operand:P2 0 "gpc_reg_operand" "=r")
120+ (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r")
121+ (match_operand:P2 2 "reg_or_short_operand" "rI")))]
122 ""
123 "#"
124 ""
125- [(set (match_dup 0) (neg:P (gtu:P (match_dup 1) (match_dup 2))))
126- (set (match_dup 0) (neg:P (match_dup 0)))]
127+ [(set (match_dup 0) (neg:P2 (gtu:P2 (match_dup 1) (match_dup 2))))
128+ (set (match_dup 0) (neg:P2 (match_dup 0)))]
129 "")
130
131 (define_insn_and_split "*gtu<mode>_compare"
132 [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y")
133 (compare:CC
134- (gtu:P (match_operand:P 1 "gpc_reg_operand" "r,r")
135- (match_operand:P 2 "reg_or_short_operand" "rI,rI"))
136+ (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r,r")
137+ (match_operand:P2 2 "reg_or_short_operand" "rI,rI"))
138 (const_int 0)))
139- (set (match_operand:P 0 "gpc_reg_operand" "=r,r")
140- (gtu:P (match_dup 1) (match_dup 2)))]
141+ (set (match_operand:P2 0 "gpc_reg_operand" "=r,r")
142+ (gtu:P2 (match_dup 1) (match_dup 2)))]
143 ""
144 "#"
145 ""
146- [(set (match_dup 0) (neg:P (gtu:P (match_dup 1) (match_dup 2))))
147+ [(set (match_dup 0) (neg:P2 (gtu:P2 (match_dup 1) (match_dup 2))))
148 (parallel [(set (match_dup 3)
149- (compare:CC (neg:P (match_dup 0)) (const_int 0)))
150- (set (match_dup 0) (neg:P (match_dup 0)))])]
151+ (compare:CC (neg:P2 (match_dup 0)) (const_int 0)))
152+ (set (match_dup 0) (neg:P2 (match_dup 0)))])]
153 "")
154
155 (define_insn_and_split "*plus_gtu<mode>"
156@@ -15345,9 +15347,9 @@
157 "")
158
159 (define_insn "*neg_gtu<mode>"
160- [(set (match_operand:P 0 "gpc_reg_operand" "=r")
161- (neg:P (gtu:P (match_operand:P 1 "gpc_reg_operand" "r")
162- (match_operand:P 2 "reg_or_short_operand" "rI"))))]
163+ [(set (match_operand:P2 0 "gpc_reg_operand" "=r")
164+ (neg:P2 (gtu:P2 (match_operand:P2 1 "gpc_reg_operand" "r")
165+ (match_operand:P2 2 "reg_or_short_operand" "rI"))))]
166 ""
167 "{sf%I2|subf%I2c} %0,%1,%2\;{sfe|subfe} %0,%0,%0"
168 [(set_attr "type" "two")
169--- gcc-4.6.2-clean/gcc/config/rs6000/rs6000.opt 2011-11-22 11:11:47.480143999 -0600
170+++ gcc-4.6.2/gcc/config/rs6000/rs6000.opt 2011-11-29 16:24:16.322280634 -0600
171@@ -381,6 +381,10 @@
172 Target
173 Generate SPE SIMD instructions on E500
174
175+mslow-mfocr
176+Target Report Var(TARGET_SLOW_MFOCR)
177+Generate slow mfocr instructions
178+
179 mpaired
180 Target Var(rs6000_paired_float) Save
181 Generate PPC750CL paired-single instructions
diff --git a/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch b/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch
deleted file mode 100644
index f9fa33d..0000000
--- a/recipes-devtools/gcc/files/gcc.e6500-FSF46.patch
+++ /dev/null
@@ -1,4011 +0,0 @@
1diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/altivec.h gcc-4.6.2/gcc/config/rs6000/altivec.h
2--- gcc-4.6.2-orig/gcc/config/rs6000/altivec.h 2011-02-02 23:42:19.000000000 -0600
3+++ gcc-4.6.2/gcc/config/rs6000/altivec.h 2012-03-06 12:33:43.943038996 -0600
4@@ -322,6 +322,30 @@
5 #define vec_vsx_st __builtin_vec_vsx_st
6 #endif
7
8+#ifdef __ALTIVEC2__
9+/* New Altivec instructions */
10+#define vec_absd __builtin_vec_absd
11+#define vec_lvexbx __builtin_vec_lvexbx
12+#define vec_lvexhx __builtin_vec_lvexhx
13+#define vec_lvexwx __builtin_vec_lvexwx
14+#define vec_stvexbx __builtin_vec_stvexbx
15+#define vec_stvexhx __builtin_vec_stvexhx
16+#define vec_stvexwx __builtin_vec_stvexwx
17+#define vec_lvswx __builtin_vec_lvswx
18+#define vec_lvswxl __builtin_vec_lvswxl
19+#define vec_stvswx __builtin_vec_stvswx
20+#define vec_stvswxl __builtin_vec_stvswxl
21+#define vec_lvsm __builtin_vec_lvsm
22+#define vec_lvtlx __builtin_vec_lvtlx
23+#define vec_lvtlxl __builtin_vec_lvtlxl
24+#define vec_lvtrx __builtin_vec_lvtrx
25+#define vec_lvtrxl __builtin_vec_lvtrxl
26+#define vec_stvflx __builtin_vec_stvflx
27+#define vec_stvflxl __builtin_vec_stvflxl
28+#define vec_stvfrx __builtin_vec_stvfrx
29+#define vec_stvfrxl __builtin_vec_stvfrxl
30+#endif
31+
32 /* Predicates.
33 For C++, we use templates in order to allow non-parenthesized arguments.
34 For C, instead, we use macros since non-parenthesized arguments were
35diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/altivec.md gcc-4.6.2/gcc/config/rs6000/altivec.md
36--- gcc-4.6.2-orig/gcc/config/rs6000/altivec.md 2011-07-08 15:10:18.000000000 -0500
37+++ gcc-4.6.2/gcc/config/rs6000/altivec.md 2012-03-06 12:24:35.058038999 -0600
38@@ -91,9 +91,11 @@
39 (UNSPEC_LVSL 194)
40 (UNSPEC_LVSR 195)
41 (UNSPEC_LVE 196)
42+ (UNSPEC_LVEX 197)
43 (UNSPEC_STVX 201)
44 (UNSPEC_STVXL 202)
45 (UNSPEC_STVE 203)
46+ (UNSPEC_STVEX 204)
47 (UNSPEC_SET_VSCR 213)
48 (UNSPEC_GET_VRSAVE 214)
49 (UNSPEC_LVX 215)
50@@ -123,6 +125,19 @@
51 (UNSPEC_STVLXL 241)
52 (UNSPEC_STVRX 242)
53 (UNSPEC_STVRXL 243)
54+ (UNSPEC_LVTLX 244)
55+ (UNSPEC_LVTLXL 245)
56+ (UNSPEC_LVTRX 246)
57+ (UNSPEC_LVTRXL 247)
58+ (UNSPEC_STVFLX 248)
59+ (UNSPEC_STVFLXL 249)
60+ (UNSPEC_STVFRX 250)
61+ (UNSPEC_STVFRXL 251)
62+ (UNSPEC_LVSWX 252)
63+ (UNSPEC_LVSWXL 253)
64+ (UNSPEC_LVSM 254)
65+ (UNSPEC_STVSWX 255)
66+ (UNSPEC_STVSWXL 256)
67 (UNSPEC_VMULWHUB 308)
68 (UNSPEC_VMULWLUB 309)
69 (UNSPEC_VMULWHSB 310)
70@@ -143,6 +158,9 @@
71 (UNSPEC_VUPKLS_V4SF 325)
72 (UNSPEC_VUPKHU_V4SF 326)
73 (UNSPEC_VUPKLU_V4SF 327)
74+ (UNSPEC_VABSDUB 328)
75+ (UNSPEC_VABSDUH 329)
76+ (UNSPEC_VABSDUW 330)
77 ])
78
79 (define_constants
80@@ -323,6 +341,34 @@
81
82 ;; Simple binary operations.
83
84+;; absd
85+(define_insn "altivec_vabsduw"
86+ [(set (match_operand:V4SI 0 "register_operand" "=v")
87+ (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")
88+ (match_operand:V4SI 2 "register_operand" "v")]
89+ UNSPEC_VABSDUW))]
90+ "TARGET_ALTIVEC2"
91+ "vabsduw %0,%1,%2"
92+ [(set_attr "type" "vecsimple")])
93+
94+(define_insn "altivec_vabsduh"
95+ [(set (match_operand:V8HI 0 "register_operand" "=v")
96+ (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "v")
97+ (match_operand:V8HI 2 "register_operand" "v")]
98+ UNSPEC_VABSDUH))]
99+ "TARGET_ALTIVEC2"
100+ "vabsduh %0,%1,%2"
101+ [(set_attr "type" "vecsimple")])
102+
103+(define_insn "altivec_vabsdub"
104+ [(set (match_operand:V16QI 0 "register_operand" "=v")
105+ (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")
106+ (match_operand:V16QI 2 "register_operand" "v")]
107+ UNSPEC_VABSDUB))]
108+ "TARGET_ALTIVEC2"
109+ "vabsdub %0,%1,%2"
110+ [(set_attr "type" "vecsimple")])
111+
112 ;; add
113 (define_insn "add<mode>3"
114 [(set (match_operand:VI 0 "register_operand" "=v")
115@@ -1741,6 +1787,15 @@
116 "lvewx %0,%y1"
117 [(set_attr "type" "vecload")])
118
119+(define_insn "altivec_lvex<VI_char>x"
120+ [(parallel
121+ [(set (match_operand:VI 0 "register_operand" "=v")
122+ (match_operand:VI 1 "memory_operand" "Z"))
123+ (unspec [(const_int 0)] UNSPEC_LVEX)])]
124+ "TARGET_ALTIVEC2"
125+ "lvex<VI_char>x %0,%y1"
126+ [(set_attr "type" "vecload")])
127+
128 (define_insn "altivec_lvxl"
129 [(parallel
130 [(set (match_operand:V4SI 0 "register_operand" "=v")
131@@ -1791,6 +1846,13 @@
132 "stvewx %1,%y0"
133 [(set_attr "type" "vecstore")])
134
135+(define_insn "altivec_stvex<VI_char>x"
136+ [(set (match_operand:<VI_scalar> 0 "memory_operand" "=Z")
137+ (unspec:<VI_scalar> [(match_operand:VI 1 "register_operand" "v")] UNSPEC_STVEX))]
138+ "TARGET_ALTIVEC2"
139+ "stvex<VI_char>x %1,%y0"
140+ [(set_attr "type" "vecstore")])
141+
142 ;; Generate
143 ;; vspltis? SCRATCH0,0
144 ;; vsubu?m SCRATCH2,SCRATCH1,%1
145@@ -2358,7 +2420,7 @@
146 DONE;
147 }")
148
149-;; Vector SIMD PEM v2.06c defines LVLX, LVLXL, LVRX, LVRXL,
150+;; Vector SIMD PEM v2.06c defines LVLX, LVLXL, LVRX1, LVRXL,
151 ;; STVLX, STVLXL, STVVRX, STVRXL are available only on Cell.
152 (define_insn "altivec_lvlx"
153 [(set (match_operand:V16QI 0 "register_operand" "=v")
154@@ -2394,8 +2456,8 @@
155
156 (define_insn "altivec_stvlx"
157 [(parallel
158- [(set (match_operand:V4SI 0 "memory_operand" "=Z")
159- (match_operand:V4SI 1 "register_operand" "v"))
160+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
161+ (match_operand:V16QI 1 "register_operand" "v"))
162 (unspec [(const_int 0)] UNSPEC_STVLX)])]
163 "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
164 "stvlx %1,%y0"
165@@ -2403,8 +2465,8 @@
166
167 (define_insn "altivec_stvlxl"
168 [(parallel
169- [(set (match_operand:V4SI 0 "memory_operand" "=Z")
170- (match_operand:V4SI 1 "register_operand" "v"))
171+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
172+ (match_operand:V16QI 1 "register_operand" "v"))
173 (unspec [(const_int 0)] UNSPEC_STVLXL)])]
174 "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
175 "stvlxl %1,%y0"
176@@ -2412,8 +2474,8 @@
177
178 (define_insn "altivec_stvrx"
179 [(parallel
180- [(set (match_operand:V4SI 0 "memory_operand" "=Z")
181- (match_operand:V4SI 1 "register_operand" "v"))
182+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
183+ (match_operand:V16QI 1 "register_operand" "v"))
184 (unspec [(const_int 0)] UNSPEC_STVRX)])]
185 "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
186 "stvrx %1,%y0"
187@@ -2421,13 +2483,123 @@
188
189 (define_insn "altivec_stvrxl"
190 [(parallel
191- [(set (match_operand:V4SI 0 "memory_operand" "=Z")
192- (match_operand:V4SI 1 "register_operand" "v"))
193+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
194+ (match_operand:V16QI 1 "register_operand" "v"))
195 (unspec [(const_int 0)] UNSPEC_STVRXL)])]
196 "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
197 "stvrxl %1,%y0"
198 [(set_attr "type" "vecstore")])
199
200+(define_insn "altivec_lvtlx"
201+ [(set (match_operand:V16QI 0 "register_operand" "=v")
202+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
203+ UNSPEC_LVTLX))]
204+ "TARGET_ALTIVEC2"
205+ "lvtlx %0,%y1"
206+ [(set_attr "type" "vecload")])
207+
208+(define_insn "altivec_lvtlxl"
209+ [(set (match_operand:V16QI 0 "register_operand" "=v")
210+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
211+ UNSPEC_LVTLXL))]
212+ "TARGET_ALTIVEC2"
213+ "lvtlxl %0,%y1"
214+ [(set_attr "type" "vecload")])
215+
216+(define_insn "altivec_lvtrx"
217+ [(set (match_operand:V16QI 0 "register_operand" "=v")
218+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
219+ UNSPEC_LVTRX))]
220+ "TARGET_ALTIVEC2"
221+ "lvtrx %0,%y1"
222+ [(set_attr "type" "vecload")])
223+
224+(define_insn "altivec_lvtrxl"
225+ [(set (match_operand:V16QI 0 "register_operand" "=v")
226+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
227+ UNSPEC_LVTRXL))]
228+ "TARGET_ALTIVEC2"
229+ "lvtrxl %0,%y1"
230+ [(set_attr "type" "vecload")])
231+
232+(define_insn "altivec_stvflx"
233+ [(parallel
234+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
235+ (match_operand:V16QI 1 "register_operand" "v"))
236+ (unspec [(const_int 0)] UNSPEC_STVFLX)])]
237+ "TARGET_ALTIVEC2"
238+ "stvflx %1,%y0"
239+ [(set_attr "type" "vecstore")])
240+
241+(define_insn "altivec_stvflxl"
242+ [(parallel
243+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
244+ (match_operand:V16QI 1 "register_operand" "v"))
245+ (unspec [(const_int 0)] UNSPEC_STVFLXL)])]
246+ "TARGET_ALTIVEC2"
247+ "stvflxl %1,%y0"
248+ [(set_attr "type" "vecstore")])
249+
250+(define_insn "altivec_stvfrx"
251+ [(parallel
252+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
253+ (match_operand:V16QI 1 "register_operand" "v"))
254+ (unspec [(const_int 0)] UNSPEC_STVFRX)])]
255+ "TARGET_ALTIVEC2"
256+ "stvfrx %1,%y0"
257+ [(set_attr "type" "vecstore")])
258+
259+(define_insn "altivec_stvfrxl"
260+ [(parallel
261+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
262+ (match_operand:V16QI 1 "register_operand" "v"))
263+ (unspec [(const_int 0)] UNSPEC_STVFRXL)])]
264+ "TARGET_ALTIVEC2"
265+ "stvfrxl %1,%y0"
266+ [(set_attr "type" "vecstore")])
267+
268+(define_insn "altivec_lvswx"
269+ [(set (match_operand:V16QI 0 "register_operand" "=v")
270+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
271+ UNSPEC_LVSWX))]
272+ "TARGET_ALTIVEC2"
273+ "lvswx %0,%y1"
274+ [(set_attr "type" "vecload")])
275+
276+(define_insn "altivec_lvswxl"
277+ [(set (match_operand:V16QI 0 "register_operand" "=v")
278+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
279+ UNSPEC_LVSWXL))]
280+ "TARGET_ALTIVEC2"
281+ "lvswxl %0,%y1"
282+ [(set_attr "type" "vecload")])
283+
284+(define_insn "altivec_lvsm"
285+ [(set (match_operand:V16QI 0 "register_operand" "=v")
286+ (unspec:V16QI [(match_operand 1 "memory_operand" "Z")]
287+ UNSPEC_LVSM))]
288+ "TARGET_ALTIVEC2"
289+ "lvsm %0,%y1"
290+ [(set_attr "type" "vecload")])
291+
292+(define_insn "altivec_stvswx"
293+ [(parallel
294+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
295+ (match_operand:V16QI 1 "register_operand" "v"))
296+ (unspec [(const_int 0)] UNSPEC_STVSWX)])]
297+ "TARGET_ALTIVEC2"
298+ "stvswx %1,%y0"
299+ [(set_attr "type" "vecstore")])
300+
301+(define_insn "altivec_stvswxl"
302+ [(parallel
303+ [(set (match_operand:V16QI 0 "memory_operand" "=Z")
304+ (match_operand:V16QI 1 "register_operand" "v"))
305+ (unspec [(const_int 0)] UNSPEC_STVSWXL)])]
306+ "TARGET_ALTIVEC2"
307+ "stvswxl %1,%y0"
308+ [(set_attr "type" "vecstore")])
309+
310 (define_expand "vec_extract_evenv4si"
311 [(set (match_operand:V4SI 0 "register_operand" "")
312 (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "")
313diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/e5500.md gcc-4.6.2/gcc/config/rs6000/e5500.md
314--- gcc-4.6.2-orig/gcc/config/rs6000/e5500.md 1969-12-31 18:00:00.000000000 -0600
315+++ gcc-4.6.2/gcc/config/rs6000/e5500.md 2012-03-06 12:16:07.590039001 -0600
316@@ -0,0 +1,176 @@
317+;; Pipeline description for Freescale PowerPC e5500 core.
318+;; Copyright (C) 2011 Free Software Foundation, Inc.
319+;; Contributed by Edmar Wienskoski (edmar@freescale.com)
320+;;
321+;; This file is part of GCC.
322+;;
323+;; GCC is free software; you can redistribute it and/or modify it
324+;; under the terms of the GNU General Public License as published
325+;; by the Free Software Foundation; either version 3, or (at your
326+;; option) any later version.
327+;;
328+;; GCC is distributed in the hope that it will be useful, but WITHOUT
329+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
330+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
331+;; License for more details.
332+;;
333+;; You should have received a copy of the GNU General Public License
334+;; along with GCC; see the file COPYING3. If not see
335+;; <http://www.gnu.org/licenses/>.
336+;;
337+;; e5500 64-bit SFX(2), CFX, LSU, FPU, BU
338+;; Max issue 3 insns/clock cycle (includes 1 branch)
339+
340+(define_automaton "e5500_most,e5500_long")
341+(define_cpu_unit "e5500_decode_0,e5500_decode_1" "e5500_most")
342+
343+;; SFX.
344+(define_cpu_unit "e5500_sfx_0,e5500_sfx_1" "e5500_most")
345+
346+;; CFX.
347+(define_cpu_unit "e5500_cfx_stage0,e5500_cfx_stage1" "e5500_most")
348+
349+;; Non-pipelined division.
350+(define_cpu_unit "e5500_cfx_div" "e5500_long")
351+
352+;; LSU.
353+(define_cpu_unit "e5500_lsu" "e5500_most")
354+
355+;; FPU.
356+(define_cpu_unit "e5500_fpu" "e5500_long")
357+
358+;; BU.
359+(define_cpu_unit "e5500_bu" "e5500_most")
360+
361+;; The following units are used to make the automata deterministic.
362+(define_cpu_unit "present_e5500_decode_0" "e5500_most")
363+(define_cpu_unit "present_e5500_sfx_0" "e5500_most")
364+(presence_set "present_e5500_decode_0" "e5500_decode_0")
365+(presence_set "present_e5500_sfx_0" "e5500_sfx_0")
366+
367+;; Some useful abbreviations.
368+(define_reservation "e5500_decode"
369+ "e5500_decode_0|e5500_decode_1+present_e5500_decode_0")
370+(define_reservation "e5500_sfx"
371+ "e5500_sfx_0|e5500_sfx_1+present_e5500_sfx_0")
372+
373+;; SFX.
374+(define_insn_reservation "e5500_sfx" 1
375+ (and (eq_attr "type" "integer,insert_word,insert_dword,delayed_compare,\
376+ shift,cntlz,exts")
377+ (eq_attr "cpu" "ppce5500"))
378+ "e5500_decode,e5500_sfx")
379+
380+(define_insn_reservation "e5500_sfx2" 2
381+ (and (eq_attr "type" "cmp,compare,fast_compare,trap")
382+ (eq_attr "cpu" "ppce5500"))
383+ "e5500_decode,e5500_sfx")
384+
385+(define_insn_reservation "e5500_delayed" 2
386+ (and (eq_attr "type" "var_shift_rotate,var_delayed_compare,popcnt")
387+ (eq_attr "cpu" "ppce5500"))
388+ "e5500_decode,e5500_sfx*2")
389+
390+(define_insn_reservation "e5500_two" 2
391+ (and (eq_attr "type" "two")
392+ (eq_attr "cpu" "ppce5500"))
393+ "e5500_decode,e5500_decode+e5500_sfx,e5500_sfx")
394+
395+(define_insn_reservation "e5500_three" 3
396+ (and (eq_attr "type" "three")
397+ (eq_attr "cpu" "ppce5500"))
398+ "e5500_decode,(e5500_decode+e5500_sfx)*2,e5500_sfx")
399+
400+;; SFX - Mfcr.
401+(define_insn_reservation "e5500_mfcr" 4
402+ (and (eq_attr "type" "mfcr")
403+ (eq_attr "cpu" "ppce5500"))
404+ "e5500_decode,e5500_sfx_0*4")
405+
406+;; SFX - Mtcrf.
407+(define_insn_reservation "e5500_mtcrf" 1
408+ (and (eq_attr "type" "mtcr")
409+ (eq_attr "cpu" "ppce5500"))
410+ "e5500_decode,e5500_sfx_0")
411+
412+;; SFX - Mtjmpr.
413+(define_insn_reservation "e5500_mtjmpr" 1
414+ (and (eq_attr "type" "mtjmpr,mfjmpr")
415+ (eq_attr "cpu" "ppce5500"))
416+ "e5500_decode,e5500_sfx")
417+
418+;; CFX - Multiply.
419+(define_insn_reservation "e5500_multiply" 4
420+ (and (eq_attr "type" "imul")
421+ (eq_attr "cpu" "ppce5500"))
422+ "e5500_decode,e5500_cfx_stage0,e5500_cfx_stage1")
423+
424+(define_insn_reservation "e5500_multiply_i" 5
425+ (and (eq_attr "type" "imul2,imul3,imul_compare")
426+ (eq_attr "cpu" "ppce5500"))
427+ "e5500_decode,e5500_cfx_stage0,\
428+ e5500_cfx_stage0+e5500_cfx_stage1,e5500_cfx_stage1")
429+
430+;; CFX - Divide.
431+(define_insn_reservation "e5500_divide" 16
432+ (and (eq_attr "type" "idiv")
433+ (eq_attr "cpu" "ppce5500"))
434+ "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\
435+ e5500_cfx_div*15")
436+
437+(define_insn_reservation "e5500_divide_d" 26
438+ (and (eq_attr "type" "ldiv")
439+ (eq_attr "cpu" "ppce5500"))
440+ "e5500_decode,e5500_cfx_stage0+e5500_cfx_div,\
441+ e5500_cfx_div*25")
442+
443+;; LSU - Loads.
444+(define_insn_reservation "e5500_load" 3
445+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\
446+ load_l,sync")
447+ (eq_attr "cpu" "ppce5500"))
448+ "e5500_decode,e5500_lsu")
449+
450+(define_insn_reservation "e5500_fpload" 4
451+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
452+ (eq_attr "cpu" "ppce5500"))
453+ "e5500_decode,e5500_lsu")
454+
455+;; LSU - Stores.
456+(define_insn_reservation "e5500_store" 3
457+ (and (eq_attr "type" "store,store_ux,store_u,store_c")
458+ (eq_attr "cpu" "ppce5500"))
459+ "e5500_decode,e5500_lsu")
460+
461+(define_insn_reservation "e5500_fpstore" 3
462+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
463+ (eq_attr "cpu" "ppce5500"))
464+ "e5500_decode,e5500_lsu")
465+
466+;; FP.
467+(define_insn_reservation "e5500_float" 7
468+ (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul")
469+ (eq_attr "cpu" "ppce5500"))
470+ "e5500_decode,e5500_fpu")
471+
472+(define_insn_reservation "e5500_sdiv" 20
473+ (and (eq_attr "type" "sdiv")
474+ (eq_attr "cpu" "ppce5500"))
475+ "e5500_decode,e5500_fpu*20")
476+
477+(define_insn_reservation "e5500_ddiv" 35
478+ (and (eq_attr "type" "ddiv")
479+ (eq_attr "cpu" "ppce5500"))
480+ "e5500_decode,e5500_fpu*35")
481+
482+;; BU.
483+(define_insn_reservation "e5500_branch" 1
484+ (and (eq_attr "type" "jmpreg,branch,isync")
485+ (eq_attr "cpu" "ppce5500"))
486+ "e5500_decode,e5500_bu")
487+
488+;; BU - CR logical.
489+(define_insn_reservation "e5500_cr_logical" 1
490+ (and (eq_attr "type" "cr_logical,delayed_cr")
491+ (eq_attr "cpu" "ppce5500"))
492+ "e5500_decode,e5500_bu")
493diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/e6500.md gcc-4.6.2/gcc/config/rs6000/e6500.md
494--- gcc-4.6.2-orig/gcc/config/rs6000/e6500.md 1969-12-31 18:00:00.000000000 -0600
495+++ gcc-4.6.2/gcc/config/rs6000/e6500.md 2012-03-06 12:16:25.573039002 -0600
496@@ -0,0 +1,213 @@
497+;; Pipeline description for Freescale PowerPC e6500 core.
498+;; Copyright (C) 2011 Free Software Foundation, Inc.
499+;; Contributed by Edmar Wienskoski (edmar@freescale.com)
500+;;
501+;; This file is part of GCC.
502+;;
503+;; GCC is free software; you can redistribute it and/or modify it
504+;; under the terms of the GNU General Public License as published
505+;; by the Free Software Foundation; either version 3, or (at your
506+;; option) any later version.
507+;;
508+;; GCC is distributed in the hope that it will be useful, but WITHOUT
509+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
510+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
511+;; License for more details.
512+;;
513+;; You should have received a copy of the GNU General Public License
514+;; along with GCC; see the file COPYING3. If not see
515+;; <http://www.gnu.org/licenses/>.
516+;;
517+;; e6500 64-bit SFX(2), CFX, LSU, FPU, BU, VSFX, VCFX, VFPU, VPERM
518+;; Max issue 3 insns/clock cycle (includes 1 branch)
519+
520+(define_automaton "e6500_most,e6500_long,e6500_vec")
521+(define_cpu_unit "e6500_decode_0,e6500_decode_1" "e6500_most")
522+
523+;; SFX.
524+(define_cpu_unit "e6500_sfx_0,e6500_sfx_1" "e6500_most")
525+
526+;; CFX.
527+(define_cpu_unit "e6500_cfx_stage0,e6500_cfx_stage1" "e6500_most")
528+
529+;; Non-pipelined division.
530+(define_cpu_unit "e6500_cfx_div" "e6500_long")
531+
532+;; LSU.
533+(define_cpu_unit "e6500_lsu" "e6500_most")
534+
535+;; FPU.
536+(define_cpu_unit "e6500_fpu" "e6500_long")
537+
538+;; BU.
539+(define_cpu_unit "e6500_bu" "e6500_most")
540+
541+;; Altivec unit
542+(define_cpu_unit "e6500_vec,e6500_vecperm" "e6500_vec")
543+
544+;; The following units are used to make the automata deterministic.
545+(define_cpu_unit "present_e6500_decode_0" "e6500_most")
546+(define_cpu_unit "present_e6500_sfx_0" "e6500_most")
547+(presence_set "present_e6500_decode_0" "e6500_decode_0")
548+(presence_set "present_e6500_sfx_0" "e6500_sfx_0")
549+
550+;; Some useful abbreviations.
551+(define_reservation "e6500_decode"
552+ "e6500_decode_0|e6500_decode_1+present_e6500_decode_0")
553+(define_reservation "e6500_sfx"
554+ "e6500_sfx_0|e6500_sfx_1+present_e6500_sfx_0")
555+
556+;; SFX.
557+(define_insn_reservation "e6500_sfx" 1
558+ (and (eq_attr "type" "integer,insert_word,insert_dword,delayed_compare,\
559+ shift,cntlz,exts")
560+ (eq_attr "cpu" "ppce6500"))
561+ "e6500_decode,e6500_sfx")
562+
563+(define_insn_reservation "e6500_sfx2" 2
564+ (and (eq_attr "type" "cmp,compare,fast_compare,trap")
565+ (eq_attr "cpu" "ppce6500"))
566+ "e6500_decode,e6500_sfx")
567+
568+(define_insn_reservation "e6500_delayed" 2
569+ (and (eq_attr "type" "var_shift_rotate,var_delayed_compare,popcnt")
570+ (eq_attr "cpu" "ppce6500"))
571+ "e6500_decode,e6500_sfx*2")
572+
573+(define_insn_reservation "e6500_two" 2
574+ (and (eq_attr "type" "two")
575+ (eq_attr "cpu" "ppce6500"))
576+ "e6500_decode,e6500_decode+e6500_sfx,e6500_sfx")
577+
578+(define_insn_reservation "e6500_three" 3
579+ (and (eq_attr "type" "three")
580+ (eq_attr "cpu" "ppce6500"))
581+ "e6500_decode,(e6500_decode+e6500_sfx)*2,e6500_sfx")
582+
583+;; SFX - Mfcr.
584+(define_insn_reservation "e6500_mfcr" 4
585+ (and (eq_attr "type" "mfcr")
586+ (eq_attr "cpu" "ppce6500"))
587+ "e6500_decode,e6500_sfx_0*4")
588+
589+;; SFX - Mtcrf.
590+(define_insn_reservation "e6500_mtcrf" 1
591+ (and (eq_attr "type" "mtcr")
592+ (eq_attr "cpu" "ppce6500"))
593+ "e6500_decode,e6500_sfx_0")
594+
595+;; SFX - Mtjmpr.
596+(define_insn_reservation "e6500_mtjmpr" 1
597+ (and (eq_attr "type" "mtjmpr,mfjmpr")
598+ (eq_attr "cpu" "ppce6500"))
599+ "e6500_decode,e6500_sfx")
600+
601+;; CFX - Multiply.
602+(define_insn_reservation "e6500_multiply" 4
603+ (and (eq_attr "type" "imul")
604+ (eq_attr "cpu" "ppce6500"))
605+ "e6500_decode,e6500_cfx_stage0,e6500_cfx_stage1")
606+
607+(define_insn_reservation "e6500_multiply_i" 5
608+ (and (eq_attr "type" "imul2,imul3,imul_compare")
609+ (eq_attr "cpu" "ppce6500"))
610+ "e6500_decode,e6500_cfx_stage0,\
611+ e6500_cfx_stage0+e6500_cfx_stage1,e6500_cfx_stage1")
612+
613+;; CFX - Divide.
614+(define_insn_reservation "e6500_divide" 16
615+ (and (eq_attr "type" "idiv")
616+ (eq_attr "cpu" "ppce6500"))
617+ "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\
618+ e6500_cfx_div*15")
619+
620+(define_insn_reservation "e6500_divide_d" 26
621+ (and (eq_attr "type" "ldiv")
622+ (eq_attr "cpu" "ppce6500"))
623+ "e6500_decode,e6500_cfx_stage0+e6500_cfx_div,\
624+ e6500_cfx_div*25")
625+
626+;; LSU - Loads.
627+(define_insn_reservation "e6500_load" 3
628+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\
629+ load_l,sync")
630+ (eq_attr "cpu" "ppce6500"))
631+ "e6500_decode,e6500_lsu")
632+
633+(define_insn_reservation "e6500_fpload" 4
634+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
635+ (eq_attr "cpu" "ppce6500"))
636+ "e6500_decode,e6500_lsu")
637+
638+(define_insn_reservation "e6500_vecload" 4
639+ (and (eq_attr "type" "vecload")
640+ (eq_attr "cpu" "ppce6500"))
641+ "e6500_decode,e6500_lsu")
642+
643+;; LSU - Stores.
644+(define_insn_reservation "e6500_store" 3
645+ (and (eq_attr "type" "store,store_ux,store_u,store_c")
646+ (eq_attr "cpu" "ppce6500"))
647+ "e6500_decode,e6500_lsu")
648+
649+(define_insn_reservation "e6500_fpstore" 3
650+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
651+ (eq_attr "cpu" "ppce6500"))
652+ "e6500_decode,e6500_lsu")
653+
654+(define_insn_reservation "e6500_vecstore" 4
655+ (and (eq_attr "type" "vecstore")
656+ (eq_attr "cpu" "ppce6500"))
657+ "e6500_decode,e6500_lsu")
658+
659+;; FP.
660+(define_insn_reservation "e6500_float" 7
661+ (and (eq_attr "type" "fpsimple,fp,fpcompare,dmul")
662+ (eq_attr "cpu" "ppce6500"))
663+ "e6500_decode,e6500_fpu")
664+
665+(define_insn_reservation "e6500_sdiv" 20
666+ (and (eq_attr "type" "sdiv")
667+ (eq_attr "cpu" "ppce6500"))
668+ "e6500_decode,e6500_fpu*20")
669+
670+(define_insn_reservation "e6500_ddiv" 35
671+ (and (eq_attr "type" "ddiv")
672+ (eq_attr "cpu" "ppce6500"))
673+ "e6500_decode,e6500_fpu*35")
674+
675+;; BU.
676+(define_insn_reservation "e6500_branch" 1
677+ (and (eq_attr "type" "jmpreg,branch,isync")
678+ (eq_attr "cpu" "ppce6500"))
679+ "e6500_decode,e6500_bu")
680+
681+;; BU - CR logical.
682+(define_insn_reservation "e6500_cr_logical" 1
683+ (and (eq_attr "type" "cr_logical,delayed_cr")
684+ (eq_attr "cpu" "ppce6500"))
685+ "e6500_decode,e6500_bu")
686+
687+;; VSFX.
688+(define_insn_reservation "e6500_vecsimple" 1
689+ (and (eq_attr "type" "vecsimple,veccmp")
690+ (eq_attr "cpu" "ppce6500"))
691+ "e6500_decode,e6500_vec")
692+
693+;; VCFX.
694+(define_insn_reservation "e6500_veccomplex" 4
695+ (and (eq_attr "type" "veccomplex")
696+ (eq_attr "cpu" "ppce6500"))
697+ "e6500_decode,e6500_vec")
698+
699+;; VFPU.
700+(define_insn_reservation "e6500_vecfloat" 6
701+ (and (eq_attr "type" "vecfloat")
702+ (eq_attr "cpu" "ppce6500"))
703+ "e6500_decode,e6500_vec")
704+
705+;; VPERM.
706+(define_insn_reservation "e6500_vecperm" 2
707+ (and (eq_attr "type" "vecperm")
708+ (eq_attr "cpu" "ppce6500"))
709+ "e6500_decode,e6500_vecperm")
710diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-builtin.def gcc-4.6.2/gcc/config/rs6000/rs6000-builtin.def
711--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-builtin.def 2011-02-21 15:38:21.000000000 -0600
712+++ gcc-4.6.2/gcc/config/rs6000/rs6000-builtin.def 2012-03-06 12:37:40.248039025 -0600
713@@ -224,6 +224,9 @@
714 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEBX, RS6000_BTC_MEM)
715 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEHX, RS6000_BTC_MEM)
716 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEWX, RS6000_BTC_MEM)
717+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXBX, RS6000_BTC_MEM)
718+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXHX, RS6000_BTC_MEM)
719+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVEXWX, RS6000_BTC_MEM)
720 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVXL, RS6000_BTC_MEM)
721 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVX, RS6000_BTC_MEM)
722 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVX, RS6000_BTC_MEM)
723@@ -231,14 +234,30 @@
724 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVLXL, RS6000_BTC_MEM)
725 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVRX, RS6000_BTC_MEM)
726 RS6000_BUILTIN(ALTIVEC_BUILTIN_LVRXL, RS6000_BTC_MEM)
727+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTLX, RS6000_BTC_MEM)
728+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTLXL, RS6000_BTC_MEM)
729+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTRX, RS6000_BTC_MEM)
730+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVTRXL, RS6000_BTC_MEM)
731+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSWX, RS6000_BTC_MEM)
732+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSWXL, RS6000_BTC_MEM)
733+RS6000_BUILTIN(ALTIVEC_BUILTIN_LVSM, RS6000_BTC_MEM)
734 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEBX, RS6000_BTC_MEM)
735 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEHX, RS6000_BTC_MEM)
736 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEWX, RS6000_BTC_MEM)
737+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXBX, RS6000_BTC_MEM)
738+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXHX, RS6000_BTC_MEM)
739+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVEXWX, RS6000_BTC_MEM)
740 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVXL, RS6000_BTC_MEM)
741 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVLX, RS6000_BTC_MEM)
742 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVLXL, RS6000_BTC_MEM)
743 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVRX, RS6000_BTC_MEM)
744 RS6000_BUILTIN(ALTIVEC_BUILTIN_STVRXL, RS6000_BTC_MEM)
745+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFLX, RS6000_BTC_MEM)
746+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFLXL, RS6000_BTC_MEM)
747+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFRX, RS6000_BTC_MEM)
748+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVFRXL, RS6000_BTC_MEM)
749+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVSWX, RS6000_BTC_MEM)
750+RS6000_BUILTIN(ALTIVEC_BUILTIN_STVSWXL, RS6000_BTC_MEM)
751 RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPBFP_P, RS6000_BTC_FP_PURE)
752 RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPEQFP_P, RS6000_BTC_FP_PURE)
753 RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPEQUB_P, RS6000_BTC_CONST)
754@@ -275,6 +294,9 @@
755 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_EXT_V4SF, RS6000_BTC_CONST)
756 RS6000_BUILTIN(ALTIVEC_BUILTIN_COPYSIGN_V4SF, RS6000_BTC_CONST)
757 RS6000_BUILTIN(ALTIVEC_BUILTIN_VRECIPFP, RS6000_BTC_FP_PURE)
758+RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUB, RS6000_BTC_CONST)
759+RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUH, RS6000_BTC_CONST)
760+RS6000_BUILTIN(ALTIVEC_BUILTIN_ABSDUW, RS6000_BTC_CONST)
761
762 /* Altivec overloaded builtins. */
763 /* For now, don't set the classification for overloaded functions.
764@@ -286,6 +308,7 @@
765 RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPGT_P, RS6000_BTC_MISC)
766 RS6000_BUILTIN(ALTIVEC_BUILTIN_VCMPGE_P, RS6000_BTC_MISC)
767 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABS, RS6000_BTC_MISC)
768+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABSD, RS6000_BTC_MISC)
769 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ABSS, RS6000_BTC_MISC)
770 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ADD, RS6000_BTC_MISC)
771 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_ADDC, RS6000_BTC_MISC)
772@@ -321,10 +344,20 @@
773 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEBX, RS6000_BTC_MISC)
774 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEHX, RS6000_BTC_MISC)
775 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEWX, RS6000_BTC_MISC)
776+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXBX, RS6000_BTC_MISC)
777+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXHX, RS6000_BTC_MISC)
778+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVEXWX, RS6000_BTC_MISC)
779 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVLX, RS6000_BTC_MISC)
780 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVLXL, RS6000_BTC_MISC)
781 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVRX, RS6000_BTC_MISC)
782 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVRXL, RS6000_BTC_MISC)
783+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTLX, RS6000_BTC_MISC)
784+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTLXL, RS6000_BTC_MISC)
785+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTRX, RS6000_BTC_MISC)
786+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVTRXL, RS6000_BTC_MISC)
787+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSWX, RS6000_BTC_MISC)
788+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSWXL, RS6000_BTC_MISC)
789+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSM, RS6000_BTC_MISC)
790 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSL, RS6000_BTC_MISC)
791 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_LVSR, RS6000_BTC_MISC)
792 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_MADD, RS6000_BTC_MISC)
793@@ -389,10 +422,19 @@
794 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEBX, RS6000_BTC_MISC)
795 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEHX, RS6000_BTC_MISC)
796 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEWX, RS6000_BTC_MISC)
797+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXBX, RS6000_BTC_MISC)
798+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXHX, RS6000_BTC_MISC)
799+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVEXWX, RS6000_BTC_MISC)
800 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVLX, RS6000_BTC_MISC)
801 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVLXL, RS6000_BTC_MISC)
802 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVRX, RS6000_BTC_MISC)
803 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVRXL, RS6000_BTC_MISC)
804+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFLX, RS6000_BTC_MISC)
805+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFLXL, RS6000_BTC_MISC)
806+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFRX, RS6000_BTC_MISC)
807+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVFRXL, RS6000_BTC_MISC)
808+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVSWX, RS6000_BTC_MISC)
809+RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_STVSWXL, RS6000_BTC_MISC)
810 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUB, RS6000_BTC_MISC)
811 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUBC, RS6000_BTC_MISC)
812 RS6000_BUILTIN(ALTIVEC_BUILTIN_VEC_SUBS, RS6000_BTC_MISC)
813diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.c gcc-4.6.2/gcc/config/rs6000/rs6000.c
814--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500
815+++ gcc-4.6.2/gcc/config/rs6000/rs6000.c 2012-03-06 12:44:04.689039002 -0600
816@@ -779,6 +779,44 @@
817 1, /* prefetch streams /*/
818 };
819
820+/* Instruction costs on PPCE5500 processors. */
821+static const
822+struct processor_costs ppce5500_cost = {
823+ COSTS_N_INSNS (5), /* mulsi */
824+ COSTS_N_INSNS (5), /* mulsi_const */
825+ COSTS_N_INSNS (5), /* mulsi_const9 */
826+ COSTS_N_INSNS (5), /* muldi */
827+ COSTS_N_INSNS (14), /* divsi */
828+ COSTS_N_INSNS (14), /* divdi */
829+ COSTS_N_INSNS (7), /* fp */
830+ COSTS_N_INSNS (10), /* dmul */
831+ COSTS_N_INSNS (36), /* sdiv */
832+ COSTS_N_INSNS (66), /* ddiv */
833+ 64, /* cache line size */
834+ 32, /* l1 cache */
835+ 128, /* l2 cache */
836+ 1, /* prefetch streams /*/
837+};
838+
839+/* Instruction costs on PPCE6500 processors. */
840+static const
841+struct processor_costs ppce6500_cost = {
842+ COSTS_N_INSNS (5), /* mulsi */
843+ COSTS_N_INSNS (5), /* mulsi_const */
844+ COSTS_N_INSNS (5), /* mulsi_const9 */
845+ COSTS_N_INSNS (5), /* muldi */
846+ COSTS_N_INSNS (14), /* divsi */
847+ COSTS_N_INSNS (14), /* divdi */
848+ COSTS_N_INSNS (7), /* fp */
849+ COSTS_N_INSNS (10), /* dmul */
850+ COSTS_N_INSNS (36), /* sdiv */
851+ COSTS_N_INSNS (66), /* ddiv */
852+ 64, /* cache line size */
853+ 32, /* l1 cache */
854+ 128, /* l2 cache */
855+ 1, /* prefetch streams /*/
856+};
857+
858 /* Instruction costs on AppliedMicro Titan processors. */
859 static const
860 struct processor_costs titan_cost = {
861@@ -1690,7 +1728,7 @@
862 | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND | MASK_MULHW
863 | MASK_DLMZB | MASK_CMPB | MASK_MFPGPR | MASK_DFP
864 | MASK_POPCNTD | MASK_VSX | MASK_ISEL | MASK_NO_UPDATE
865- | MASK_RECIP_PRECISION)
866+ | MASK_RECIP_PRECISION | MASK_ALTIVEC2)
867 };
868
869 /* Masks for instructions set at various powerpc ISAs. */
870@@ -1785,6 +1823,12 @@
871 | MASK_ISEL},
872 {"e500mc64", PROCESSOR_PPCE500MC64, POWERPC_BASE_MASK | MASK_POWERPC64
873 | MASK_PPC_GFXOPT | MASK_ISEL},
874+ {"e5500", PROCESSOR_PPCE5500, POWERPC_BASE_MASK | MASK_POWERPC64
875+ | MASK_PPC_GFXOPT | MASK_ISEL | MASK_CMPB | MASK_POPCNTB
876+ | MASK_POPCNTD},
877+ {"e6500", PROCESSOR_PPCE6500, POWERPC_7400_MASK | MASK_POWERPC64
878+ | MASK_MFCRF | MASK_ISEL | MASK_CMPB | MASK_POPCNTB | MASK_POPCNTD
879+ | MASK_ALTIVEC2},
880 {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
881 {"970", PROCESSOR_POWER4,
882 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
883@@ -2742,13 +2786,19 @@
884 : PROCESSOR_DEFAULT));
885
886 if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3
887- || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64)
888+ || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64
889+ || rs6000_cpu == PROCESSOR_PPCE5500)
890 {
891 if (TARGET_ALTIVEC)
892 error ("AltiVec not supported in this target");
893 if (TARGET_SPE)
894 error ("SPE not supported in this target");
895 }
896+ if (rs6000_cpu == PROCESSOR_PPCE6500)
897+ {
898+ if (TARGET_SPE)
899+ error ("SPE not supported in this target");
900+ }
901
902 /* Disable Cell microcode if we are optimizing for the Cell
903 and not optimizing for size. */
904@@ -2843,9 +2893,16 @@
905 user's opinion, though. */
906 if (rs6000_block_move_inline_limit == 0
907 && (rs6000_cpu == PROCESSOR_PPCE500MC
908- || rs6000_cpu == PROCESSOR_PPCE500MC64))
909+ || rs6000_cpu == PROCESSOR_PPCE500MC64
910+ || rs6000_cpu == PROCESSOR_PPCE5500
911+ || rs6000_cpu == PROCESSOR_PPCE6500))
912 rs6000_block_move_inline_limit = 128;
913
914+ /* Those machines does not have fsqrt instruction */
915+ if (rs6000_cpu == PROCESSOR_PPCE5500
916+ || rs6000_cpu == PROCESSOR_PPCE6500)
917+ target_flags &= ~MASK_PPC_GPOPT;
918+
919 /* store_one_arg depends on expand_block_move to handle at least the
920 size of reg_parm_stack_space. */
921 if (rs6000_block_move_inline_limit < (TARGET_POWERPC64 ? 64 : 32))
922@@ -2977,7 +3034,9 @@
923 #endif
924
925 if (TARGET_E500 || rs6000_cpu == PROCESSOR_PPCE500MC
926- || rs6000_cpu == PROCESSOR_PPCE500MC64)
927+ || rs6000_cpu == PROCESSOR_PPCE500MC64
928+ || rs6000_cpu == PROCESSOR_PPCE5500
929+ || rs6000_cpu == PROCESSOR_PPCE6500)
930 {
931 /* The e500 and e500mc do not have string instructions, and we set
932 MASK_STRING above when optimizing for size. */
933@@ -3024,7 +3083,9 @@
934 || rs6000_cpu == PROCESSOR_POWER6
935 || rs6000_cpu == PROCESSOR_POWER7
936 || rs6000_cpu == PROCESSOR_PPCE500MC
937- || rs6000_cpu == PROCESSOR_PPCE500MC64);
938+ || rs6000_cpu == PROCESSOR_PPCE500MC64
939+ || rs6000_cpu == PROCESSOR_PPCE5500
940+ || rs6000_cpu == PROCESSOR_PPCE6500);
941
942 /* Allow debug switches to override the above settings. These are set to -1
943 in rs6000.opt to indicate the user hasn't directly set the switch. */
944@@ -3246,6 +3307,14 @@
945 rs6000_cost = &ppce500mc64_cost;
946 break;
947
948+ case PROCESSOR_PPCE5500:
949+ rs6000_cost = &ppce5500_cost;
950+ break;
951+
952+ case PROCESSOR_PPCE6500:
953+ rs6000_cost = &ppce6500_cost;
954+ break;
955+
956 case PROCESSOR_TITAN:
957 rs6000_cost = &titan_cost;
958 break;
959@@ -10212,6 +10281,9 @@
960 { MASK_ALTIVEC, CODE_FOR_addv8hi3, "__builtin_altivec_vadduhm", ALTIVEC_BUILTIN_VADDUHM },
961 { MASK_ALTIVEC, CODE_FOR_addv4si3, "__builtin_altivec_vadduwm", ALTIVEC_BUILTIN_VADDUWM },
962 { MASK_ALTIVEC, CODE_FOR_addv4sf3, "__builtin_altivec_vaddfp", ALTIVEC_BUILTIN_VADDFP },
963+ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsdub, "__builtin_altivec_vabsdub", ALTIVEC_BUILTIN_ABSDUB },
964+ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsduh, "__builtin_altivec_vabsduh", ALTIVEC_BUILTIN_ABSDUH },
965+ { MASK_ALTIVEC2, CODE_FOR_altivec_vabsduw, "__builtin_altivec_vabsduw", ALTIVEC_BUILTIN_ABSDUW },
966 { MASK_ALTIVEC, CODE_FOR_altivec_vaddcuw, "__builtin_altivec_vaddcuw", ALTIVEC_BUILTIN_VADDCUW },
967 { MASK_ALTIVEC, CODE_FOR_altivec_vaddubs, "__builtin_altivec_vaddubs", ALTIVEC_BUILTIN_VADDUBS },
968 { MASK_ALTIVEC, CODE_FOR_altivec_vaddsbs, "__builtin_altivec_vaddsbs", ALTIVEC_BUILTIN_VADDSBS },
969@@ -10372,6 +10444,7 @@
970 { MASK_VSX, CODE_FOR_vec_interleave_highv2df, "__builtin_vsx_mergeh_2df", VSX_BUILTIN_VEC_MERGEH_V2DF },
971 { MASK_VSX, CODE_FOR_vec_interleave_highv2di, "__builtin_vsx_mergeh_2di", VSX_BUILTIN_VEC_MERGEH_V2DI },
972
973+ { MASK_ALTIVEC2, CODE_FOR_nothing, "__builtin_vec_absd", ALTIVEC_BUILTIN_VEC_ABSD },
974 { MASK_ALTIVEC|MASK_VSX, CODE_FOR_nothing, "__builtin_vec_add", ALTIVEC_BUILTIN_VEC_ADD },
975 { MASK_ALTIVEC|MASK_VSX, CODE_FOR_nothing, "__builtin_vec_vaddfp", ALTIVEC_BUILTIN_VEC_VADDFP },
976 { MASK_ALTIVEC, CODE_FOR_nothing, "__builtin_vec_vadduwm", ALTIVEC_BUILTIN_VEC_VADDUWM },
977@@ -11803,6 +11876,12 @@
978 return altivec_expand_stv_builtin (CODE_FOR_altivec_stvehx, exp);
979 case ALTIVEC_BUILTIN_STVEWX:
980 return altivec_expand_stv_builtin (CODE_FOR_altivec_stvewx, exp);
981+ case ALTIVEC_BUILTIN_STVEXBX:
982+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexbx, exp);
983+ case ALTIVEC_BUILTIN_STVEXHX:
984+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexhx, exp);
985+ case ALTIVEC_BUILTIN_STVEXWX:
986+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvexwx, exp);
987 case ALTIVEC_BUILTIN_STVXL:
988 return altivec_expand_stv_builtin (CODE_FOR_altivec_stvxl, exp);
989
990@@ -11814,6 +11893,18 @@
991 return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrx, exp);
992 case ALTIVEC_BUILTIN_STVRXL:
993 return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrxl, exp);
994+ case ALTIVEC_BUILTIN_STVFLX:
995+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvflx, exp);
996+ case ALTIVEC_BUILTIN_STVFLXL:
997+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvflxl, exp);
998+ case ALTIVEC_BUILTIN_STVFRX:
999+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvfrx, exp);
1000+ case ALTIVEC_BUILTIN_STVFRXL:
1001+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvfrxl, exp);
1002+ case ALTIVEC_BUILTIN_STVSWX:
1003+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvswx, exp);
1004+ case ALTIVEC_BUILTIN_STVSWXL:
1005+ return altivec_expand_stv_builtin (CODE_FOR_altivec_stvswxl, exp);
1006
1007 case VSX_BUILTIN_STXVD2X_V2DF:
1008 return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v2df, exp);
1009@@ -11948,6 +12039,15 @@
1010 case ALTIVEC_BUILTIN_LVEWX:
1011 return altivec_expand_lv_builtin (CODE_FOR_altivec_lvewx,
1012 exp, target, false);
1013+ case ALTIVEC_BUILTIN_LVEXBX:
1014+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexbx,
1015+ exp, target, false);
1016+ case ALTIVEC_BUILTIN_LVEXHX:
1017+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexhx,
1018+ exp, target, false);
1019+ case ALTIVEC_BUILTIN_LVEXWX:
1020+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvexwx,
1021+ exp, target, false);
1022 case ALTIVEC_BUILTIN_LVXL:
1023 return altivec_expand_lv_builtin (CODE_FOR_altivec_lvxl,
1024 exp, target, false);
1025@@ -11966,6 +12066,27 @@
1026 case ALTIVEC_BUILTIN_LVRXL:
1027 return altivec_expand_lv_builtin (CODE_FOR_altivec_lvrxl,
1028 exp, target, true);
1029+ case ALTIVEC_BUILTIN_LVTLX:
1030+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtlx,
1031+ exp, target, true);
1032+ case ALTIVEC_BUILTIN_LVTLXL:
1033+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtlxl,
1034+ exp, target, true);
1035+ case ALTIVEC_BUILTIN_LVTRX:
1036+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtrx,
1037+ exp, target, true);
1038+ case ALTIVEC_BUILTIN_LVTRXL:
1039+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvtrxl,
1040+ exp, target, true);
1041+ case ALTIVEC_BUILTIN_LVSWX:
1042+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvswx,
1043+ exp, target, true);
1044+ case ALTIVEC_BUILTIN_LVSWXL:
1045+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvswxl,
1046+ exp, target, true);
1047+ case ALTIVEC_BUILTIN_LVSM:
1048+ return altivec_expand_lv_builtin (CODE_FOR_altivec_lvsm,
1049+ exp, target, true);
1050 case VSX_BUILTIN_LXVD2X_V2DF:
1051 return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v2df,
1052 exp, target, false);
1053@@ -13278,6 +13399,9 @@
1054 def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEBX);
1055 def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvehx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEHX);
1056 def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvewx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEWX);
1057+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexbx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXBX);
1058+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexhx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXHX);
1059+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvexwx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVEXWX);
1060 def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvxl", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVXL);
1061 def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVX);
1062 def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvx", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVX);
1063@@ -13285,6 +13409,9 @@
1064 def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvxl", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVXL);
1065 def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvebx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEBX);
1066 def_builtin (MASK_ALTIVEC, "__builtin_altivec_stvehx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEHX);
1067+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexbx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVEXBX);
1068+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexhx", void_ftype_v8hi_long_pvoid, ALTIVEC_BUILTIN_STVEXHX);
1069+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvexwx", void_ftype_v4si_long_pvoid, ALTIVEC_BUILTIN_STVEXWX);
1070 def_builtin (MASK_ALTIVEC, "__builtin_vec_ld", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LD);
1071 def_builtin (MASK_ALTIVEC, "__builtin_vec_lde", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LDE);
1072 def_builtin (MASK_ALTIVEC, "__builtin_vec_ldl", opaque_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LDL);
1073@@ -13293,12 +13420,18 @@
1074 def_builtin (MASK_ALTIVEC, "__builtin_vec_lvebx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEBX);
1075 def_builtin (MASK_ALTIVEC, "__builtin_vec_lvehx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEHX);
1076 def_builtin (MASK_ALTIVEC, "__builtin_vec_lvewx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEWX);
1077+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexbx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXBX);
1078+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexhx", v8hi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXHX);
1079+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvexwx", v4si_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVEXWX);
1080 def_builtin (MASK_ALTIVEC, "__builtin_vec_st", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_ST);
1081 def_builtin (MASK_ALTIVEC, "__builtin_vec_ste", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STE);
1082 def_builtin (MASK_ALTIVEC, "__builtin_vec_stl", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STL);
1083 def_builtin (MASK_ALTIVEC, "__builtin_vec_stvewx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEWX);
1084 def_builtin (MASK_ALTIVEC, "__builtin_vec_stvebx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEBX);
1085 def_builtin (MASK_ALTIVEC, "__builtin_vec_stvehx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEHX);
1086+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexwx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXWX);
1087+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexbx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXBX);
1088+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvexhx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEXHX);
1089
1090 def_builtin (MASK_VSX, "__builtin_vsx_lxvd2x_v2df", v2df_ftype_long_pcvoid,
1091 VSX_BUILTIN_LXVD2X_V2DF);
1092@@ -13351,6 +13484,33 @@
1093 def_builtin (MASK_ALTIVEC, "__builtin_vec_stvrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVRX);
1094 def_builtin (MASK_ALTIVEC, "__builtin_vec_stvrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVRXL);
1095 }
1096+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTLX);
1097+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtlxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTLXL);
1098+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtrx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTRX);
1099+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvtrxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVTRXL);
1100+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTLX);
1101+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtlxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTLXL);
1102+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtrx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTRX);
1103+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvtrxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVTRXL);
1104+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvflx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFLX);
1105+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvflxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFLXL);
1106+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvfrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFRX);
1107+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvfrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVFRXL);
1108+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvflx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFLX);
1109+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvflxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFLXL);
1110+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvfrx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFRX);
1111+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvfrxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVFRXL);
1112+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvswx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSWX);
1113+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvswxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSWXL);
1114+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvswx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSWX);
1115+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvswxl", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSWXL);
1116+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_lvsm", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVSM);
1117+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_lvsm", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_VEC_LVSM);
1118+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvswx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVSWX);
1119+ def_builtin (MASK_ALTIVEC2, "__builtin_altivec_stvswxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_STVSWXL);
1120+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvswx", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVSWX);
1121+ def_builtin (MASK_ALTIVEC2, "__builtin_vec_stvswxl", void_ftype_v16qi_long_pvoid, ALTIVEC_BUILTIN_VEC_STVSWXL);
1122+
1123 def_builtin (MASK_ALTIVEC, "__builtin_vec_step", int_ftype_opaque, ALTIVEC_BUILTIN_VEC_STEP);
1124 def_builtin (MASK_ALTIVEC, "__builtin_vec_splats", opaque_ftype_opaque, ALTIVEC_BUILTIN_VEC_SPLATS);
1125 def_builtin (MASK_ALTIVEC, "__builtin_vec_promote", opaque_ftype_opaque, ALTIVEC_BUILTIN_VEC_PROMOTE);
1126@@ -13668,6 +13828,9 @@
1127 case ALTIVEC_BUILTIN_VMULEUH_UNS:
1128 case ALTIVEC_BUILTIN_VMULOUB_UNS:
1129 case ALTIVEC_BUILTIN_VMULOUH_UNS:
1130+ case ALTIVEC_BUILTIN_ABSDUB:
1131+ case ALTIVEC_BUILTIN_ABSDUH:
1132+ case ALTIVEC_BUILTIN_ABSDUW:
1133 h.uns_p[0] = 1;
1134 h.uns_p[1] = 1;
1135 h.uns_p[2] = 1;
1136@@ -23250,6 +23413,7 @@
1137 || rs6000_cpu_attr == CPU_PPC750
1138 || rs6000_cpu_attr == CPU_PPC7400
1139 || rs6000_cpu_attr == CPU_PPC7450
1140+ || rs6000_cpu_attr == CPU_PPCE5500
1141 || rs6000_cpu_attr == CPU_POWER4
1142 || rs6000_cpu_attr == CPU_POWER5
1143 || rs6000_cpu_attr == CPU_POWER7
1144@@ -23794,6 +23958,8 @@
1145 case CPU_PPCE300C3:
1146 case CPU_PPCE500MC:
1147 case CPU_PPCE500MC64:
1148+ case CPU_PPCE5500:
1149+ case CPU_PPCE6500:
1150 case CPU_TITAN:
1151 return 2;
1152 case CPU_RIOS2:
1153diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-c.c gcc-4.6.2/gcc/config/rs6000/rs6000-c.c
1154--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-c.c 2011-02-02 23:42:19.000000000 -0600
1155+++ gcc-4.6.2/gcc/config/rs6000/rs6000-c.c 2012-03-06 12:54:55.964038969 -0600
1156@@ -310,6 +310,8 @@
1157 /* Enable context-sensitive macros. */
1158 cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand;
1159 }
1160+ if (TARGET_ALTIVEC2)
1161+ builtin_define ("__ALTIVEC2__");
1162 }
1163 if (rs6000_cpu == PROCESSOR_CELL)
1164 builtin_define ("__PPU__");
1165@@ -569,6 +571,24 @@
1166 RS6000_BTI_bool_V8HI, RS6000_BTI_bool_V16QI, 0, 0 },
1167
1168 /* Binary AltiVec/VSX builtins. */
1169+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB,
1170+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
1171+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB,
1172+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
1173+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUB,
1174+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, 0 },
1175+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH,
1176+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_bool_V8HI, RS6000_BTI_unsigned_V8HI, 0 },
1177+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH,
1178+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 },
1179+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUH,
1180+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_bool_V8HI, 0 },
1181+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW,
1182+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
1183+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW,
1184+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
1185+ { ALTIVEC_BUILTIN_VEC_ABSD, ALTIVEC_BUILTIN_ABSDUW,
1186+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_bool_V4SI, 0 },
1187 { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM,
1188 RS6000_BTI_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_V16QI, 0 },
1189 { ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDUBM,
1190@@ -1084,6 +1104,24 @@
1191 RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1192 { ALTIVEC_BUILTIN_VEC_LVEBX, ALTIVEC_BUILTIN_LVEBX,
1193 RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1194+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX,
1195+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1196+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX,
1197+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1198+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX,
1199+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1200+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX,
1201+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_long, 0 },
1202+ { ALTIVEC_BUILTIN_VEC_LVEXWX, ALTIVEC_BUILTIN_LVEXWX,
1203+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_long, 0 },
1204+ { ALTIVEC_BUILTIN_VEC_LVEXHX, ALTIVEC_BUILTIN_LVEXHX,
1205+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1206+ { ALTIVEC_BUILTIN_VEC_LVEXHX, ALTIVEC_BUILTIN_LVEXHX,
1207+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1208+ { ALTIVEC_BUILTIN_VEC_LVEXBX, ALTIVEC_BUILTIN_LVEXBX,
1209+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1210+ { ALTIVEC_BUILTIN_VEC_LVEXBX, ALTIVEC_BUILTIN_LVEXBX,
1211+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1212 { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL,
1213 RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1214 { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL,
1215@@ -1336,6 +1374,258 @@
1216 RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1217 { ALTIVEC_BUILTIN_VEC_LVRXL, ALTIVEC_BUILTIN_LVRXL,
1218 RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1219+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1220+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1221+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1222+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1223+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1224+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1225+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1226+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1227+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1228+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1229+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1230+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1231+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1232+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1233+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1234+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1235+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1236+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1237+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1238+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1239+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1240+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1241+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1242+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1243+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1244+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1245+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1246+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1247+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1248+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1249+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1250+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1251+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1252+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1253+ { ALTIVEC_BUILTIN_VEC_LVTLX, ALTIVEC_BUILTIN_LVTLX,
1254+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1255+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1256+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1257+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1258+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1259+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1260+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1261+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1262+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1263+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1264+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1265+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1266+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1267+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1268+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1269+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1270+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1271+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1272+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1273+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1274+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1275+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1276+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1277+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1278+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1279+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1280+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1281+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1282+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1283+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1284+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1285+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1286+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1287+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1288+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1289+ { ALTIVEC_BUILTIN_VEC_LVTLXL, ALTIVEC_BUILTIN_LVTLXL,
1290+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1291+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1292+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1293+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1294+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1295+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1296+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1297+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1298+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1299+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1300+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1301+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1302+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1303+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1304+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1305+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1306+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1307+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1308+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1309+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1310+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1311+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1312+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1313+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1314+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1315+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1316+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1317+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1318+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1319+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1320+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1321+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1322+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1323+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1324+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1325+ { ALTIVEC_BUILTIN_VEC_LVTRX, ALTIVEC_BUILTIN_LVTRX,
1326+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1327+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1328+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1329+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1330+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1331+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1332+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1333+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1334+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1335+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1336+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1337+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1338+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1339+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1340+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1341+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1342+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1343+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1344+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1345+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1346+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1347+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1348+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1349+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1350+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1351+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1352+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1353+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1354+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1355+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1356+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1357+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1358+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1359+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1360+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1361+ { ALTIVEC_BUILTIN_VEC_LVTRXL, ALTIVEC_BUILTIN_LVTRXL,
1362+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1363+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1364+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1365+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1366+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1367+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1368+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1369+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1370+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1371+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1372+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1373+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1374+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1375+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1376+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1377+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1378+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1379+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1380+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1381+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1382+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1383+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1384+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1385+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1386+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1387+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1388+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1389+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1390+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1391+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1392+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1393+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1394+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1395+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1396+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1397+ { ALTIVEC_BUILTIN_VEC_LVSWX, ALTIVEC_BUILTIN_LVSWX,
1398+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1399+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1400+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1401+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1402+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1403+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1404+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1405+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1406+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1407+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1408+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1409+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1410+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1411+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1412+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1413+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1414+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1415+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1416+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1417+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1418+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1419+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1420+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1421+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1422+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1423+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1424+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1425+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1426+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1427+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1428+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1429+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1430+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1431+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1432+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1433+ { ALTIVEC_BUILTIN_VEC_LVSWXL, ALTIVEC_BUILTIN_LVSWXL,
1434+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1435+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1436+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 },
1437+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1438+ RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 },
1439+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1440+ RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 },
1441+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1442+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 },
1443+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1444+ RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 },
1445+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1446+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI, 0 },
1447+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1448+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 },
1449+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1450+ RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 },
1451+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1452+ RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 },
1453+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1454+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 },
1455+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1456+ RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 },
1457+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1458+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI, 0 },
1459+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1460+ RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 },
1461+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1462+ RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 },
1463+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1464+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 },
1465+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1466+ RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 },
1467+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1468+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 },
1469+ { ALTIVEC_BUILTIN_VEC_LVSM, ALTIVEC_BUILTIN_LVSM,
1470+ RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 },
1471 { ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXUB,
1472 RS6000_BTI_unsigned_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
1473 { ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXUB,
1474@@ -2812,6 +3102,46 @@
1475 RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1476 { ALTIVEC_BUILTIN_VEC_STVEBX, ALTIVEC_BUILTIN_STVEBX,
1477 RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1478+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1479+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1480+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1481+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1482+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1483+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1484+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1485+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1486+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1487+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1488+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1489+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1490+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1491+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1492+ { ALTIVEC_BUILTIN_VEC_STVEXWX, ALTIVEC_BUILTIN_STVEXWX,
1493+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1494+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX,
1495+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1496+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX,
1497+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1498+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX,
1499+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1500+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX,
1501+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1502+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX,
1503+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1504+ { ALTIVEC_BUILTIN_VEC_STVEXHX, ALTIVEC_BUILTIN_STVEXHX,
1505+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1506+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX,
1507+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1508+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX,
1509+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1510+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX,
1511+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1512+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX,
1513+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1514+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX,
1515+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1516+ { ALTIVEC_BUILTIN_VEC_STVEXBX, ALTIVEC_BUILTIN_STVEXBX,
1517+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_void },
1518 { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL,
1519 RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1520 { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL,
1521@@ -3016,6 +3346,222 @@
1522 RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1523 { ALTIVEC_BUILTIN_VEC_STVRXL, ALTIVEC_BUILTIN_STVRXL,
1524 RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1525+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1526+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1527+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1528+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1529+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1530+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI },
1531+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1532+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI },
1533+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1534+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1535+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1536+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI },
1537+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1538+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1539+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1540+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI },
1541+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1542+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI },
1543+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1544+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI },
1545+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1546+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1547+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1548+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI },
1549+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1550+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1551+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1552+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI },
1553+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1554+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI },
1555+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1556+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1557+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1558+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1559+ { ALTIVEC_BUILTIN_VEC_STVFLX, ALTIVEC_BUILTIN_STVFLX,
1560+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1561+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1562+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1563+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1564+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1565+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1566+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI },
1567+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1568+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI },
1569+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1570+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1571+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1572+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI },
1573+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1574+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1575+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1576+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI },
1577+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1578+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI },
1579+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1580+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI },
1581+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1582+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1583+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1584+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI },
1585+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1586+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1587+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1588+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI },
1589+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1590+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI },
1591+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1592+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1593+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1594+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1595+ { ALTIVEC_BUILTIN_VEC_STVFLXL, ALTIVEC_BUILTIN_STVFLXL,
1596+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1597+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1598+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1599+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1600+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1601+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1602+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI },
1603+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1604+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI },
1605+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1606+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1607+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1608+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI },
1609+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1610+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1611+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1612+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI },
1613+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1614+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI },
1615+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1616+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI },
1617+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1618+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1619+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1620+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI },
1621+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1622+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1623+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1624+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI },
1625+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1626+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI },
1627+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1628+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1629+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1630+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1631+ { ALTIVEC_BUILTIN_VEC_STVFRX, ALTIVEC_BUILTIN_STVFRX,
1632+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1633+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1634+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1635+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1636+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1637+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1638+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI },
1639+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1640+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI },
1641+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1642+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1643+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1644+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI },
1645+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1646+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1647+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1648+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI },
1649+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1650+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI },
1651+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1652+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI },
1653+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1654+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1655+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1656+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI },
1657+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1658+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1659+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1660+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI },
1661+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1662+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI },
1663+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1664+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1665+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1666+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1667+ { ALTIVEC_BUILTIN_VEC_STVFRXL, ALTIVEC_BUILTIN_STVFRXL,
1668+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1669+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1670+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1671+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1672+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1673+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1674+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI },
1675+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1676+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI },
1677+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1678+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1679+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1680+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI },
1681+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1682+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1683+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1684+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI },
1685+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1686+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI },
1687+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1688+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI },
1689+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1690+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1691+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1692+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI },
1693+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1694+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1695+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1696+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI },
1697+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1698+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI },
1699+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1700+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1701+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1702+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1703+ { ALTIVEC_BUILTIN_VEC_STVSWX, ALTIVEC_BUILTIN_STVSWX,
1704+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1705+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1706+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF },
1707+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1708+ RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float },
1709+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1710+ RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI },
1711+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1712+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI },
1713+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1714+ RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI },
1715+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1716+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V4SI },
1717+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1718+ RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI },
1719+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1720+ RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI },
1721+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1722+ RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI },
1723+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1724+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI },
1725+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1726+ RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI },
1727+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1728+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V8HI },
1729+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1730+ RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI },
1731+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1732+ RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI },
1733+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1734+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI },
1735+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1736+ RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI },
1737+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1738+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI },
1739+ { ALTIVEC_BUILTIN_VEC_STVSWXL, ALTIVEC_BUILTIN_STVSWXL,
1740+ RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI },
1741 { VSX_BUILTIN_VEC_XXSLDWI, VSX_BUILTIN_XXSLDWI_16QI,
1742 RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, RS6000_BTI_NOT_OPAQUE },
1743 { VSX_BUILTIN_VEC_XXSLDWI, VSX_BUILTIN_XXSLDWI_16QI,
1744diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.h gcc-4.6.2/gcc/config/rs6000/rs6000.h
1745--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.h 2011-07-27 13:17:15.000000000 -0500
1746+++ gcc-4.6.2/gcc/config/rs6000/rs6000.h 2012-03-06 12:16:25.582039002 -0600
1747@@ -168,6 +168,8 @@
1748 %{mcpu=e300c3: -me300} \
1749 %{mcpu=e500mc: -me500mc} \
1750 %{mcpu=e500mc64: -me500mc64} \
1751+%{mcpu=e5500: -me5500} \
1752+%{mcpu=e6500: -me6500} \
1753 %{maltivec: -maltivec} \
1754 %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \
1755 -many"
1756@@ -477,13 +479,15 @@
1757
1758 #define TARGET_FCTIDZ TARGET_FCFID
1759 #define TARGET_STFIWX TARGET_PPC_GFXOPT
1760-#define TARGET_LFIWAX TARGET_CMPB
1761-#define TARGET_LFIWZX TARGET_POPCNTD
1762-#define TARGET_FCFIDS TARGET_POPCNTD
1763-#define TARGET_FCFIDU TARGET_POPCNTD
1764-#define TARGET_FCFIDUS TARGET_POPCNTD
1765-#define TARGET_FCTIDUZ TARGET_POPCNTD
1766-#define TARGET_FCTIWUZ TARGET_POPCNTD
1767+#define TARGET_LFIWAX (TARGET_CMPB && rs6000_cpu != PROCESSOR_PPCE5500 \
1768+ && rs6000_cpu != PROCESSOR_PPCE6500)
1769+#define TARGET_LFIWZX (TARGET_POPCNTD && rs6000_cpu != PROCESSOR_PPCE5500 \
1770+ && rs6000_cpu != PROCESSOR_PPCE6500)
1771+#define TARGET_FCFIDS TARGET_LFIWZX
1772+#define TARGET_FCFIDU TARGET_LFIWZX
1773+#define TARGET_FCFIDUS TARGET_LFIWZX
1774+#define TARGET_FCTIDUZ TARGET_LFIWZX
1775+#define TARGET_FCTIWUZ TARGET_LFIWZX
1776
1777 /* E500 processors only support plain "sync", not lwsync. */
1778 #define TARGET_NO_LWSYNC TARGET_E500
1779@@ -494,10 +498,14 @@
1780
1781 #define TARGET_FRE (TARGET_HARD_FLOAT && TARGET_FPRS \
1782 && TARGET_DOUBLE_FLOAT \
1783- && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode)))
1784+ && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode)) \
1785+ && rs6000_cpu != PROCESSOR_PPCE5500 \
1786+ && rs6000_cpu != PROCESSOR_PPCE6500)
1787
1788 #define TARGET_FRSQRTES (TARGET_HARD_FLOAT && TARGET_POPCNTB \
1789- && TARGET_FPRS && TARGET_SINGLE_FLOAT)
1790+ && TARGET_FPRS && TARGET_SINGLE_FLOAT \
1791+ && rs6000_cpu != PROCESSOR_PPCE5500 \
1792+ && rs6000_cpu != PROCESSOR_PPCE6500)
1793
1794 #define TARGET_FRSQRTE (TARGET_HARD_FLOAT && TARGET_FPRS \
1795 && TARGET_DOUBLE_FLOAT \
1796diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.md gcc-4.6.2/gcc/config/rs6000/rs6000.md
1797--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.md 2011-09-19 11:41:20.000000000 -0500
1798+++ gcc-4.6.2/gcc/config/rs6000/rs6000.md 2012-03-06 12:16:25.584039002 -0600
1799@@ -126,7 +126,7 @@
1800
1801 ;; Define an insn type attribute. This is used in function unit delay
1802 ;; computations.
1803-(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,var_delayed_compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv,isync,sync,load_l,store_c,shift,trap,insert_dword,var_shift_rotate,cntlz,exts,mffgpr,mftgpr,isel"
1804+(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,var_delayed_compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv,isync,sync,load_l,store_c,shift,trap,insert_dword,var_shift_rotate,cntlz,exts,mffgpr,mftgpr,isel,popcnt"
1805 (const_string "integer"))
1806
1807 ;; Define floating point instruction sub-types for use with Xfpu.md
1808@@ -148,7 +148,7 @@
1809 ;; Processor type -- this attribute must exactly match the processor_type
1810 ;; enumeration in rs6000.h.
1811
1812-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc476,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,ppce500mc,ppce500mc64,power4,power5,power6,power7,cell,ppca2,titan"
1813+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc476,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,ppce500mc,ppce500mc64,ppce5500,ppce6500,power4,power5,power6,power7,cell,ppca2,titan"
1814 (const (symbol_ref "rs6000_cpu_attr")))
1815
1816
1817@@ -176,6 +176,8 @@
1818 (include "e300c2c3.md")
1819 (include "e500mc.md")
1820 (include "e500mc64.md")
1821+(include "e5500.md")
1822+(include "e6500.md")
1823 (include "power4.md")
1824 (include "power5.md")
1825 (include "power6.md")
1826@@ -2302,13 +2304,17 @@
1827 (unspec:GPR [(match_operand:GPR 1 "gpc_reg_operand" "r")]
1828 UNSPEC_POPCNTB))]
1829 "TARGET_POPCNTB"
1830- "popcntb %0,%1")
1831+ "popcntb %0,%1"
1832+ [(set_attr "length" "4")
1833+ (set_attr "type" "popcnt")])
1834
1835 (define_insn "popcntd<mode>2"
1836 [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
1837 (popcount:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")))]
1838 "TARGET_POPCNTD"
1839- "popcnt<wd> %0,%1")
1840+ "popcnt<wd> %0,%1"
1841+ [(set_attr "length" "4")
1842+ (set_attr "type" "popcnt")])
1843
1844 (define_expand "popcount<mode>2"
1845 [(set (match_operand:GPR 0 "gpc_reg_operand" "")
1846@@ -5957,10 +5963,10 @@
1847 && ((TARGET_PPC_GFXOPT
1848 && !HONOR_NANS (<MODE>mode)
1849 && !HONOR_SIGNED_ZEROS (<MODE>mode))
1850- || TARGET_CMPB
1851+ || TARGET_LFIWAX
1852 || VECTOR_UNIT_VSX_P (<MODE>mode))"
1853 {
1854- if (TARGET_CMPB || VECTOR_UNIT_VSX_P (<MODE>mode))
1855+ if (TARGET_LFIWAX || VECTOR_UNIT_VSX_P (<MODE>mode))
1856 {
1857 emit_insn (gen_copysign<mode>3_fcpsgn (operands[0], operands[1],
1858 operands[2]));
1859@@ -5979,7 +5985,7 @@
1860 (unspec:SFDF [(match_operand:SFDF 1 "gpc_reg_operand" "<rreg2>")
1861 (match_operand:SFDF 2 "gpc_reg_operand" "<rreg2>")]
1862 UNSPEC_COPYSIGN))]
1863- "TARGET_CMPB && !VECTOR_UNIT_VSX_P (<MODE>mode)"
1864+ "TARGET_LFIWAX && !VECTOR_UNIT_VSX_P (<MODE>mode)"
1865 "fcpsgn %0,%2,%1"
1866 [(set_attr "type" "fp")])
1867
1868diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000.opt gcc-4.6.2/gcc/config/rs6000/rs6000.opt
1869--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000.opt 2010-11-29 19:47:54.000000000 -0600
1870+++ gcc-4.6.2/gcc/config/rs6000/rs6000.opt 2012-03-06 12:16:25.584039002 -0600
1871@@ -179,6 +179,10 @@
1872 Target Report Mask(ALTIVEC) Save
1873 Use AltiVec instructions
1874
1875+maltivec2
1876+Target Report Mask(ALTIVEC2) Save
1877+Use AltiVec PowerPC V2.07 instructions
1878+
1879 mhard-dfp
1880 Target Report Mask(DFP) Save
1881 Use decimal floating point instructions
1882diff -ruN gcc-4.6.2-orig/gcc/config/rs6000/rs6000-opts.h gcc-4.6.2/gcc/config/rs6000/rs6000-opts.h
1883--- gcc-4.6.2-orig/gcc/config/rs6000/rs6000-opts.h 2010-11-19 11:27:18.000000000 -0600
1884+++ gcc-4.6.2/gcc/config/rs6000/rs6000-opts.h 2012-03-06 12:16:25.584039002 -0600
1885@@ -53,6 +53,8 @@
1886 PROCESSOR_PPCE300C3,
1887 PROCESSOR_PPCE500MC,
1888 PROCESSOR_PPCE500MC64,
1889+ PROCESSOR_PPCE5500,
1890+ PROCESSOR_PPCE6500,
1891 PROCESSOR_POWER4,
1892 PROCESSOR_POWER5,
1893 PROCESSOR_POWER6,
1894diff -ruN gcc-4.6.2-orig/gcc/config.gcc gcc-4.6.2/gcc/config.gcc
1895--- gcc-4.6.2-orig/gcc/config.gcc 2011-07-22 11:44:50.000000000 -0500
1896+++ gcc-4.6.2/gcc/config.gcc 2012-03-06 12:16:25.585039002 -0600
1897@@ -396,7 +396,7 @@
1898 extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h"
1899 need_64bit_hwint=yes
1900 case x$with_cpu in
1901- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64)
1902+ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
1903 cpu_is_64bit=yes
1904 ;;
1905 esac
1906@@ -3501,8 +3501,8 @@
1907 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
1908 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
1909 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
1910- | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | titan\
1911- | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
1912+ | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
1913+ | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
1914 # OK
1915 ;;
1916 *)
1917diff -ruN gcc-4.6.2-orig/gcc/doc/extend.texi gcc-4.6.2/gcc/doc/extend.texi
1918--- gcc-4.6.2-orig/gcc/doc/extend.texi 2011-10-24 09:55:45.000000000 -0500
1919+++ gcc-4.6.2/gcc/doc/extend.texi 2012-03-06 12:56:49.399039002 -0600
1920@@ -12509,6 +12509,291 @@
1921 @samp{vec_vsx_st} builtins will always generate the VSX @samp{LXVD2X},
1922 @samp{LXVW4X}, @samp{STXVD2X}, and @samp{STXVW4X} instructions.
1923
1924+Using @option{-maltivec2} will extend the Altivec interface with the
1925+following additional functions:
1926+
1927+@smallexample
1928+vector unsigned char vec_absd (vector unsigned char, vector unsigned char);
1929+vector unsigned char vec_absd (vector bool char, vector unsigned char);
1930+vector unsigned char vec_absd (vector unsigned char, vector bool char);
1931+vector unsigned short vec_absd (vector unsigned short, vector unsigned short);
1932+vector unsigned short vec_absd (vector bool short, vector unsigned short);
1933+vector unsigned short vec_absd (vector unsigned short, vector bool short);
1934+vector unsigned int vec_absd (vector unsigned int, vector unsigned int);
1935+vector unsigned int vec_absd (vector bool int, vector unsigned int);
1936+vector unsigned int vec_absd (vector unsigned int, vector bool int);
1937+
1938+vector signed char vec_lvexbx (long, signed char *);
1939+vector unsigned char vec_lvexbx (long, unsigned char *);
1940+vector signed short vec_lvexhx (long, signed short *);
1941+vector unsigned short vec_lvexhx (long, unsigned short *);
1942+vector float vec_lvexwx (long, float *);
1943+vector signed int vec_lvexwx (long, signed int *);
1944+vector unsigned int vec_lvexwx (long, unsigned int *);
1945+vector signed int vec_lvexwx (long, signed long *);
1946+vector unsigned int vec_lvexwx (long, unsigned long *);
1947+
1948+void vec_stvexbx (vector signed char, long, signed char *);
1949+void vec_stvexbx (vector unsigned char, long, unsigned char *);
1950+void vec_stvexbx (vector bool char, long, signed char *);
1951+void vec_stvexbx (vector bool char, long, unsigned char *);
1952+void vec_stvexbx (vector signed char, long, void *);
1953+void vec_stvexbx (vector unsigned char, long, void *);
1954+void vec_stvexhx (vector signed short, long, signed short *);
1955+void vec_stvexhx (vector unsigned short, long, unsigned short *);
1956+void vec_stvexhx (vector bool short, long, signed short *);
1957+void vec_stvexhx (vector bool short, long, unsigned short *);
1958+void vec_stvexhx (vector signed short, long, void *);
1959+void vec_stvexhx (vector unsigned short, long, void *);
1960+void vec_stvexwx (vector float, long, float *);
1961+void vec_stvexwx (vector signed int, long, signed int *);
1962+void vec_stvexwx (vector unsigned int, long, unsigned int *);
1963+void vec_stvexwx (vector bool int, long, signed int *);
1964+void vec_stvexwx (vector bool int, long, unsigned int *);
1965+void vec_stvexwx (vector float, long, void *);
1966+void vec_stvexwx (vector signed int, long, void *);
1967+void vec_stvexwx (vector unsigned int, long, void *);
1968+
1969+vector float vec_lvtlx (long, vector float *);
1970+vector float vec_lvtlx (long, float *);
1971+vector bool int vec_lvtlx (long, vector bool int *);
1972+vector signed int vec_lvtlx (long, vector signed int *);
1973+vector signed int vec_lvtlx (long, signed int *);
1974+vector unsigned int vec_lvtlx (long, vector unsigned int *);
1975+vector unsigned int vec_lvtlx (long, unsigned int *);
1976+vector bool short vec_lvtlx (long, vector bool short *);
1977+vector pixel vec_lvtlx (long, vector pixel *);
1978+vector signed short vec_lvtlx (long, vector signed short *);
1979+vector signed short vec_lvtlx (long, signed short *);
1980+vector unsigned short vec_lvtlx (long, vector unsigned short *);
1981+vector unsigned short vec_lvtlx (long, unsigned short *);
1982+vector bool char vec_lvtlx (long, vector bool char *);
1983+vector signed char vec_lvtlx (long, vector signed char *);
1984+vector signed char vec_lvtlx (long, signed char *);
1985+vector unsigned char vec_lvtlx (long, vector unsigned char *);
1986+vector unsigned char vec_lvtlx (long, unsigned char *);
1987+vector float vec_lvtlxl (long, vector float *);
1988+vector float vec_lvtlxl (long, float *);
1989+vector bool int vec_lvtlxl (long, vector bool int *);
1990+vector signed int vec_lvtlxl (long, vector signed int *);
1991+vector signed int vec_lvtlxl (long, signed int *);
1992+vector unsigned int vec_lvtlxl (long, vector unsigned int *);
1993+vector unsigned int vec_lvtlxl (long, unsigned int *);
1994+vector bool short vec_lvtlxl (long, vector bool short *);
1995+vector pixel vec_lvtlxl (long, vector pixel *);
1996+vector signed short vec_lvtlxl (long, vector signed short *);
1997+vector signed short vec_lvtlxl (long, signed short *);
1998+vector unsigned short vec_lvtlxl (long, vector unsigned short *);
1999+vector unsigned short vec_lvtlxl (long, unsigned short *);
2000+vector bool char vec_lvtlxl (long, vector bool char *);
2001+vector signed char vec_lvtlxl (long, vector signed char *);
2002+vector signed char vec_lvtlxl (long, signed char *);
2003+vector unsigned char vec_lvtlxl (long, vector unsigned char *);
2004+vector unsigned char vec_lvtlxl (long, unsigned char *);
2005+vector float vec_lvtrx (long, vector float *);
2006+vector float vec_lvtrx (long, float *);
2007+vector bool int vec_lvtrx (long, vector bool int *);
2008+vector signed int vec_lvtrx (long, vector signed int *);
2009+vector signed int vec_lvtrx (long, signed int *);
2010+vector unsigned int vec_lvtrx (long, vector unsigned int *);
2011+vector unsigned int vec_lvtrx (long, unsigned int *);
2012+vector bool short vec_lvtrx (long, vector bool short *);
2013+vector pixel vec_lvtrx (long, vector pixel *);
2014+vector signed short vec_lvtrx (long, vector signed short *);
2015+vector signed short vec_lvtrx (long, signed short *);
2016+vector unsigned short vec_lvtrx (long, vector unsigned short *);
2017+vector unsigned short vec_lvtrx (long, unsigned short *);
2018+vector bool char vec_lvtrx (long, vector bool char *);
2019+vector signed char vec_lvtrx (long, vector signed char *);
2020+vector signed char vec_lvtrx (long, signed char *);
2021+vector unsigned char vec_lvtrx (long, vector unsigned char *);
2022+vector unsigned char vec_lvtrx (long, unsigned char *);
2023+vector float vec_lvtrxl (long, vector float *);
2024+vector float vec_lvtrxl (long, float *);
2025+vector bool int vec_lvtrxl (long, vector bool int *);
2026+vector signed int vec_lvtrxl (long, vector signed int *);
2027+vector signed int vec_lvtrxl (long, signed int *);
2028+vector unsigned int vec_lvtrxl (long, vector unsigned int *);
2029+vector unsigned int vec_lvtrxl (long, unsigned int *);
2030+vector bool short vec_lvtrxl (long, vector bool short *);
2031+vector pixel vec_lvtrxl (long, vector pixel *);
2032+vector signed short vec_lvtrxl (long, vector signed short *);
2033+vector signed short vec_lvtrxl (long, signed short *);
2034+vector unsigned short vec_lvtrxl (long, vector unsigned short *);
2035+vector unsigned short vec_lvtrxl (long, unsigned short *);
2036+vector bool char vec_lvtrxl (long, vector bool char *);
2037+vector signed char vec_lvtrxl (long, vector signed char *);
2038+vector signed char vec_lvtrxl (long, signed char *);
2039+vector unsigned char vec_lvtrxl (long, vector unsigned char *);
2040+vector unsigned char vec_lvtrxl (long, unsigned char *);
2041+
2042+void vec_stvflx (vector float, long, vector float *);
2043+void vec_stvflx (vector float, long, float *);
2044+void vec_stvflx (vector bool int, long, vector bool int *);
2045+void vec_stvflx (vector signed int, long, vector signed int *);
2046+void vec_stvflx (vector signed int, long, signed int *);
2047+void vec_stvflx (vector unsigned int, long, vector unsigned int *);
2048+void vec_stvflx (vector unsigned int, long, unsigned int *);
2049+void vec_stvflx (vector bool short, long, vector bool short *);
2050+void vec_stvflx (vector pixel, long, vector pixel *);
2051+void vec_stvflx (vector signed short, long, vector signed short *);
2052+void vec_stvflx (vector signed short, long, signed short *);
2053+void vec_stvflx (vector unsigned short, long, vector unsigned short *);
2054+void vec_stvflx (vector unsigned short, long, unsigned short *);
2055+void vec_stvflx (vector bool char, long, vector bool char *);
2056+void vec_stvflx (vector signed char, long, vector signed char *);
2057+void vec_stvflx (vector signed char, long, signed char *);
2058+void vec_stvflx (vector unsigned char, long, vector unsigned char *);
2059+void vec_stvflx (vector unsigned char, long, unsigned char *);
2060+void vec_stvflxl (vector float, long, vector float *);
2061+void vec_stvflxl (vector float, long, float *);
2062+void vec_stvflxl (vector bool int, long, vector bool int *);
2063+void vec_stvflxl (vector signed int, long, vector signed int *);
2064+void vec_stvflxl (vector signed int, long, signed int *);
2065+void vec_stvflxl (vector unsigned int, long, vector unsigned int *);
2066+void vec_stvflxl (vector unsigned int, long, unsigned int *);
2067+void vec_stvflxl (vector bool short, long, vector bool short *);
2068+void vec_stvflxl (vector pixel, long, vector pixel *);
2069+void vec_stvflxl (vector signed short, long, vector signed short *);
2070+void vec_stvflxl (vector signed short, long, signed short *);
2071+void vec_stvflxl (vector unsigned short, long, vector unsigned short *);
2072+void vec_stvflxl (vector unsigned short, long, unsigned short *);
2073+void vec_stvflxl (vector bool char, long, vector bool char *);
2074+void vec_stvflxl (vector signed char, long, vector signed char *);
2075+void vec_stvflxl (vector signed char, long, signed char *);
2076+void vec_stvflxl (vector unsigned char, long, vector unsigned char *);
2077+void vec_stvflxl (vector unsigned char, long, unsigned char *);
2078+void vec_stvfrx (vector float, long, vector float *);
2079+void vec_stvfrx (vector float, long, float *);
2080+void vec_stvfrx (vector bool int, long, vector bool int *);
2081+void vec_stvfrx (vector signed int, long, vector signed int *);
2082+void vec_stvfrx (vector signed int, long, signed int *);
2083+void vec_stvfrx (vector unsigned int, long, vector unsigned int *);
2084+void vec_stvfrx (vector unsigned int, long, unsigned int *);
2085+void vec_stvfrx (vector bool short, long, vector bool short *);
2086+void vec_stvfrx (vector pixel, long, vector pixel *);
2087+void vec_stvfrx (vector signed short, long, vector signed short *);
2088+void vec_stvfrx (vector signed short, long, signed short *);
2089+void vec_stvfrx (vector unsigned short, long, vector unsigned short *);
2090+void vec_stvfrx (vector unsigned short, long, unsigned short *);
2091+void vec_stvfrx (vector bool char, long, vector bool char *);
2092+void vec_stvfrx (vector signed char, long, vector signed char *);
2093+void vec_stvfrx (vector signed char, long, signed char *);
2094+void vec_stvfrx (vector unsigned char, long, vector unsigned char *);
2095+void vec_stvfrx (vector unsigned char, long, unsigned char *);
2096+void vec_stvfrxl (vector float, long, vector float *);
2097+void vec_stvfrxl (vector float, long, float *);
2098+void vec_stvfrxl (vector bool int, long, vector bool int *);
2099+void vec_stvfrxl (vector signed int, long, vector signed int *);
2100+void vec_stvfrxl (vector signed int, long, signed int *);
2101+void vec_stvfrxl (vector unsigned int, long, vector unsigned int *);
2102+void vec_stvfrxl (vector unsigned int, long, unsigned int *);
2103+void vec_stvfrxl (vector bool short, long, vector bool short *);
2104+void vec_stvfrxl (vector pixel, long, vector pixel *);
2105+void vec_stvfrxl (vector signed short, long, vector signed short *);
2106+void vec_stvfrxl (vector signed short, long, signed short *);
2107+void vec_stvfrxl (vector unsigned short, long, vector unsigned short *);
2108+void vec_stvfrxl (vector unsigned short, long, unsigned short *);
2109+void vec_stvfrxl (vector bool char, long, vector bool char *);
2110+void vec_stvfrxl (vector signed char, long, vector signed char *);
2111+void vec_stvfrxl (vector signed char, long, signed char *);
2112+void vec_stvfrxl (vector unsigned char, long, vector unsigned char *);
2113+void vec_stvfrxl (vector unsigned char, long, unsigned char *);
2114+
2115+vector float vec_lvswx (long, vector float *);
2116+vector float vec_lvswx (long, float *);
2117+vector bool int vec_lvswx (long, vector bool int *);
2118+vector signed int vec_lvswx (long, vector signed int *);
2119+vector signed int vec_lvswx (long, signed int *);
2120+vector unsigned int vec_lvswx (long, vector unsigned int *);
2121+vector unsigned int vec_lvswx (long, unsigned int *);
2122+vector bool short vec_lvswx (long, vector bool short *);
2123+vector pixel vec_lvswx (long, vector pixel *);
2124+vector signed short vec_lvswx (long, vector signed short *);
2125+vector signed short vec_lvswx (long, signed short *);
2126+vector unsigned short vec_lvswx (long, vector unsigned short *);
2127+vector unsigned short vec_lvswx (long, unsigned short *);
2128+vector bool char vec_lvswx (long, vector bool char *);
2129+vector signed char vec_lvswx (long, vector signed char *);
2130+vector signed char vec_lvswx (long, signed char *);
2131+vector unsigned char vec_lvswx (long, vector unsigned char *);
2132+vector unsigned char vec_lvswx (long, unsigned char *);
2133+vector float vec_lvswxl (long, vector float *);
2134+vector float vec_lvswxl (long, float *);
2135+vector bool int vec_lvswxl (long, vector bool int *);
2136+vector signed int vec_lvswxl (long, vector signed int *);
2137+vector signed int vec_lvswxl (long, signed int *);
2138+vector unsigned int vec_lvswxl (long, vector unsigned int *);
2139+vector unsigned int vec_lvswxl (long, unsigned int *);
2140+vector bool short vec_lvswxl (long, vector bool short *);
2141+vector pixel vec_lvswxl (long, vector pixel *);
2142+vector signed short vec_lvswxl (long, vector signed short *);
2143+vector signed short vec_lvswxl (long, signed short *);
2144+vector unsigned short vec_lvswxl (long, vector unsigned short *);
2145+vector unsigned short vec_lvswxl (long, unsigned short *);
2146+vector bool char vec_lvswxl (long, vector bool char *);
2147+vector signed char vec_lvswxl (long, vector signed char *);
2148+vector signed char vec_lvswxl (long, signed char *);
2149+vector unsigned char vec_lvswxl (long, vector unsigned char *);
2150+vector unsigned char vec_lvswxl (long, unsigned char *);
2151+
2152+void vec_stvswx (vector float, long, vector float *);
2153+void vec_stvswx (vector float, long, float *);
2154+void vec_stvswx (vector bool int, long, vector bool int *);
2155+void vec_stvswx (vector signed int, long, vector signed int *);
2156+void vec_stvswx (vector signed int, long, signed int *);
2157+void vec_stvswx (vector unsigned int, long, vector unsigned int *);
2158+void vec_stvswx (vector unsigned int, long, unsigned int *);
2159+void vec_stvswx (vector bool short, long, vector bool short *);
2160+void vec_stvswx (vector pixel, long, vector pixel *);
2161+void vec_stvswx (vector signed short, long, vector signed short *);
2162+void vec_stvswx (vector signed short, long, signed short *);
2163+void vec_stvswx (vector unsigned short, long, vector unsigned short *);
2164+void vec_stvswx (vector unsigned short, long, unsigned short *);
2165+void vec_stvswx (vector bool char, long, vector bool char *);
2166+void vec_stvswx (vector signed char, long, vector signed char *);
2167+void vec_stvswx (vector signed char, long, signed char *);
2168+void vec_stvswx (vector unsigned char, long, vector unsigned char *);
2169+void vec_stvswx (vector unsigned char, long, unsigned char *);
2170+void vec_stvswxl (vector float, long, vector float *);
2171+void vec_stvswxl (vector float, long, float *);
2172+void vec_stvswxl (vector bool int, long, vector bool int *);
2173+void vec_stvswxl (vector signed int, long, vector signed int *);
2174+void vec_stvswxl (vector signed int, long, signed int *);
2175+void vec_stvswxl (vector unsigned int, long, vector unsigned int *);
2176+void vec_stvswxl (vector unsigned int, long, unsigned int *);
2177+void vec_stvswxl (vector bool short, long, vector bool short *);
2178+void vec_stvswxl (vector pixel, long, vector pixel *);
2179+void vec_stvswxl (vector signed short, long, vector signed short *);
2180+void vec_stvswxl (vector signed short, long, signed short *);
2181+void vec_stvswxl (vector unsigned short, long, vector unsigned short *);
2182+void vec_stvswxl (vector unsigned short, long, unsigned short *);
2183+void vec_stvswxl (vector bool char, long, vector bool char *);
2184+void vec_stvswxl (vector signed char, long, vector signed char *);
2185+void vec_stvswxl (vector signed char, long, signed char *);
2186+void vec_stvswxl (vector unsigned char, long, vector unsigned char *);
2187+void vec_stvswxl (vector unsigned char, long, unsigned char *);
2188+
2189+vector float vec_lvsm (long, vector float *);
2190+vector float vec_lvsm (long, float *);
2191+vector bool int vec_lvsm (long, vector bool int *);
2192+vector signed int vec_lvsm (long, vector signed int *);
2193+vector signed int vec_lvsm (long, signed int *);
2194+vector unsigned int vec_lvsm (long, vector unsigned int *);
2195+vector unsigned int vec_lvsm (long, unsigned int *);
2196+vector bool short vec_lvsm (long, vector bool short *);
2197+vector pixel vec_lvsm (long, vector pixel *);
2198+vector signed short vec_lvsm (long, vector signed short *);
2199+vector signed short vec_lvsm (long, signed short *);
2200+vector unsigned short vec_lvsm (long, vector unsigned short *);
2201+vector unsigned short vec_lvsm (long, unsigned short *);
2202+vector bool char vec_lvsm (long, vector bool char *);
2203+vector signed char vec_lvsm (long, vector signed char *);
2204+vector signed char vec_lvsm (long, signed char *);
2205+vector unsigned char vec_lvsm (long, vector unsigned char *);
2206+vector unsigned char vec_lvsm (long, unsigned char *);
2207+@end smallexample
2208+
2209 GCC provides a few other builtins on Powerpc to access certain instructions:
2210 @smallexample
2211 float __builtin_recipdivf (float, float);
2212diff -ruN gcc-4.6.2-orig/gcc/doc/invoke.texi gcc-4.6.2/gcc/doc/invoke.texi
2213--- gcc-4.6.2-orig/gcc/doc/invoke.texi 2011-10-24 07:22:21.000000000 -0500
2214+++ gcc-4.6.2/gcc/doc/invoke.texi 2012-03-06 12:56:49.402039002 -0600
2215@@ -770,7 +770,7 @@
2216 -mcmodel=@var{code-model} @gol
2217 -mpower -mno-power -mpower2 -mno-power2 @gol
2218 -mpowerpc -mpowerpc64 -mno-powerpc @gol
2219--maltivec -mno-altivec @gol
2220+-maltivec -mno-altivec -maltivec2 -mno-altivec2 @gol
2221 -mpowerpc-gpopt -mno-powerpc-gpopt @gol
2222 -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
2223 -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd @gol
2224@@ -15536,16 +15536,21 @@
2225 The @option{-mpopcntb} option allows GCC to generate the popcount and
2226 double precision FP reciprocal estimate instruction implemented on the
2227 POWER5 processor and other processors that support the PowerPC V2.02
2228-architecture.
2229-The @option{-mpopcntd} option allows GCC to generate the popcount
2230-instruction implemented on the POWER7 processor and other processors
2231-that support the PowerPC V2.06 architecture.
2232+architecture. On the e5500 and e6500 processors, only the popcount
2233+instruction is generated.
2234+The @option{-mpopcntd} option allows GCC to generate the popcount and
2235+double word to FP conversion instructions implemented on the POWER7
2236+processor and other processors that support the PowerPC V2.06
2237+architecture. On the e5500 and e6500 processors, only the popcount
2238+instruction is generated.
2239 The @option{-mfprnd} option allows GCC to generate the FP round to
2240 integer instructions implemented on the POWER5+ processor and other
2241 processors that support the PowerPC V2.03 architecture.
2242 The @option{-mcmpb} option allows GCC to generate the compare bytes
2243-instruction implemented on the POWER6 processor and other processors
2244-that support the PowerPC V2.05 architecture.
2245+and copy sign instructions implemented on the POWER6 processor and
2246+other processors that support the PowerPC V2.05 architecture. On the
2247+e5500 and e6500 processors, only the compare bytes instruction is
2248+generated.
2249 The @option{-mmfpgpr} option allows GCC to generate the FP move to/from
2250 general purpose register instructions implemented on the POWER6X
2251 processor and other processors that support the extended PowerPC V2.05
2252@@ -15592,11 +15597,13 @@
2253 @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740},
2254 @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823},
2255 @samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2},
2256-@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{ec603e}, @samp{G3},
2257-@samp{G4}, @samp{G5}, @samp{titan}, @samp{power}, @samp{power2}, @samp{power3},
2258-@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x},
2259-@samp{power7}, @samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios},
2260-@samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}.
2261+@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{e5500},
2262+@samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5},
2263+@samp{titan}, @samp{power}, @samp{power2}, @samp{power3},
2264+@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6},
2265+@samp{power6x}, @samp{power7}, @samp{common}, @samp{powerpc},
2266+@samp{powerpc64}, @samp{rios}, @samp{rios1}, @samp{rios2}, @samp{rsc},
2267+and @samp{rs64}.
2268
2269 @option{-mcpu=common} selects a completely generic processor. Code
2270 generated under this option will run on any POWER or PowerPC processor.
2271@@ -15617,10 +15624,11 @@
2272 The @option{-mcpu} options automatically enable or disable the
2273 following options:
2274
2275-@gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol
2276--mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2 -mpowerpc64 @gol
2277--mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol
2278--msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -mvsx}
2279+@gccoptlist{-maltivec -maltivec2 -mfprnd -mhard-float -mmfcrf
2280+-mmultiple @gol -mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2
2281+-mpowerpc64 @gol -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float
2282+-mdouble-float @gol -msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr
2283+-mvsx}
2284
2285 The particular options set for any particular CPU will vary between
2286 compiler versions, depending on what setting seems to produce optimal
2287@@ -15671,6 +15679,16 @@
2288 @option{-mabi=altivec} to adjust the current ABI with AltiVec ABI
2289 enhancements.
2290
2291+@item -maltivec2
2292+@itemx -mno-altivec2
2293+@opindex maltivec2
2294+@opindex mno-altivec2
2295+Generate code that uses (does not use) AltiVec2 instructions, and also
2296+enable the use of built-in functions that allow more direct access to
2297+the AltiVec2 instruction set. You may also need to set
2298+@option{-mabi=altivec} to adjust the current ABI with AltiVec ABI
2299+enhancements.
2300+
2301 @item -mvrsave
2302 @itemx -mno-vrsave
2303 @opindex mvrsave
2304diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c
2305--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c 1969-12-31 18:00:00.000000000 -0600
2306+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-10.c 2012-03-06 12:31:05.152039004 -0600
2307@@ -0,0 +1,66 @@
2308+/* { dg-do compile { target { powerpc*-*-* } } } */
2309+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2310+/* { dg-require-effective-target powerpc_altivec_ok } */
2311+/* { dg-options "-O2 -maltivec -maltivec2" } */
2312+/* { dg-final { scan-assembler-times "lvtlx" 37 } } */
2313+
2314+#include <altivec.h>
2315+
2316+typedef __vector signed char vsc;
2317+typedef __vector signed short vss;
2318+typedef __vector signed int vsi;
2319+typedef __vector unsigned char vuc;
2320+typedef __vector unsigned short vus;
2321+typedef __vector unsigned int vui;
2322+typedef __vector bool char vbc;
2323+typedef __vector bool short vbs;
2324+typedef __vector bool int vbi;
2325+typedef __vector float vsf;
2326+typedef __vector pixel vp;
2327+typedef signed char sc;
2328+typedef signed short ss;
2329+typedef signed int si;
2330+typedef signed long sl;
2331+typedef unsigned char uc;
2332+typedef unsigned short us;
2333+typedef unsigned int ui;
2334+typedef unsigned long ul;
2335+typedef float sf;
2336+
2337+vsc lc1(long a, void *p) { return __builtin_altivec_lvtlx (a,p); }
2338+vsf llx01(long a, vsf *p) { return __builtin_vec_lvtlx (a,p); }
2339+vsf llx02(long a, sf *p) { return __builtin_vec_lvtlx (a,p); }
2340+vbi llx03(long a, vbi *p) { return __builtin_vec_lvtlx (a,p); }
2341+vsi llx04(long a, vsi *p) { return __builtin_vec_lvtlx (a,p); }
2342+vsi llx05(long a, si *p) { return __builtin_vec_lvtlx (a,p); }
2343+vui llx06(long a, vui *p) { return __builtin_vec_lvtlx (a,p); }
2344+vui llx07(long a, ui *p) { return __builtin_vec_lvtlx (a,p); }
2345+vbs llx08(long a, vbs *p) { return __builtin_vec_lvtlx (a,p); }
2346+vp llx09(long a, vp *p) { return __builtin_vec_lvtlx (a,p); }
2347+vss llx10(long a, vss *p) { return __builtin_vec_lvtlx (a,p); }
2348+vss llx11(long a, ss *p) { return __builtin_vec_lvtlx (a,p); }
2349+vus llx12(long a, vus *p) { return __builtin_vec_lvtlx (a,p); }
2350+vus llx13(long a, us *p) { return __builtin_vec_lvtlx (a,p); }
2351+vbc llx14(long a, vbc *p) { return __builtin_vec_lvtlx (a,p); }
2352+vsc llx15(long a, vsc *p) { return __builtin_vec_lvtlx (a,p); }
2353+vsc llx16(long a, sc *p) { return __builtin_vec_lvtlx (a,p); }
2354+vuc llx17(long a, vuc *p) { return __builtin_vec_lvtlx (a,p); }
2355+vuc llx18(long a, uc *p) { return __builtin_vec_lvtlx (a,p); }
2356+vsf Dllx01(long a, vsf *p) { return vec_lvtlx (a,p); }
2357+vsf Dllx02(long a, sf *p) { return vec_lvtlx (a,p); }
2358+vbi Dllx03(long a, vbi *p) { return vec_lvtlx (a,p); }
2359+vsi Dllx04(long a, vsi *p) { return vec_lvtlx (a,p); }
2360+vsi Dllx05(long a, si *p) { return vec_lvtlx (a,p); }
2361+vui Dllx06(long a, vui *p) { return vec_lvtlx (a,p); }
2362+vui Dllx07(long a, ui *p) { return vec_lvtlx (a,p); }
2363+vbs Dllx08(long a, vbs *p) { return vec_lvtlx (a,p); }
2364+vp Dllx09(long a, vp *p) { return vec_lvtlx (a,p); }
2365+vss Dllx10(long a, vss *p) { return vec_lvtlx (a,p); }
2366+vss Dllx11(long a, ss *p) { return vec_lvtlx (a,p); }
2367+vus Dllx12(long a, vus *p) { return vec_lvtlx (a,p); }
2368+vus Dllx13(long a, us *p) { return vec_lvtlx (a,p); }
2369+vbc Dllx14(long a, vbc *p) { return vec_lvtlx (a,p); }
2370+vsc Dllx15(long a, vsc *p) { return vec_lvtlx (a,p); }
2371+vsc Dllx16(long a, sc *p) { return vec_lvtlx (a,p); }
2372+vuc Dllx17(long a, vuc *p) { return vec_lvtlx (a,p); }
2373+vuc Dllx18(long a, uc *p) { return vec_lvtlx (a,p); }
2374diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c
2375--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c 1969-12-31 18:00:00.000000000 -0600
2376+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-11.c 2012-03-06 12:31:05.153039004 -0600
2377@@ -0,0 +1,66 @@
2378+/* { dg-do compile { target { powerpc*-*-* } } } */
2379+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2380+/* { dg-require-effective-target powerpc_altivec_ok } */
2381+/* { dg-options "-O2 -maltivec -maltivec2" } */
2382+/* { dg-final { scan-assembler-times "lvtlxl" 37 } } */
2383+
2384+#include <altivec.h>
2385+
2386+typedef __vector signed char vsc;
2387+typedef __vector signed short vss;
2388+typedef __vector signed int vsi;
2389+typedef __vector unsigned char vuc;
2390+typedef __vector unsigned short vus;
2391+typedef __vector unsigned int vui;
2392+typedef __vector bool char vbc;
2393+typedef __vector bool short vbs;
2394+typedef __vector bool int vbi;
2395+typedef __vector float vsf;
2396+typedef __vector pixel vp;
2397+typedef signed char sc;
2398+typedef signed short ss;
2399+typedef signed int si;
2400+typedef signed long sl;
2401+typedef unsigned char uc;
2402+typedef unsigned short us;
2403+typedef unsigned int ui;
2404+typedef unsigned long ul;
2405+typedef float sf;
2406+
2407+vsc lc2(long a, void *p) { return __builtin_altivec_lvtlxl (a,p); }
2408+vsf llxl01(long a, vsf *p) { return __builtin_vec_lvtlxl (a,p); }
2409+vsf llxl02(long a, sf *p) { return __builtin_vec_lvtlxl (a,p); }
2410+vbi llxl03(long a, vbi *p) { return __builtin_vec_lvtlxl (a,p); }
2411+vsi llxl04(long a, vsi *p) { return __builtin_vec_lvtlxl (a,p); }
2412+vsi llxl05(long a, si *p) { return __builtin_vec_lvtlxl (a,p); }
2413+vui llxl06(long a, vui *p) { return __builtin_vec_lvtlxl (a,p); }
2414+vui llxl07(long a, ui *p) { return __builtin_vec_lvtlxl (a,p); }
2415+vbs llxl08(long a, vbs *p) { return __builtin_vec_lvtlxl (a,p); }
2416+vp llxl09(long a, vp *p) { return __builtin_vec_lvtlxl (a,p); }
2417+vss llxl10(long a, vss *p) { return __builtin_vec_lvtlxl (a,p); }
2418+vss llxl11(long a, ss *p) { return __builtin_vec_lvtlxl (a,p); }
2419+vus llxl12(long a, vus *p) { return __builtin_vec_lvtlxl (a,p); }
2420+vus llxl13(long a, us *p) { return __builtin_vec_lvtlxl (a,p); }
2421+vbc llxl14(long a, vbc *p) { return __builtin_vec_lvtlxl (a,p); }
2422+vsc llxl15(long a, vsc *p) { return __builtin_vec_lvtlxl (a,p); }
2423+vsc llxl16(long a, sc *p) { return __builtin_vec_lvtlxl (a,p); }
2424+vuc llxl17(long a, vuc *p) { return __builtin_vec_lvtlxl (a,p); }
2425+vuc llxl18(long a, uc *p) { return __builtin_vec_lvtlxl (a,p); }
2426+vsf Dllxl01(long a, vsf *p) { return vec_lvtlxl (a,p); }
2427+vsf Dllxl02(long a, sf *p) { return vec_lvtlxl (a,p); }
2428+vbi Dllxl03(long a, vbi *p) { return vec_lvtlxl (a,p); }
2429+vsi Dllxl04(long a, vsi *p) { return vec_lvtlxl (a,p); }
2430+vsi Dllxl05(long a, si *p) { return vec_lvtlxl (a,p); }
2431+vui Dllxl06(long a, vui *p) { return vec_lvtlxl (a,p); }
2432+vui Dllxl07(long a, ui *p) { return vec_lvtlxl (a,p); }
2433+vbs Dllxl08(long a, vbs *p) { return vec_lvtlxl (a,p); }
2434+vp Dllxl09(long a, vp *p) { return vec_lvtlxl (a,p); }
2435+vss Dllxl10(long a, vss *p) { return vec_lvtlxl (a,p); }
2436+vss Dllxl11(long a, ss *p) { return vec_lvtlxl (a,p); }
2437+vus Dllxl12(long a, vus *p) { return vec_lvtlxl (a,p); }
2438+vus Dllxl13(long a, us *p) { return vec_lvtlxl (a,p); }
2439+vbc Dllxl14(long a, vbc *p) { return vec_lvtlxl (a,p); }
2440+vsc Dllxl15(long a, vsc *p) { return vec_lvtlxl (a,p); }
2441+vsc Dllxl16(long a, sc *p) { return vec_lvtlxl (a,p); }
2442+vuc Dllxl17(long a, vuc *p) { return vec_lvtlxl (a,p); }
2443+vuc Dllxl18(long a, uc *p) { return vec_lvtlxl (a,p); }
2444diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c
2445--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c 1969-12-31 18:00:00.000000000 -0600
2446+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-12.c 2012-03-06 12:31:05.153039004 -0600
2447@@ -0,0 +1,66 @@
2448+/* { dg-do compile { target { powerpc*-*-* } } } */
2449+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2450+/* { dg-require-effective-target powerpc_altivec_ok } */
2451+/* { dg-options "-O2 -maltivec -maltivec2" } */
2452+/* { dg-final { scan-assembler-times "lvtrx" 37 } } */
2453+
2454+#include <altivec.h>
2455+
2456+typedef __vector signed char vsc;
2457+typedef __vector signed short vss;
2458+typedef __vector signed int vsi;
2459+typedef __vector unsigned char vuc;
2460+typedef __vector unsigned short vus;
2461+typedef __vector unsigned int vui;
2462+typedef __vector bool char vbc;
2463+typedef __vector bool short vbs;
2464+typedef __vector bool int vbi;
2465+typedef __vector float vsf;
2466+typedef __vector pixel vp;
2467+typedef signed char sc;
2468+typedef signed short ss;
2469+typedef signed int si;
2470+typedef signed long sl;
2471+typedef unsigned char uc;
2472+typedef unsigned short us;
2473+typedef unsigned int ui;
2474+typedef unsigned long ul;
2475+typedef float sf;
2476+
2477+vsc lc3(long a, void *p) { return __builtin_altivec_lvtrx (a,p); }
2478+vsf lrx01(long a, vsf *p) { return __builtin_vec_lvtrx (a,p); }
2479+vsf lrx02(long a, sf *p) { return __builtin_vec_lvtrx (a,p); }
2480+vbi lrx03(long a, vbi *p) { return __builtin_vec_lvtrx (a,p); }
2481+vsi lrx04(long a, vsi *p) { return __builtin_vec_lvtrx (a,p); }
2482+vsi lrx05(long a, si *p) { return __builtin_vec_lvtrx (a,p); }
2483+vui lrx06(long a, vui *p) { return __builtin_vec_lvtrx (a,p); }
2484+vui lrx07(long a, ui *p) { return __builtin_vec_lvtrx (a,p); }
2485+vbs lrx08(long a, vbs *p) { return __builtin_vec_lvtrx (a,p); }
2486+vp lrx09(long a, vp *p) { return __builtin_vec_lvtrx (a,p); }
2487+vss lrx10(long a, vss *p) { return __builtin_vec_lvtrx (a,p); }
2488+vss lrx11(long a, ss *p) { return __builtin_vec_lvtrx (a,p); }
2489+vus lrx12(long a, vus *p) { return __builtin_vec_lvtrx (a,p); }
2490+vus lrx13(long a, us *p) { return __builtin_vec_lvtrx (a,p); }
2491+vbc lrx14(long a, vbc *p) { return __builtin_vec_lvtrx (a,p); }
2492+vsc lrx15(long a, vsc *p) { return __builtin_vec_lvtrx (a,p); }
2493+vsc lrx16(long a, sc *p) { return __builtin_vec_lvtrx (a,p); }
2494+vuc lrx17(long a, vuc *p) { return __builtin_vec_lvtrx (a,p); }
2495+vuc lrx18(long a, uc *p) { return __builtin_vec_lvtrx (a,p); }
2496+vsf Dlrx01(long a, vsf *p) { return vec_lvtrx (a,p); }
2497+vsf Dlrx02(long a, sf *p) { return vec_lvtrx (a,p); }
2498+vbi Dlrx03(long a, vbi *p) { return vec_lvtrx (a,p); }
2499+vsi Dlrx04(long a, vsi *p) { return vec_lvtrx (a,p); }
2500+vsi Dlrx05(long a, si *p) { return vec_lvtrx (a,p); }
2501+vui Dlrx06(long a, vui *p) { return vec_lvtrx (a,p); }
2502+vui Dlrx07(long a, ui *p) { return vec_lvtrx (a,p); }
2503+vbs Dlrx08(long a, vbs *p) { return vec_lvtrx (a,p); }
2504+vp Dlrx09(long a, vp *p) { return vec_lvtrx (a,p); }
2505+vss Dlrx10(long a, vss *p) { return vec_lvtrx (a,p); }
2506+vss Dlrx11(long a, ss *p) { return vec_lvtrx (a,p); }
2507+vus Dlrx12(long a, vus *p) { return vec_lvtrx (a,p); }
2508+vus Dlrx13(long a, us *p) { return vec_lvtrx (a,p); }
2509+vbc Dlrx14(long a, vbc *p) { return vec_lvtrx (a,p); }
2510+vsc Dlrx15(long a, vsc *p) { return vec_lvtrx (a,p); }
2511+vsc Dlrx16(long a, sc *p) { return vec_lvtrx (a,p); }
2512+vuc Dlrx17(long a, vuc *p) { return vec_lvtrx (a,p); }
2513+vuc Dlrx18(long a, uc *p) { return vec_lvtrx (a,p); }
2514diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c
2515--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c 1969-12-31 18:00:00.000000000 -0600
2516+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-13.c 2012-03-06 12:31:05.153039004 -0600
2517@@ -0,0 +1,66 @@
2518+/* { dg-do compile { target { powerpc*-*-* } } } */
2519+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2520+/* { dg-require-effective-target powerpc_altivec_ok } */
2521+/* { dg-options "-O2 -maltivec -maltivec2" } */
2522+/* { dg-final { scan-assembler-times "lvtrxl" 37 } } */
2523+
2524+#include <altivec.h>
2525+
2526+typedef __vector signed char vsc;
2527+typedef __vector signed short vss;
2528+typedef __vector signed int vsi;
2529+typedef __vector unsigned char vuc;
2530+typedef __vector unsigned short vus;
2531+typedef __vector unsigned int vui;
2532+typedef __vector bool char vbc;
2533+typedef __vector bool short vbs;
2534+typedef __vector bool int vbi;
2535+typedef __vector float vsf;
2536+typedef __vector pixel vp;
2537+typedef signed char sc;
2538+typedef signed short ss;
2539+typedef signed int si;
2540+typedef signed long sl;
2541+typedef unsigned char uc;
2542+typedef unsigned short us;
2543+typedef unsigned int ui;
2544+typedef unsigned long ul;
2545+typedef float sf;
2546+
2547+vsc lc4(long a, void *p) { return __builtin_altivec_lvtrxl (a,p); }
2548+vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvtrxl (a,p); }
2549+vsf lrxl02(long a, sf *p) { return __builtin_vec_lvtrxl (a,p); }
2550+vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvtrxl (a,p); }
2551+vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvtrxl (a,p); }
2552+vsi lrxl05(long a, si *p) { return __builtin_vec_lvtrxl (a,p); }
2553+vui lrxl06(long a, vui *p) { return __builtin_vec_lvtrxl (a,p); }
2554+vui lrxl07(long a, ui *p) { return __builtin_vec_lvtrxl (a,p); }
2555+vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvtrxl (a,p); }
2556+vp lrxl09(long a, vp *p) { return __builtin_vec_lvtrxl (a,p); }
2557+vss lrxl10(long a, vss *p) { return __builtin_vec_lvtrxl (a,p); }
2558+vss lrxl11(long a, ss *p) { return __builtin_vec_lvtrxl (a,p); }
2559+vus lrxl12(long a, vus *p) { return __builtin_vec_lvtrxl (a,p); }
2560+vus lrxl13(long a, us *p) { return __builtin_vec_lvtrxl (a,p); }
2561+vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvtrxl (a,p); }
2562+vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvtrxl (a,p); }
2563+vsc lrxl16(long a, sc *p) { return __builtin_vec_lvtrxl (a,p); }
2564+vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvtrxl (a,p); }
2565+vuc lrxl18(long a, uc *p) { return __builtin_vec_lvtrxl (a,p); }
2566+vsf Dlrxl01(long a, vsf *p) { return vec_lvtrxl (a,p); }
2567+vsf Dlrxl02(long a, sf *p) { return vec_lvtrxl (a,p); }
2568+vbi Dlrxl03(long a, vbi *p) { return vec_lvtrxl (a,p); }
2569+vsi Dlrxl04(long a, vsi *p) { return vec_lvtrxl (a,p); }
2570+vsi Dlrxl05(long a, si *p) { return vec_lvtrxl (a,p); }
2571+vui Dlrxl06(long a, vui *p) { return vec_lvtrxl (a,p); }
2572+vui Dlrxl07(long a, ui *p) { return vec_lvtrxl (a,p); }
2573+vbs Dlrxl08(long a, vbs *p) { return vec_lvtrxl (a,p); }
2574+vp Dlrxl09(long a, vp *p) { return vec_lvtrxl (a,p); }
2575+vss Dlrxl10(long a, vss *p) { return vec_lvtrxl (a,p); }
2576+vss Dlrxl11(long a, ss *p) { return vec_lvtrxl (a,p); }
2577+vus Dlrxl12(long a, vus *p) { return vec_lvtrxl (a,p); }
2578+vus Dlrxl13(long a, us *p) { return vec_lvtrxl (a,p); }
2579+vbc Dlrxl14(long a, vbc *p) { return vec_lvtrxl (a,p); }
2580+vsc Dlrxl15(long a, vsc *p) { return vec_lvtrxl (a,p); }
2581+vsc Dlrxl16(long a, sc *p) { return vec_lvtrxl (a,p); }
2582+vuc Dlrxl17(long a, vuc *p) { return vec_lvtrxl (a,p); }
2583+vuc Dlrxl18(long a, uc *p) { return vec_lvtrxl (a,p); }
2584diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c
2585--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c 1969-12-31 18:00:00.000000000 -0600
2586+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-14.c 2012-03-06 12:31:05.154039003 -0600
2587@@ -0,0 +1,66 @@
2588+/* { dg-do compile { target { powerpc*-*-* } } } */
2589+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2590+/* { dg-require-effective-target powerpc_altivec_ok } */
2591+/* { dg-options "-O2 -maltivec -maltivec2" } */
2592+/* { dg-final { scan-assembler-times "stvflx" 37 } } */
2593+
2594+#include <altivec.h>
2595+
2596+typedef __vector signed char vsc;
2597+typedef __vector signed short vss;
2598+typedef __vector signed int vsi;
2599+typedef __vector unsigned char vuc;
2600+typedef __vector unsigned short vus;
2601+typedef __vector unsigned int vui;
2602+typedef __vector bool char vbc;
2603+typedef __vector bool short vbs;
2604+typedef __vector bool int vbi;
2605+typedef __vector float vsf;
2606+typedef __vector pixel vp;
2607+typedef signed char sc;
2608+typedef signed short ss;
2609+typedef signed int si;
2610+typedef signed long sl;
2611+typedef unsigned char uc;
2612+typedef unsigned short us;
2613+typedef unsigned int ui;
2614+typedef unsigned long ul;
2615+typedef float sf;
2616+
2617+void sc1(vsc v, long a, void *p) { __builtin_altivec_stvflx (v,a,p); }
2618+void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvflx (v,a,p); }
2619+void slx02(vsf v, long a, sf *p) { __builtin_vec_stvflx (v,a,p); }
2620+void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvflx (v,a,p); }
2621+void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvflx (v,a,p); }
2622+void slx05(vsi v, long a, si *p) { __builtin_vec_stvflx (v,a,p); }
2623+void slx06(vui v, long a, vui *p) { __builtin_vec_stvflx (v,a,p); }
2624+void slx07(vui v, long a, ui *p) { __builtin_vec_stvflx (v,a,p); }
2625+void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvflx (v,a,p); }
2626+void slx09(vp v, long a, vp *p) { __builtin_vec_stvflx (v,a,p); }
2627+void slx10(vss v, long a, vss *p) { __builtin_vec_stvflx (v,a,p); }
2628+void slx11(vss v, long a, ss *p) { __builtin_vec_stvflx (v,a,p); }
2629+void slx12(vus v, long a, vus *p) { __builtin_vec_stvflx (v,a,p); }
2630+void slx13(vus v, long a, us *p) { __builtin_vec_stvflx (v,a,p); }
2631+void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvflx (v,a,p); }
2632+void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvflx (v,a,p); }
2633+void slx16(vsc v, long a, sc *p) { __builtin_vec_stvflx (v,a,p); }
2634+void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvflx (v,a,p); }
2635+void slx18(vuc v, long a, uc *p) { __builtin_vec_stvflx (v,a,p); }
2636+void Dslx01(vsf v, long a, vsf *p) { vec_stvflx (v,a,p); }
2637+void Dslx02(vsf v, long a, sf *p) { vec_stvflx (v,a,p); }
2638+void Dslx03(vbi v, long a, vbi *p) { vec_stvflx (v,a,p); }
2639+void Dslx04(vsi v, long a, vsi *p) { vec_stvflx (v,a,p); }
2640+void Dslx05(vsi v, long a, si *p) { vec_stvflx (v,a,p); }
2641+void Dslx06(vui v, long a, vui *p) { vec_stvflx (v,a,p); }
2642+void Dslx07(vui v, long a, ui *p) { vec_stvflx (v,a,p); }
2643+void Dslx08(vbs v, long a, vbs *p) { vec_stvflx (v,a,p); }
2644+void Dslx09(vp v, long a, vp *p) { vec_stvflx (v,a,p); }
2645+void Dslx10(vss v, long a, vss *p) { vec_stvflx (v,a,p); }
2646+void Dslx11(vss v, long a, ss *p) { vec_stvflx (v,a,p); }
2647+void Dslx12(vus v, long a, vus *p) { vec_stvflx (v,a,p); }
2648+void Dslx13(vus v, long a, us *p) { vec_stvflx (v,a,p); }
2649+void Dslx14(vbc v, long a, vbc *p) { vec_stvflx (v,a,p); }
2650+void Dslx15(vsc v, long a, vsc *p) { vec_stvflx (v,a,p); }
2651+void Dslx16(vsc v, long a, sc *p) { vec_stvflx (v,a,p); }
2652+void Dslx17(vuc v, long a, vuc *p) { vec_stvflx (v,a,p); }
2653+void Dslx18(vuc v, long a, uc *p) { vec_stvflx (v,a,p); }
2654diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c
2655--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c 1969-12-31 18:00:00.000000000 -0600
2656+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-15.c 2012-03-06 12:31:05.154039003 -0600
2657@@ -0,0 +1,66 @@
2658+/* { dg-do compile { target { powerpc*-*-* } } } */
2659+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2660+/* { dg-require-effective-target powerpc_altivec_ok } */
2661+/* { dg-options "-O2 -maltivec -maltivec2" } */
2662+/* { dg-final { scan-assembler-times "stvflxl" 37 } } */
2663+
2664+#include <altivec.h>
2665+
2666+typedef __vector signed char vsc;
2667+typedef __vector signed short vss;
2668+typedef __vector signed int vsi;
2669+typedef __vector unsigned char vuc;
2670+typedef __vector unsigned short vus;
2671+typedef __vector unsigned int vui;
2672+typedef __vector bool char vbc;
2673+typedef __vector bool short vbs;
2674+typedef __vector bool int vbi;
2675+typedef __vector float vsf;
2676+typedef __vector pixel vp;
2677+typedef signed char sc;
2678+typedef signed short ss;
2679+typedef signed int si;
2680+typedef signed long sl;
2681+typedef unsigned char uc;
2682+typedef unsigned short us;
2683+typedef unsigned int ui;
2684+typedef unsigned long ul;
2685+typedef float sf;
2686+
2687+void sc2(vsc v, long a, void *p) { __builtin_altivec_stvflxl (v,a,p); }
2688+void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvflxl (v,a,p); }
2689+void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvflxl (v,a,p); }
2690+void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvflxl (v,a,p); }
2691+void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvflxl (v,a,p); }
2692+void slxl05(vsi v, long a, si *p) { __builtin_vec_stvflxl (v,a,p); }
2693+void slxl06(vui v, long a, vui *p) { __builtin_vec_stvflxl (v,a,p); }
2694+void slxl07(vui v, long a, ui *p) { __builtin_vec_stvflxl (v,a,p); }
2695+void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvflxl (v,a,p); }
2696+void slxl09(vp v, long a, vp *p) { __builtin_vec_stvflxl (v,a,p); }
2697+void slxl10(vss v, long a, vss *p) { __builtin_vec_stvflxl (v,a,p); }
2698+void slxl11(vss v, long a, ss *p) { __builtin_vec_stvflxl (v,a,p); }
2699+void slxl12(vus v, long a, vus *p) { __builtin_vec_stvflxl (v,a,p); }
2700+void slxl13(vus v, long a, us *p) { __builtin_vec_stvflxl (v,a,p); }
2701+void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvflxl (v,a,p); }
2702+void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvflxl (v,a,p); }
2703+void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvflxl (v,a,p); }
2704+void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvflxl (v,a,p); }
2705+void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvflxl (v,a,p); }
2706+void Dslxl01(vsf v, long a, vsf *p) { vec_stvflxl (v,a,p); }
2707+void Dslxl02(vsf v, long a, sf *p) { vec_stvflxl (v,a,p); }
2708+void Dslxl03(vbi v, long a, vbi *p) { vec_stvflxl (v,a,p); }
2709+void Dslxl04(vsi v, long a, vsi *p) { vec_stvflxl (v,a,p); }
2710+void Dslxl05(vsi v, long a, si *p) { vec_stvflxl (v,a,p); }
2711+void Dslxl06(vui v, long a, vui *p) { vec_stvflxl (v,a,p); }
2712+void Dslxl07(vui v, long a, ui *p) { vec_stvflxl (v,a,p); }
2713+void Dslxl08(vbs v, long a, vbs *p) { vec_stvflxl (v,a,p); }
2714+void Dslxl09(vp v, long a, vp *p) { vec_stvflxl (v,a,p); }
2715+void Dslxl10(vss v, long a, vss *p) { vec_stvflxl (v,a,p); }
2716+void Dslxl11(vss v, long a, ss *p) { vec_stvflxl (v,a,p); }
2717+void Dslxl12(vus v, long a, vus *p) { vec_stvflxl (v,a,p); }
2718+void Dslxl13(vus v, long a, us *p) { vec_stvflxl (v,a,p); }
2719+void Dslxl14(vbc v, long a, vbc *p) { vec_stvflxl (v,a,p); }
2720+void Dslxl15(vsc v, long a, vsc *p) { vec_stvflxl (v,a,p); }
2721+void Dslxl16(vsc v, long a, sc *p) { vec_stvflxl (v,a,p); }
2722+void Dslxl17(vuc v, long a, vuc *p) { vec_stvflxl (v,a,p); }
2723+void Dslxl18(vuc v, long a, uc *p) { vec_stvflxl (v,a,p); }
2724diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c
2725--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c 1969-12-31 18:00:00.000000000 -0600
2726+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-16.c 2012-03-06 12:31:05.154039003 -0600
2727@@ -0,0 +1,66 @@
2728+/* { dg-do compile { target { powerpc*-*-* } } } */
2729+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2730+/* { dg-require-effective-target powerpc_altivec_ok } */
2731+/* { dg-options "-O2 -maltivec -maltivec2" } */
2732+/* { dg-final { scan-assembler-times "stvfrx" 37 } } */
2733+
2734+#include <altivec.h>
2735+
2736+typedef __vector signed char vsc;
2737+typedef __vector signed short vss;
2738+typedef __vector signed int vsi;
2739+typedef __vector unsigned char vuc;
2740+typedef __vector unsigned short vus;
2741+typedef __vector unsigned int vui;
2742+typedef __vector bool char vbc;
2743+typedef __vector bool short vbs;
2744+typedef __vector bool int vbi;
2745+typedef __vector float vsf;
2746+typedef __vector pixel vp;
2747+typedef signed char sc;
2748+typedef signed short ss;
2749+typedef signed int si;
2750+typedef signed long sl;
2751+typedef unsigned char uc;
2752+typedef unsigned short us;
2753+typedef unsigned int ui;
2754+typedef unsigned long ul;
2755+typedef float sf;
2756+
2757+void sc3(vsc v, long a, void *p) { __builtin_altivec_stvfrx (v,a,p); }
2758+void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvfrx (v,a,p); }
2759+void srx02(vsf v, long a, sf *p) { __builtin_vec_stvfrx (v,a,p); }
2760+void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvfrx (v,a,p); }
2761+void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvfrx (v,a,p); }
2762+void srx05(vsi v, long a, si *p) { __builtin_vec_stvfrx (v,a,p); }
2763+void srx06(vui v, long a, vui *p) { __builtin_vec_stvfrx (v,a,p); }
2764+void srx07(vui v, long a, ui *p) { __builtin_vec_stvfrx (v,a,p); }
2765+void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvfrx (v,a,p); }
2766+void srx09(vp v, long a, vp *p) { __builtin_vec_stvfrx (v,a,p); }
2767+void srx10(vss v, long a, vss *p) { __builtin_vec_stvfrx (v,a,p); }
2768+void srx11(vss v, long a, ss *p) { __builtin_vec_stvfrx (v,a,p); }
2769+void srx12(vus v, long a, vus *p) { __builtin_vec_stvfrx (v,a,p); }
2770+void srx13(vus v, long a, us *p) { __builtin_vec_stvfrx (v,a,p); }
2771+void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvfrx (v,a,p); }
2772+void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvfrx (v,a,p); }
2773+void srx16(vsc v, long a, sc *p) { __builtin_vec_stvfrx (v,a,p); }
2774+void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvfrx (v,a,p); }
2775+void srx18(vuc v, long a, uc *p) { __builtin_vec_stvfrx (v,a,p); }
2776+void Dsrx01(vsf v, long a, vsf *p) { vec_stvfrx (v,a,p); }
2777+void Dsrx02(vsf v, long a, sf *p) { vec_stvfrx (v,a,p); }
2778+void Dsrx03(vbi v, long a, vbi *p) { vec_stvfrx (v,a,p); }
2779+void Dsrx04(vsi v, long a, vsi *p) { vec_stvfrx (v,a,p); }
2780+void Dsrx05(vsi v, long a, si *p) { vec_stvfrx (v,a,p); }
2781+void Dsrx06(vui v, long a, vui *p) { vec_stvfrx (v,a,p); }
2782+void Dsrx07(vui v, long a, ui *p) { vec_stvfrx (v,a,p); }
2783+void Dsrx08(vbs v, long a, vbs *p) { vec_stvfrx (v,a,p); }
2784+void Dsrx09(vp v, long a, vp *p) { vec_stvfrx (v,a,p); }
2785+void Dsrx10(vss v, long a, vss *p) { vec_stvfrx (v,a,p); }
2786+void Dsrx11(vss v, long a, ss *p) { vec_stvfrx (v,a,p); }
2787+void Dsrx12(vus v, long a, vus *p) { vec_stvfrx (v,a,p); }
2788+void Dsrx13(vus v, long a, us *p) { vec_stvfrx (v,a,p); }
2789+void Dsrx14(vbc v, long a, vbc *p) { vec_stvfrx (v,a,p); }
2790+void Dsrx15(vsc v, long a, vsc *p) { vec_stvfrx (v,a,p); }
2791+void Dsrx16(vsc v, long a, sc *p) { vec_stvfrx (v,a,p); }
2792+void Dsrx17(vuc v, long a, vuc *p) { vec_stvfrx (v,a,p); }
2793+void Dsrx18(vuc v, long a, uc *p) { vec_stvfrx (v,a,p); }
2794diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c
2795--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c 1969-12-31 18:00:00.000000000 -0600
2796+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-17.c 2012-03-06 12:31:05.155039001 -0600
2797@@ -0,0 +1,66 @@
2798+/* { dg-do compile { target { powerpc*-*-* } } } */
2799+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2800+/* { dg-require-effective-target powerpc_altivec_ok } */
2801+/* { dg-options "-O2 -maltivec -maltivec2" } */
2802+/* { dg-final { scan-assembler-times "stvfrxl" 37 } } */
2803+
2804+#include <altivec.h>
2805+
2806+typedef __vector signed char vsc;
2807+typedef __vector signed short vss;
2808+typedef __vector signed int vsi;
2809+typedef __vector unsigned char vuc;
2810+typedef __vector unsigned short vus;
2811+typedef __vector unsigned int vui;
2812+typedef __vector bool char vbc;
2813+typedef __vector bool short vbs;
2814+typedef __vector bool int vbi;
2815+typedef __vector float vsf;
2816+typedef __vector pixel vp;
2817+typedef signed char sc;
2818+typedef signed short ss;
2819+typedef signed int si;
2820+typedef signed long sl;
2821+typedef unsigned char uc;
2822+typedef unsigned short us;
2823+typedef unsigned int ui;
2824+typedef unsigned long ul;
2825+typedef float sf;
2826+
2827+void sc4(vsc v, long a, void *p) { __builtin_altivec_stvfrxl (v,a,p); }
2828+void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvfrxl (v,a,p); }
2829+void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvfrxl (v,a,p); }
2830+void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvfrxl (v,a,p); }
2831+void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvfrxl (v,a,p); }
2832+void srxl05(vsi v, long a, si *p) { __builtin_vec_stvfrxl (v,a,p); }
2833+void srxl06(vui v, long a, vui *p) { __builtin_vec_stvfrxl (v,a,p); }
2834+void srxl07(vui v, long a, ui *p) { __builtin_vec_stvfrxl (v,a,p); }
2835+void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvfrxl (v,a,p); }
2836+void srxl09(vp v, long a, vp *p) { __builtin_vec_stvfrxl (v,a,p); }
2837+void srxl10(vss v, long a, vss *p) { __builtin_vec_stvfrxl (v,a,p); }
2838+void srxl11(vss v, long a, ss *p) { __builtin_vec_stvfrxl (v,a,p); }
2839+void srxl12(vus v, long a, vus *p) { __builtin_vec_stvfrxl (v,a,p); }
2840+void srxl13(vus v, long a, us *p) { __builtin_vec_stvfrxl (v,a,p); }
2841+void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvfrxl (v,a,p); }
2842+void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvfrxl (v,a,p); }
2843+void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvfrxl (v,a,p); }
2844+void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvfrxl (v,a,p); }
2845+void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvfrxl (v,a,p); }
2846+void Dsrxl01(vsf v, long a, vsf *p) { vec_stvfrxl (v,a,p); }
2847+void Dsrxl02(vsf v, long a, sf *p) { vec_stvfrxl (v,a,p); }
2848+void Dsrxl03(vbi v, long a, vbi *p) { vec_stvfrxl (v,a,p); }
2849+void Dsrxl04(vsi v, long a, vsi *p) { vec_stvfrxl (v,a,p); }
2850+void Dsrxl05(vsi v, long a, si *p) { vec_stvfrxl (v,a,p); }
2851+void Dsrxl06(vui v, long a, vui *p) { vec_stvfrxl (v,a,p); }
2852+void Dsrxl07(vui v, long a, ui *p) { vec_stvfrxl (v,a,p); }
2853+void Dsrxl08(vbs v, long a, vbs *p) { vec_stvfrxl (v,a,p); }
2854+void Dsrxl09(vp v, long a, vp *p) { vec_stvfrxl (v,a,p); }
2855+void Dsrxl10(vss v, long a, vss *p) { vec_stvfrxl (v,a,p); }
2856+void Dsrxl11(vss v, long a, ss *p) { vec_stvfrxl (v,a,p); }
2857+void Dsrxl12(vus v, long a, vus *p) { vec_stvfrxl (v,a,p); }
2858+void Dsrxl13(vus v, long a, us *p) { vec_stvfrxl (v,a,p); }
2859+void Dsrxl14(vbc v, long a, vbc *p) { vec_stvfrxl (v,a,p); }
2860+void Dsrxl15(vsc v, long a, vsc *p) { vec_stvfrxl (v,a,p); }
2861+void Dsrxl16(vsc v, long a, sc *p) { vec_stvfrxl (v,a,p); }
2862+void Dsrxl17(vuc v, long a, vuc *p) { vec_stvfrxl (v,a,p); }
2863+void Dsrxl18(vuc v, long a, uc *p) { vec_stvfrxl (v,a,p); }
2864diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c
2865--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c 1969-12-31 18:00:00.000000000 -0600
2866+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-18.c 2012-03-06 12:31:05.155039001 -0600
2867@@ -0,0 +1,66 @@
2868+/* { dg-do compile { target { powerpc*-*-* } } } */
2869+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2870+/* { dg-require-effective-target powerpc_altivec_ok } */
2871+/* { dg-options "-O2 -maltivec -maltivec2" } */
2872+/* { dg-final { scan-assembler-times "lvswx" 37 } } */
2873+
2874+#include <altivec.h>
2875+
2876+typedef __vector signed char vsc;
2877+typedef __vector signed short vss;
2878+typedef __vector signed int vsi;
2879+typedef __vector unsigned char vuc;
2880+typedef __vector unsigned short vus;
2881+typedef __vector unsigned int vui;
2882+typedef __vector bool char vbc;
2883+typedef __vector bool short vbs;
2884+typedef __vector bool int vbi;
2885+typedef __vector float vsf;
2886+typedef __vector pixel vp;
2887+typedef signed char sc;
2888+typedef signed short ss;
2889+typedef signed int si;
2890+typedef signed long sl;
2891+typedef unsigned char uc;
2892+typedef unsigned short us;
2893+typedef unsigned int ui;
2894+typedef unsigned long ul;
2895+typedef float sf;
2896+
2897+vsc ls1(long a, void *p) { return __builtin_altivec_lvswx (a,p); }
2898+vsf ls01(long a, vsf *p) { return __builtin_vec_lvswx (a,p); }
2899+vsf ls02(long a, sf *p) { return __builtin_vec_lvswx (a,p); }
2900+vbi ls03(long a, vbi *p) { return __builtin_vec_lvswx (a,p); }
2901+vsi ls04(long a, vsi *p) { return __builtin_vec_lvswx (a,p); }
2902+vsi ls05(long a, si *p) { return __builtin_vec_lvswx (a,p); }
2903+vui ls06(long a, vui *p) { return __builtin_vec_lvswx (a,p); }
2904+vui ls07(long a, ui *p) { return __builtin_vec_lvswx (a,p); }
2905+vbs ls08(long a, vbs *p) { return __builtin_vec_lvswx (a,p); }
2906+vp ls09(long a, vp *p) { return __builtin_vec_lvswx (a,p); }
2907+vss ls10(long a, vss *p) { return __builtin_vec_lvswx (a,p); }
2908+vss ls11(long a, ss *p) { return __builtin_vec_lvswx (a,p); }
2909+vus ls12(long a, vus *p) { return __builtin_vec_lvswx (a,p); }
2910+vus ls13(long a, us *p) { return __builtin_vec_lvswx (a,p); }
2911+vbc ls14(long a, vbc *p) { return __builtin_vec_lvswx (a,p); }
2912+vsc ls15(long a, vsc *p) { return __builtin_vec_lvswx (a,p); }
2913+vsc ls16(long a, sc *p) { return __builtin_vec_lvswx (a,p); }
2914+vuc ls17(long a, vuc *p) { return __builtin_vec_lvswx (a,p); }
2915+vuc ls18(long a, uc *p) { return __builtin_vec_lvswx (a,p); }
2916+vsf Dls01(long a, vsf *p) { return vec_lvswx (a,p); }
2917+vsf Dls02(long a, sf *p) { return vec_lvswx (a,p); }
2918+vbi Dls03(long a, vbi *p) { return vec_lvswx (a,p); }
2919+vsi Dls04(long a, vsi *p) { return vec_lvswx (a,p); }
2920+vsi Dls05(long a, si *p) { return vec_lvswx (a,p); }
2921+vui Dls06(long a, vui *p) { return vec_lvswx (a,p); }
2922+vui Dls07(long a, ui *p) { return vec_lvswx (a,p); }
2923+vbs Dls08(long a, vbs *p) { return vec_lvswx (a,p); }
2924+vp Dls09(long a, vp *p) { return vec_lvswx (a,p); }
2925+vss Dls10(long a, vss *p) { return vec_lvswx (a,p); }
2926+vss Dls11(long a, ss *p) { return vec_lvswx (a,p); }
2927+vus Dls12(long a, vus *p) { return vec_lvswx (a,p); }
2928+vus Dls13(long a, us *p) { return vec_lvswx (a,p); }
2929+vbc Dls14(long a, vbc *p) { return vec_lvswx (a,p); }
2930+vsc Dls15(long a, vsc *p) { return vec_lvswx (a,p); }
2931+vsc Dls16(long a, sc *p) { return vec_lvswx (a,p); }
2932+vuc Dls17(long a, vuc *p) { return vec_lvswx (a,p); }
2933+vuc Dls18(long a, uc *p) { return vec_lvswx (a,p); }
2934diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c
2935--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c 1969-12-31 18:00:00.000000000 -0600
2936+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-19.c 2012-03-06 12:31:05.155039001 -0600
2937@@ -0,0 +1,66 @@
2938+/* { dg-do compile { target { powerpc*-*-* } } } */
2939+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
2940+/* { dg-require-effective-target powerpc_altivec_ok } */
2941+/* { dg-options "-O2 -maltivec -maltivec2" } */
2942+/* { dg-final { scan-assembler-times "lvswxl" 37 } } */
2943+
2944+#include <altivec.h>
2945+
2946+typedef __vector signed char vsc;
2947+typedef __vector signed short vss;
2948+typedef __vector signed int vsi;
2949+typedef __vector unsigned char vuc;
2950+typedef __vector unsigned short vus;
2951+typedef __vector unsigned int vui;
2952+typedef __vector bool char vbc;
2953+typedef __vector bool short vbs;
2954+typedef __vector bool int vbi;
2955+typedef __vector float vsf;
2956+typedef __vector pixel vp;
2957+typedef signed char sc;
2958+typedef signed short ss;
2959+typedef signed int si;
2960+typedef signed long sl;
2961+typedef unsigned char uc;
2962+typedef unsigned short us;
2963+typedef unsigned int ui;
2964+typedef unsigned long ul;
2965+typedef float sf;
2966+
2967+vsc ls2l(long a, void *p) { return __builtin_altivec_lvswxl (a,p); }
2968+vsf lsl01(long a, vsf *p) { return __builtin_vec_lvswxl (a,p); }
2969+vsf lsl02(long a, sf *p) { return __builtin_vec_lvswxl (a,p); }
2970+vbi lsl03(long a, vbi *p) { return __builtin_vec_lvswxl (a,p); }
2971+vsi lsl04(long a, vsi *p) { return __builtin_vec_lvswxl (a,p); }
2972+vsi lsl05(long a, si *p) { return __builtin_vec_lvswxl (a,p); }
2973+vui lsl06(long a, vui *p) { return __builtin_vec_lvswxl (a,p); }
2974+vui lsl07(long a, ui *p) { return __builtin_vec_lvswxl (a,p); }
2975+vbs lsl08(long a, vbs *p) { return __builtin_vec_lvswxl (a,p); }
2976+vp lsl09(long a, vp *p) { return __builtin_vec_lvswxl (a,p); }
2977+vss lsl10(long a, vss *p) { return __builtin_vec_lvswxl (a,p); }
2978+vss lsl11(long a, ss *p) { return __builtin_vec_lvswxl (a,p); }
2979+vus lsl12(long a, vus *p) { return __builtin_vec_lvswxl (a,p); }
2980+vus lsl13(long a, us *p) { return __builtin_vec_lvswxl (a,p); }
2981+vbc lsl14(long a, vbc *p) { return __builtin_vec_lvswxl (a,p); }
2982+vsc lsl15(long a, vsc *p) { return __builtin_vec_lvswxl (a,p); }
2983+vsc lsl16(long a, sc *p) { return __builtin_vec_lvswxl (a,p); }
2984+vuc lsl17(long a, vuc *p) { return __builtin_vec_lvswxl (a,p); }
2985+vuc lsl18(long a, uc *p) { return __builtin_vec_lvswxl (a,p); }
2986+vsf Dlsl01(long a, vsf *p) { return vec_lvswxl (a,p); }
2987+vsf Dlsl02(long a, sf *p) { return vec_lvswxl (a,p); }
2988+vbi Dlsl03(long a, vbi *p) { return vec_lvswxl (a,p); }
2989+vsi Dlsl04(long a, vsi *p) { return vec_lvswxl (a,p); }
2990+vsi Dlsl05(long a, si *p) { return vec_lvswxl (a,p); }
2991+vui Dlsl06(long a, vui *p) { return vec_lvswxl (a,p); }
2992+vui Dlsl07(long a, ui *p) { return vec_lvswxl (a,p); }
2993+vbs Dlsl08(long a, vbs *p) { return vec_lvswxl (a,p); }
2994+vp Dlsl09(long a, vp *p) { return vec_lvswxl (a,p); }
2995+vss Dlsl10(long a, vss *p) { return vec_lvswxl (a,p); }
2996+vss Dlsl11(long a, ss *p) { return vec_lvswxl (a,p); }
2997+vus Dlsl12(long a, vus *p) { return vec_lvswxl (a,p); }
2998+vus Dlsl13(long a, us *p) { return vec_lvswxl (a,p); }
2999+vbc Dlsl14(long a, vbc *p) { return vec_lvswxl (a,p); }
3000+vsc Dlsl15(long a, vsc *p) { return vec_lvswxl (a,p); }
3001+vsc Dlsl16(long a, sc *p) { return vec_lvswxl (a,p); }
3002+vuc Dlsl17(long a, vuc *p) { return vec_lvswxl (a,p); }
3003+vuc Dlsl18(long a, uc *p) { return vec_lvswxl (a,p); }
3004diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c
3005--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c 1969-12-31 18:00:00.000000000 -0600
3006+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-1.c 2012-03-06 12:31:05.156039000 -0600
3007@@ -0,0 +1,36 @@
3008+/* { dg-do compile { target { powerpc*-*-* } } } */
3009+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3010+/* { dg-require-effective-target powerpc_altivec_ok } */
3011+/* { dg-options "-O2 -maltivec -maltivec2" } */
3012+/* { dg-final { scan-assembler-times "vabsdub" 7 } } */
3013+
3014+#include <altivec.h>
3015+
3016+typedef __vector signed char vsc;
3017+typedef __vector signed short vss;
3018+typedef __vector signed int vsi;
3019+typedef __vector unsigned char vuc;
3020+typedef __vector unsigned short vus;
3021+typedef __vector unsigned int vui;
3022+typedef __vector bool char vbc;
3023+typedef __vector bool short vbs;
3024+typedef __vector bool int vbi;
3025+typedef __vector float vsf;
3026+typedef __vector pixel vp;
3027+typedef signed char sc;
3028+typedef signed short ss;
3029+typedef signed int si;
3030+typedef signed long sl;
3031+typedef unsigned char uc;
3032+typedef unsigned short us;
3033+typedef unsigned int ui;
3034+typedef unsigned long ul;
3035+typedef float sf;
3036+
3037+vuc fa1b(vuc a, vuc b) { return __builtin_altivec_vabsdub (a,b); }
3038+vuc ad1(vuc a, vuc b) { return __builtin_vec_absd (a,b); }
3039+vuc ad2(vbc a, vuc b) { return __builtin_vec_absd (a,b); }
3040+vuc ad3(vuc a, vbc b) { return __builtin_vec_absd (a,b); }
3041+vuc Dad1(vuc a, vuc b) { return vec_absd (a,b); }
3042+vuc Dad2(vbc a, vuc b) { return vec_absd (a,b); }
3043+vuc Dad3(vuc a, vbc b) { return vec_absd (a,b); }
3044diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c
3045--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c 1969-12-31 18:00:00.000000000 -0600
3046+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-20.c 2012-03-06 12:31:05.156039000 -0600
3047@@ -0,0 +1,66 @@
3048+/* { dg-do compile { target { powerpc*-*-* } } } */
3049+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3050+/* { dg-require-effective-target powerpc_altivec_ok } */
3051+/* { dg-options "-O2 -maltivec -maltivec2" } */
3052+/* { dg-final { scan-assembler-times "stvswx" 37 } } */
3053+
3054+#include <altivec.h>
3055+
3056+typedef __vector signed char vsc;
3057+typedef __vector signed short vss;
3058+typedef __vector signed int vsi;
3059+typedef __vector unsigned char vuc;
3060+typedef __vector unsigned short vus;
3061+typedef __vector unsigned int vui;
3062+typedef __vector bool char vbc;
3063+typedef __vector bool short vbs;
3064+typedef __vector bool int vbi;
3065+typedef __vector float vsf;
3066+typedef __vector pixel vp;
3067+typedef signed char sc;
3068+typedef signed short ss;
3069+typedef signed int si;
3070+typedef signed long sl;
3071+typedef unsigned char uc;
3072+typedef unsigned short us;
3073+typedef unsigned int ui;
3074+typedef unsigned long ul;
3075+typedef float sf;
3076+
3077+void ss1(vsc v, long a, vsc *p) { __builtin_altivec_stvswx (v,a,p); }
3078+void ssx01(vsf v, long a, vsf *p) { __builtin_vec_stvswx (v,a,p); }
3079+void ssx02(vsf v, long a, sf *p) { __builtin_vec_stvswx (v,a,p); }
3080+void ssx03(vbi v, long a, vbi *p) { __builtin_vec_stvswx (v,a,p); }
3081+void ssx04(vsi v, long a, vsi *p) { __builtin_vec_stvswx (v,a,p); }
3082+void ssx05(vsi v, long a, si *p) { __builtin_vec_stvswx (v,a,p); }
3083+void ssx06(vui v, long a, vui *p) { __builtin_vec_stvswx (v,a,p); }
3084+void ssx07(vui v, long a, ui *p) { __builtin_vec_stvswx (v,a,p); }
3085+void ssx08(vbs v, long a, vbs *p) { __builtin_vec_stvswx (v,a,p); }
3086+void ssx09(vp v, long a, vp *p) { __builtin_vec_stvswx (v,a,p); }
3087+void ssx10(vss v, long a, vss *p) { __builtin_vec_stvswx (v,a,p); }
3088+void ssx11(vss v, long a, ss *p) { __builtin_vec_stvswx (v,a,p); }
3089+void ssx12(vus v, long a, vus *p) { __builtin_vec_stvswx (v,a,p); }
3090+void ssx13(vus v, long a, us *p) { __builtin_vec_stvswx (v,a,p); }
3091+void ssx14(vbc v, long a, vbc *p) { __builtin_vec_stvswx (v,a,p); }
3092+void ssx15(vsc v, long a, vsc *p) { __builtin_vec_stvswx (v,a,p); }
3093+void ssx16(vsc v, long a, sc *p) { __builtin_vec_stvswx (v,a,p); }
3094+void ssx17(vuc v, long a, vuc *p) { __builtin_vec_stvswx (v,a,p); }
3095+void ssx18(vuc v, long a, uc *p) { __builtin_vec_stvswx (v,a,p); }
3096+void Dssx01(vsf v, long a, vsf *p) { vec_stvswx (v,a,p); }
3097+void Dssx02(vsf v, long a, sf *p) { vec_stvswx (v,a,p); }
3098+void Dssx03(vbi v, long a, vbi *p) { vec_stvswx (v,a,p); }
3099+void Dssx04(vsi v, long a, vsi *p) { vec_stvswx (v,a,p); }
3100+void Dssx05(vsi v, long a, si *p) { vec_stvswx (v,a,p); }
3101+void Dssx06(vui v, long a, vui *p) { vec_stvswx (v,a,p); }
3102+void Dssx07(vui v, long a, ui *p) { vec_stvswx (v,a,p); }
3103+void Dssx08(vbs v, long a, vbs *p) { vec_stvswx (v,a,p); }
3104+void Dssx09(vp v, long a, vp *p) { vec_stvswx (v,a,p); }
3105+void Dssx10(vss v, long a, vss *p) { vec_stvswx (v,a,p); }
3106+void Dssx11(vss v, long a, ss *p) { vec_stvswx (v,a,p); }
3107+void Dssx12(vus v, long a, vus *p) { vec_stvswx (v,a,p); }
3108+void Dssx13(vus v, long a, us *p) { vec_stvswx (v,a,p); }
3109+void Dssx14(vbc v, long a, vbc *p) { vec_stvswx (v,a,p); }
3110+void Dssx15(vsc v, long a, vsc *p) { vec_stvswx (v,a,p); }
3111+void Dssx16(vsc v, long a, sc *p) { vec_stvswx (v,a,p); }
3112+void Dssx17(vuc v, long a, vuc *p) { vec_stvswx (v,a,p); }
3113+void Dssx18(vuc v, long a, uc *p) { vec_stvswx (v,a,p); }
3114diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c
3115--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c 1969-12-31 18:00:00.000000000 -0600
3116+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-21.c 2012-03-06 12:31:05.156039000 -0600
3117@@ -0,0 +1,66 @@
3118+/* { dg-do compile { target { powerpc*-*-* } } } */
3119+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3120+/* { dg-require-effective-target powerpc_altivec_ok } */
3121+/* { dg-options "-O2 -maltivec -maltivec2" } */
3122+/* { dg-final { scan-assembler-times "stvswxl" 37 } } */
3123+
3124+#include <altivec.h>
3125+
3126+typedef __vector signed char vsc;
3127+typedef __vector signed short vss;
3128+typedef __vector signed int vsi;
3129+typedef __vector unsigned char vuc;
3130+typedef __vector unsigned short vus;
3131+typedef __vector unsigned int vui;
3132+typedef __vector bool char vbc;
3133+typedef __vector bool short vbs;
3134+typedef __vector bool int vbi;
3135+typedef __vector float vsf;
3136+typedef __vector pixel vp;
3137+typedef signed char sc;
3138+typedef signed short ss;
3139+typedef signed int si;
3140+typedef signed long sl;
3141+typedef unsigned char uc;
3142+typedef unsigned short us;
3143+typedef unsigned int ui;
3144+typedef unsigned long ul;
3145+typedef float sf;
3146+
3147+void ss2l(vsc v, long a, vsc *p) { __builtin_altivec_stvswxl (v,a,p); }
3148+void ssxl01(vsf v, long a, vsf *p) { __builtin_vec_stvswxl (v,a,p); }
3149+void ssxl02(vsf v, long a, sf *p) { __builtin_vec_stvswxl (v,a,p); }
3150+void ssxl03(vbi v, long a, vbi *p) { __builtin_vec_stvswxl (v,a,p); }
3151+void ssxl04(vsi v, long a, vsi *p) { __builtin_vec_stvswxl (v,a,p); }
3152+void ssxl05(vsi v, long a, si *p) { __builtin_vec_stvswxl (v,a,p); }
3153+void ssxl06(vui v, long a, vui *p) { __builtin_vec_stvswxl (v,a,p); }
3154+void ssxl07(vui v, long a, ui *p) { __builtin_vec_stvswxl (v,a,p); }
3155+void ssxl08(vbs v, long a, vbs *p) { __builtin_vec_stvswxl (v,a,p); }
3156+void ssxl09(vp v, long a, vp *p) { __builtin_vec_stvswxl (v,a,p); }
3157+void ssxl10(vss v, long a, vss *p) { __builtin_vec_stvswxl (v,a,p); }
3158+void ssxl11(vss v, long a, ss *p) { __builtin_vec_stvswxl (v,a,p); }
3159+void ssxl12(vus v, long a, vus *p) { __builtin_vec_stvswxl (v,a,p); }
3160+void ssxl13(vus v, long a, us *p) { __builtin_vec_stvswxl (v,a,p); }
3161+void ssxl14(vbc v, long a, vbc *p) { __builtin_vec_stvswxl (v,a,p); }
3162+void ssxl15(vsc v, long a, vsc *p) { __builtin_vec_stvswxl (v,a,p); }
3163+void ssxl16(vsc v, long a, sc *p) { __builtin_vec_stvswxl (v,a,p); }
3164+void ssxl17(vuc v, long a, vuc *p) { __builtin_vec_stvswxl (v,a,p); }
3165+void ssxl18(vuc v, long a, uc *p) { __builtin_vec_stvswxl (v,a,p); }
3166+void Dssxl01(vsf v, long a, vsf *p) { vec_stvswxl (v,a,p); }
3167+void Dssxl02(vsf v, long a, sf *p) { vec_stvswxl (v,a,p); }
3168+void Dssxl03(vbi v, long a, vbi *p) { vec_stvswxl (v,a,p); }
3169+void Dssxl04(vsi v, long a, vsi *p) { vec_stvswxl (v,a,p); }
3170+void Dssxl05(vsi v, long a, si *p) { vec_stvswxl (v,a,p); }
3171+void Dssxl06(vui v, long a, vui *p) { vec_stvswxl (v,a,p); }
3172+void Dssxl07(vui v, long a, ui *p) { vec_stvswxl (v,a,p); }
3173+void Dssxl08(vbs v, long a, vbs *p) { vec_stvswxl (v,a,p); }
3174+void Dssxl09(vp v, long a, vp *p) { vec_stvswxl (v,a,p); }
3175+void Dssxl10(vss v, long a, vss *p) { vec_stvswxl (v,a,p); }
3176+void Dssxl11(vss v, long a, ss *p) { vec_stvswxl (v,a,p); }
3177+void Dssxl12(vus v, long a, vus *p) { vec_stvswxl (v,a,p); }
3178+void Dssxl13(vus v, long a, us *p) { vec_stvswxl (v,a,p); }
3179+void Dssxl14(vbc v, long a, vbc *p) { vec_stvswxl (v,a,p); }
3180+void Dssxl15(vsc v, long a, vsc *p) { vec_stvswxl (v,a,p); }
3181+void Dssxl16(vsc v, long a, sc *p) { vec_stvswxl (v,a,p); }
3182+void Dssxl17(vuc v, long a, vuc *p) { vec_stvswxl (v,a,p); }
3183+void Dssxl18(vuc v, long a, uc *p) { vec_stvswxl (v,a,p); }
3184diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c
3185--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c 1969-12-31 18:00:00.000000000 -0600
3186+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-22.c 2012-03-06 12:31:05.157039001 -0600
3187@@ -0,0 +1,66 @@
3188+/* { dg-do compile { target { powerpc*-*-* } } } */
3189+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3190+/* { dg-require-effective-target powerpc_altivec_ok } */
3191+/* { dg-options "-O2 -maltivec -maltivec2" } */
3192+/* { dg-final { scan-assembler-times "lvsm" 37 } } */
3193+
3194+#include <altivec.h>
3195+
3196+typedef __vector signed char vsc;
3197+typedef __vector signed short vss;
3198+typedef __vector signed int vsi;
3199+typedef __vector unsigned char vuc;
3200+typedef __vector unsigned short vus;
3201+typedef __vector unsigned int vui;
3202+typedef __vector bool char vbc;
3203+typedef __vector bool short vbs;
3204+typedef __vector bool int vbi;
3205+typedef __vector float vsf;
3206+typedef __vector pixel vp;
3207+typedef signed char sc;
3208+typedef signed short ss;
3209+typedef signed int si;
3210+typedef signed long sl;
3211+typedef unsigned char uc;
3212+typedef unsigned short us;
3213+typedef unsigned int ui;
3214+typedef unsigned long ul;
3215+typedef float sf;
3216+
3217+vsc lsm(long a, void *p) { return __builtin_altivec_lvsm (a,p); }
3218+vsf lm01(long a, vsf *p) { return __builtin_vec_lvsm (a,p); }
3219+vsf lm02(long a, sf *p) { return __builtin_vec_lvsm (a,p); }
3220+vbi lm03(long a, vbi *p) { return __builtin_vec_lvsm (a,p); }
3221+vsi lm04(long a, vsi *p) { return __builtin_vec_lvsm (a,p); }
3222+vsi lm05(long a, si *p) { return __builtin_vec_lvsm (a,p); }
3223+vui lm06(long a, vui *p) { return __builtin_vec_lvsm (a,p); }
3224+vui lm07(long a, ui *p) { return __builtin_vec_lvsm (a,p); }
3225+vbs lm08(long a, vbs *p) { return __builtin_vec_lvsm (a,p); }
3226+vp lm09(long a, vp *p) { return __builtin_vec_lvsm (a,p); }
3227+vss lm10(long a, vss *p) { return __builtin_vec_lvsm (a,p); }
3228+vss lm11(long a, ss *p) { return __builtin_vec_lvsm (a,p); }
3229+vus lm12(long a, vus *p) { return __builtin_vec_lvsm (a,p); }
3230+vus lm13(long a, us *p) { return __builtin_vec_lvsm (a,p); }
3231+vbc lm14(long a, vbc *p) { return __builtin_vec_lvsm (a,p); }
3232+vsc lm15(long a, vsc *p) { return __builtin_vec_lvsm (a,p); }
3233+vsc lm16(long a, sc *p) { return __builtin_vec_lvsm (a,p); }
3234+vuc lm17(long a, vuc *p) { return __builtin_vec_lvsm (a,p); }
3235+vuc lm18(long a, uc *p) { return __builtin_vec_lvsm (a,p); }
3236+vsf Dlm01(long a, vsf *p) { return vec_lvsm (a,p); }
3237+vsf Dlm02(long a, sf *p) { return vec_lvsm (a,p); }
3238+vbi Dlm03(long a, vbi *p) { return vec_lvsm (a,p); }
3239+vsi Dlm04(long a, vsi *p) { return vec_lvsm (a,p); }
3240+vsi Dlm05(long a, si *p) { return vec_lvsm (a,p); }
3241+vui Dlm06(long a, vui *p) { return vec_lvsm (a,p); }
3242+vui Dlm07(long a, ui *p) { return vec_lvsm (a,p); }
3243+vbs Dlm08(long a, vbs *p) { return vec_lvsm (a,p); }
3244+vp Dlm09(long a, vp *p) { return vec_lvsm (a,p); }
3245+vss Dlm10(long a, vss *p) { return vec_lvsm (a,p); }
3246+vss Dlm11(long a, ss *p) { return vec_lvsm (a,p); }
3247+vus Dlm12(long a, vus *p) { return vec_lvsm (a,p); }
3248+vus Dlm13(long a, us *p) { return vec_lvsm (a,p); }
3249+vbc Dlm14(long a, vbc *p) { return vec_lvsm (a,p); }
3250+vsc Dlm15(long a, vsc *p) { return vec_lvsm (a,p); }
3251+vsc Dlm16(long a, sc *p) { return vec_lvsm (a,p); }
3252+vuc Dlm17(long a, vuc *p) { return vec_lvsm (a,p); }
3253+vuc Dlm18(long a, uc *p) { return vec_lvsm (a,p); }
3254diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c
3255--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c 1969-12-31 18:00:00.000000000 -0600
3256+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-2.c 2012-03-06 12:31:05.157039001 -0600
3257@@ -0,0 +1,36 @@
3258+/* { dg-do compile { target { powerpc*-*-* } } } */
3259+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3260+/* { dg-require-effective-target powerpc_altivec_ok } */
3261+/* { dg-options "-O2 -maltivec -maltivec2" } */
3262+/* { dg-final { scan-assembler-times "vabsduh" 7 } } */
3263+
3264+#include <altivec.h>
3265+
3266+typedef __vector signed char vsc;
3267+typedef __vector signed short vss;
3268+typedef __vector signed int vsi;
3269+typedef __vector unsigned char vuc;
3270+typedef __vector unsigned short vus;
3271+typedef __vector unsigned int vui;
3272+typedef __vector bool char vbc;
3273+typedef __vector bool short vbs;
3274+typedef __vector bool int vbi;
3275+typedef __vector float vsf;
3276+typedef __vector pixel vp;
3277+typedef signed char sc;
3278+typedef signed short ss;
3279+typedef signed int si;
3280+typedef signed long sl;
3281+typedef unsigned char uc;
3282+typedef unsigned short us;
3283+typedef unsigned int ui;
3284+typedef unsigned long ul;
3285+typedef float sf;
3286+
3287+vus fa2h(vus a, vus b) { return __builtin_altivec_vabsduh (a,b); }
3288+vus ad4(vus a, vus b) { return __builtin_vec_absd (a,b); }
3289+vus ad5(vbs a, vus b) { return __builtin_vec_absd (a,b); }
3290+vus ad6(vus a, vbs b) { return __builtin_vec_absd (a,b); }
3291+vus Dad4(vus a, vus b) { return vec_absd (a,b); }
3292+vus Dad5(vbs a, vus b) { return vec_absd (a,b); }
3293+vus Dad6(vus a, vbs b) { return vec_absd (a,b); }
3294diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c
3295--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c 1969-12-31 18:00:00.000000000 -0600
3296+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-3.c 2012-03-06 12:31:05.157039001 -0600
3297@@ -0,0 +1,36 @@
3298+/* { dg-do compile { target { powerpc*-*-* } } } */
3299+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3300+/* { dg-require-effective-target powerpc_altivec_ok } */
3301+/* { dg-options "-O2 -maltivec -maltivec2" } */
3302+/* { dg-final { scan-assembler-times "vabsduw" 7 } } */
3303+
3304+#include <altivec.h>
3305+
3306+typedef __vector signed char vsc;
3307+typedef __vector signed short vss;
3308+typedef __vector signed int vsi;
3309+typedef __vector unsigned char vuc;
3310+typedef __vector unsigned short vus;
3311+typedef __vector unsigned int vui;
3312+typedef __vector bool char vbc;
3313+typedef __vector bool short vbs;
3314+typedef __vector bool int vbi;
3315+typedef __vector float vsf;
3316+typedef __vector pixel vp;
3317+typedef signed char sc;
3318+typedef signed short ss;
3319+typedef signed int si;
3320+typedef signed long sl;
3321+typedef unsigned char uc;
3322+typedef unsigned short us;
3323+typedef unsigned int ui;
3324+typedef unsigned long ul;
3325+typedef float sf;
3326+
3327+vui fa3w(vui a, vui b) { return __builtin_altivec_vabsduw (a,b); }
3328+vui ad7(vui a, vui b) { return __builtin_vec_absd (a,b); }
3329+vui ad8(vbi a, vui b) { return __builtin_vec_absd (a,b); }
3330+vui ad9(vui a, vbi b) { return __builtin_vec_absd (a,b); }
3331+vui Dad7(vui a, vui b) { return vec_absd (a,b); }
3332+vui Dad8(vbi a, vui b) { return vec_absd (a,b); }
3333+vui Dad9(vui a, vbi b) { return vec_absd (a,b); }
3334diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c
3335--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c 1969-12-31 18:00:00.000000000 -0600
3336+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-4.c 2012-03-06 12:31:05.158039002 -0600
3337@@ -0,0 +1,34 @@
3338+/* { dg-do compile { target { powerpc*-*-* } } } */
3339+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3340+/* { dg-require-effective-target powerpc_altivec_ok } */
3341+/* { dg-options "-O2 -maltivec -maltivec2" } */
3342+/* { dg-final { scan-assembler-times "lvexbx" 5 } } */
3343+
3344+#include <altivec.h>
3345+
3346+typedef __vector signed char vsc;
3347+typedef __vector signed short vss;
3348+typedef __vector signed int vsi;
3349+typedef __vector unsigned char vuc;
3350+typedef __vector unsigned short vus;
3351+typedef __vector unsigned int vui;
3352+typedef __vector bool char vbc;
3353+typedef __vector bool short vbs;
3354+typedef __vector bool int vbi;
3355+typedef __vector float vsf;
3356+typedef __vector pixel vp;
3357+typedef signed char sc;
3358+typedef signed short ss;
3359+typedef signed int si;
3360+typedef signed long sl;
3361+typedef unsigned char uc;
3362+typedef unsigned short us;
3363+typedef unsigned int ui;
3364+typedef unsigned long ul;
3365+typedef float sf;
3366+
3367+vsc le1b(long a, void *p) { return __builtin_altivec_lvexbx (a,p); }
3368+vsc leb1(long a, sc *p) { return __builtin_vec_lvexbx (a,p); }
3369+vuc leb2(long a, uc *p) { return __builtin_vec_lvexbx (a,p); }
3370+vsc Dleb1(long a, sc *p) { return vec_lvexbx (a,p); }
3371+vuc Dleb2(long a, uc *p) { return vec_lvexbx (a,p); }
3372diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c
3373--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c 1969-12-31 18:00:00.000000000 -0600
3374+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-5.c 2012-03-06 12:31:05.158039002 -0600
3375@@ -0,0 +1,34 @@
3376+/* { dg-do compile { target { powerpc*-*-* } } } */
3377+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3378+/* { dg-require-effective-target powerpc_altivec_ok } */
3379+/* { dg-options "-O2 -maltivec -maltivec2" } */
3380+/* { dg-final { scan-assembler-times "lvexhx" 5 } } */
3381+
3382+#include <altivec.h>
3383+
3384+typedef __vector signed char vsc;
3385+typedef __vector signed short vss;
3386+typedef __vector signed int vsi;
3387+typedef __vector unsigned char vuc;
3388+typedef __vector unsigned short vus;
3389+typedef __vector unsigned int vui;
3390+typedef __vector bool char vbc;
3391+typedef __vector bool short vbs;
3392+typedef __vector bool int vbi;
3393+typedef __vector float vsf;
3394+typedef __vector pixel vp;
3395+typedef signed char sc;
3396+typedef signed short ss;
3397+typedef signed int si;
3398+typedef signed long sl;
3399+typedef unsigned char uc;
3400+typedef unsigned short us;
3401+typedef unsigned int ui;
3402+typedef unsigned long ul;
3403+typedef float sf;
3404+
3405+vss le2h(long a, void *p) { return __builtin_altivec_lvexhx (a,p); }
3406+vss leh1(long a, ss *p) { return __builtin_vec_lvexhx (a,p); }
3407+vus leh2(long a, us *p) { return __builtin_vec_lvexhx (a,p); }
3408+vss Dleh1(long a, ss *p) { return vec_lvexhx (a,p); }
3409+vus Dleh2(long a, us *p) { return vec_lvexhx (a,p); }
3410diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c
3411--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c 1969-12-31 18:00:00.000000000 -0600
3412+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-6.c 2012-03-06 12:31:05.158039002 -0600
3413@@ -0,0 +1,40 @@
3414+/* { dg-do compile { target { powerpc*-*-* } } } */
3415+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3416+/* { dg-require-effective-target powerpc_altivec_ok } */
3417+/* { dg-options "-O2 -maltivec -maltivec2" } */
3418+/* { dg-final { scan-assembler-times "lvexwx" 11 } } */
3419+
3420+#include <altivec.h>
3421+
3422+typedef __vector signed char vsc;
3423+typedef __vector signed short vss;
3424+typedef __vector signed int vsi;
3425+typedef __vector unsigned char vuc;
3426+typedef __vector unsigned short vus;
3427+typedef __vector unsigned int vui;
3428+typedef __vector bool char vbc;
3429+typedef __vector bool short vbs;
3430+typedef __vector bool int vbi;
3431+typedef __vector float vsf;
3432+typedef __vector pixel vp;
3433+typedef signed char sc;
3434+typedef signed short ss;
3435+typedef signed int si;
3436+typedef signed long sl;
3437+typedef unsigned char uc;
3438+typedef unsigned short us;
3439+typedef unsigned int ui;
3440+typedef unsigned long ul;
3441+typedef float sf;
3442+
3443+vsi le3w(long a, void *p) { return __builtin_altivec_lvexwx (a,p); }
3444+vsf lew1(long a, sf *p) { return __builtin_vec_lvexwx (a,p); }
3445+vsi lew2(long a, si *p) { return __builtin_vec_lvexwx (a,p); }
3446+vui lew3(long a, ui *p) { return __builtin_vec_lvexwx (a,p); }
3447+vsi lew4(long a, sl *p) { return __builtin_vec_lvexwx (a,p); }
3448+vui lew5(long a, ul *p) { return __builtin_vec_lvexwx (a,p); }
3449+vsf Dlew1(long a, sf *p) { return vec_lvexwx (a,p); }
3450+vsi Dlew2(long a, si *p) { return vec_lvexwx (a,p); }
3451+vui Dlew3(long a, ui *p) { return vec_lvexwx (a,p); }
3452+vsi Dlew4(long a, sl *p) { return vec_lvexwx (a,p); }
3453+vui Dlew5(long a, ul *p) { return vec_lvexwx (a,p); }
3454diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c
3455--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c 1969-12-31 18:00:00.000000000 -0600
3456+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-7.c 2012-03-06 12:31:05.159039002 -0600
3457@@ -0,0 +1,42 @@
3458+/* { dg-do compile { target { powerpc*-*-* } } } */
3459+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3460+/* { dg-require-effective-target powerpc_altivec_ok } */
3461+/* { dg-options "-O2 -maltivec -maltivec2" } */
3462+/* { dg-final { scan-assembler-times "stvexbx" 13 } } */
3463+
3464+#include <altivec.h>
3465+
3466+typedef __vector signed char vsc;
3467+typedef __vector signed short vss;
3468+typedef __vector signed int vsi;
3469+typedef __vector unsigned char vuc;
3470+typedef __vector unsigned short vus;
3471+typedef __vector unsigned int vui;
3472+typedef __vector bool char vbc;
3473+typedef __vector bool short vbs;
3474+typedef __vector bool int vbi;
3475+typedef __vector float vsf;
3476+typedef __vector pixel vp;
3477+typedef signed char sc;
3478+typedef signed short ss;
3479+typedef signed int si;
3480+typedef signed long sl;
3481+typedef unsigned char uc;
3482+typedef unsigned short us;
3483+typedef unsigned int ui;
3484+typedef unsigned long ul;
3485+typedef float sf;
3486+
3487+void se1b(vsc v, long a, vsc *p) { __builtin_altivec_stvexbx (v,a,p); }
3488+void seb1(vsc v, long a, sc *p) { __builtin_vec_stvexbx (v,a,p); }
3489+void seb2(vuc v, long a, uc *p) { __builtin_vec_stvexbx (v,a,p); }
3490+void seb3(vbc v, long a, sc *p) { __builtin_vec_stvexbx (v,a,p); }
3491+void seb4(vbc v, long a, uc *p) { __builtin_vec_stvexbx (v,a,p); }
3492+void seb5(vsc v, long a, void *p) { __builtin_vec_stvexbx (v,a,p); }
3493+void seb6(vuc v, long a, void *p) { __builtin_vec_stvexbx (v,a,p); }
3494+void Dseb1(vsc v, long a, sc *p) { vec_stvexbx (v,a,p); }
3495+void Dseb2(vuc v, long a, uc *p) { vec_stvexbx (v,a,p); }
3496+void Dseb3(vbc v, long a, sc *p) { vec_stvexbx (v,a,p); }
3497+void Dseb4(vbc v, long a, uc *p) { vec_stvexbx (v,a,p); }
3498+void Dseb5(vsc v, long a, void *p) { vec_stvexbx (v,a,p); }
3499+void Dseb6(vuc v, long a, void *p) { vec_stvexbx (v,a,p); }
3500diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c
3501--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c 1969-12-31 18:00:00.000000000 -0600
3502+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-8.c 2012-03-06 12:31:05.159039002 -0600
3503@@ -0,0 +1,42 @@
3504+/* { dg-do compile { target { powerpc*-*-* } } } */
3505+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3506+/* { dg-require-effective-target powerpc_altivec_ok } */
3507+/* { dg-options "-O2 -maltivec -maltivec2" } */
3508+/* { dg-final { scan-assembler-times "stvexhx" 13 } } */
3509+
3510+#include <altivec.h>
3511+
3512+typedef __vector signed char vsc;
3513+typedef __vector signed short vss;
3514+typedef __vector signed int vsi;
3515+typedef __vector unsigned char vuc;
3516+typedef __vector unsigned short vus;
3517+typedef __vector unsigned int vui;
3518+typedef __vector bool char vbc;
3519+typedef __vector bool short vbs;
3520+typedef __vector bool int vbi;
3521+typedef __vector float vsf;
3522+typedef __vector pixel vp;
3523+typedef signed char sc;
3524+typedef signed short ss;
3525+typedef signed int si;
3526+typedef signed long sl;
3527+typedef unsigned char uc;
3528+typedef unsigned short us;
3529+typedef unsigned int ui;
3530+typedef unsigned long ul;
3531+typedef float sf;
3532+
3533+void se2h(vss v, long a, vss *p) { __builtin_altivec_stvexhx (v,a,p); }
3534+void seh1(vss v, long a, ss *p) { __builtin_vec_stvexhx (v,a,p); }
3535+void seh2(vus v, long a, us *p) { __builtin_vec_stvexhx (v,a,p); }
3536+void seh3(vbs v, long a, ss *p) { __builtin_vec_stvexhx (v,a,p); }
3537+void seh4(vbs v, long a, us *p) { __builtin_vec_stvexhx (v,a,p); }
3538+void seh5(vss v, long a, void *p) { __builtin_vec_stvexhx (v,a,p); }
3539+void seh6(vus v, long a, void *p) { __builtin_vec_stvexhx (v,a,p); }
3540+void Dseh1(vss v, long a, ss *p) { vec_stvexhx (v,a,p); }
3541+void Dseh2(vus v, long a, us *p) { vec_stvexhx (v,a,p); }
3542+void Dseh3(vbs v, long a, ss *p) { vec_stvexhx (v,a,p); }
3543+void Dseh4(vbs v, long a, us *p) { vec_stvexhx (v,a,p); }
3544+void Dseh5(vss v, long a, void *p) { vec_stvexhx (v,a,p); }
3545+void Dseh6(vus v, long a, void *p) { vec_stvexhx (v,a,p); }
3546diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c
3547--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c 1969-12-31 18:00:00.000000000 -0600
3548+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/altivec2_builtin-9.c 2012-03-06 12:31:05.159039002 -0600
3549@@ -0,0 +1,46 @@
3550+/* { dg-do compile { target { powerpc*-*-* } } } */
3551+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3552+/* { dg-require-effective-target powerpc_altivec_ok } */
3553+/* { dg-options "-O2 -maltivec -maltivec2" } */
3554+/* { dg-final { scan-assembler-times "stvexwx" 17 } } */
3555+
3556+#include <altivec.h>
3557+
3558+typedef __vector signed char vsc;
3559+typedef __vector signed short vss;
3560+typedef __vector signed int vsi;
3561+typedef __vector unsigned char vuc;
3562+typedef __vector unsigned short vus;
3563+typedef __vector unsigned int vui;
3564+typedef __vector bool char vbc;
3565+typedef __vector bool short vbs;
3566+typedef __vector bool int vbi;
3567+typedef __vector float vsf;
3568+typedef __vector pixel vp;
3569+typedef signed char sc;
3570+typedef signed short ss;
3571+typedef signed int si;
3572+typedef signed long sl;
3573+typedef unsigned char uc;
3574+typedef unsigned short us;
3575+typedef unsigned int ui;
3576+typedef unsigned long ul;
3577+typedef float sf;
3578+
3579+void se3w(vsi v, long a, vsi *p) { __builtin_altivec_stvexwx (v,a,p); }
3580+void sew1(vsf v, long a, sf *p) { __builtin_vec_stvexwx (v,a,p); }
3581+void sew2(vsi v, long a, si *p) { __builtin_vec_stvexwx (v,a,p); }
3582+void sew3(vui v, long a, ui *p) { __builtin_vec_stvexwx (v,a,p); }
3583+void sew4(vbi v, long a, si *p) { __builtin_vec_stvexwx (v,a,p); }
3584+void sew5(vbi v, long a, ui *p) { __builtin_vec_stvexwx (v,a,p); }
3585+void sew6(vsf v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); }
3586+void sew7(vsi v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); }
3587+void sew8(vui v, long a, void *p) { __builtin_vec_stvexwx (v,a,p); }
3588+void Dsew1(vsf v, long a, sf *p) { vec_stvexwx (v,a,p); }
3589+void Dsew2(vsi v, long a, si *p) { vec_stvexwx (v,a,p); }
3590+void Dsew3(vui v, long a, ui *p) { vec_stvexwx (v,a,p); }
3591+void Dsew4(vbi v, long a, si *p) { vec_stvexwx (v,a,p); }
3592+void Dsew5(vbi v, long a, ui *p) { vec_stvexwx (v,a,p); }
3593+void Dsew6(vsf v, long a, void *p) { vec_stvexwx (v,a,p); }
3594+void Dsew7(vsi v, long a, void *p) { vec_stvexwx (v,a,p); }
3595+void Dsew8(vui v, long a, void *p) { vec_stvexwx (v,a,p); }
3596diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c
3597--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 1969-12-31 18:00:00.000000000 -0600
3598+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c 2012-03-06 12:31:15.921038995 -0600
3599@@ -0,0 +1,48 @@
3600+/* { dg-do compile { target { powerpc*-*-* } } } */
3601+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3602+/* { dg-require-effective-target powerpc_altivec_ok } */
3603+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3604+/* { dg-final { scan-assembler-times "lvlx" 19 } } */
3605+
3606+#include <altivec.h>
3607+
3608+typedef __vector signed char vsc;
3609+typedef __vector signed short vss;
3610+typedef __vector signed int vsi;
3611+typedef __vector unsigned char vuc;
3612+typedef __vector unsigned short vus;
3613+typedef __vector unsigned int vui;
3614+typedef __vector bool char vbc;
3615+typedef __vector bool short vbs;
3616+typedef __vector bool int vbi;
3617+typedef __vector float vsf;
3618+typedef __vector pixel vp;
3619+typedef signed char sc;
3620+typedef signed short ss;
3621+typedef signed int si;
3622+typedef signed long sl;
3623+typedef unsigned char uc;
3624+typedef unsigned short us;
3625+typedef unsigned int ui;
3626+typedef unsigned long ul;
3627+typedef float sf;
3628+
3629+vsc lc1(long a, void *p) { return __builtin_altivec_lvlx (a,p); }
3630+vsf llx01(long a, vsf *p) { return __builtin_vec_lvlx (a,p); }
3631+vsf llx02(long a, sf *p) { return __builtin_vec_lvlx (a,p); }
3632+vbi llx03(long a, vbi *p) { return __builtin_vec_lvlx (a,p); }
3633+vsi llx04(long a, vsi *p) { return __builtin_vec_lvlx (a,p); }
3634+vsi llx05(long a, si *p) { return __builtin_vec_lvlx (a,p); }
3635+vui llx06(long a, vui *p) { return __builtin_vec_lvlx (a,p); }
3636+vui llx07(long a, ui *p) { return __builtin_vec_lvlx (a,p); }
3637+vbs llx08(long a, vbs *p) { return __builtin_vec_lvlx (a,p); }
3638+vp llx09(long a, vp *p) { return __builtin_vec_lvlx (a,p); }
3639+vss llx10(long a, vss *p) { return __builtin_vec_lvlx (a,p); }
3640+vss llx11(long a, ss *p) { return __builtin_vec_lvlx (a,p); }
3641+vus llx12(long a, vus *p) { return __builtin_vec_lvlx (a,p); }
3642+vus llx13(long a, us *p) { return __builtin_vec_lvlx (a,p); }
3643+vbc llx14(long a, vbc *p) { return __builtin_vec_lvlx (a,p); }
3644+vsc llx15(long a, vsc *p) { return __builtin_vec_lvlx (a,p); }
3645+vsc llx16(long a, sc *p) { return __builtin_vec_lvlx (a,p); }
3646+vuc llx17(long a, vuc *p) { return __builtin_vec_lvlx (a,p); }
3647+vuc llx18(long a, uc *p) { return __builtin_vec_lvlx (a,p); }
3648diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c
3649--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 1969-12-31 18:00:00.000000000 -0600
3650+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c 2012-03-06 12:31:15.921038995 -0600
3651@@ -0,0 +1,48 @@
3652+/* { dg-do compile { target { powerpc*-*-* } } } */
3653+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3654+/* { dg-require-effective-target powerpc_altivec_ok } */
3655+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3656+/* { dg-final { scan-assembler-times "lvlxl" 19 } } */
3657+
3658+#include <altivec.h>
3659+
3660+typedef __vector signed char vsc;
3661+typedef __vector signed short vss;
3662+typedef __vector signed int vsi;
3663+typedef __vector unsigned char vuc;
3664+typedef __vector unsigned short vus;
3665+typedef __vector unsigned int vui;
3666+typedef __vector bool char vbc;
3667+typedef __vector bool short vbs;
3668+typedef __vector bool int vbi;
3669+typedef __vector float vsf;
3670+typedef __vector pixel vp;
3671+typedef signed char sc;
3672+typedef signed short ss;
3673+typedef signed int si;
3674+typedef signed long sl;
3675+typedef unsigned char uc;
3676+typedef unsigned short us;
3677+typedef unsigned int ui;
3678+typedef unsigned long ul;
3679+typedef float sf;
3680+
3681+vsc lc2(long a, void *p) { return __builtin_altivec_lvlxl (a,p); }
3682+vsf llxl01(long a, vsf *p) { return __builtin_vec_lvlxl (a,p); }
3683+vsf llxl02(long a, sf *p) { return __builtin_vec_lvlxl (a,p); }
3684+vbi llxl03(long a, vbi *p) { return __builtin_vec_lvlxl (a,p); }
3685+vsi llxl04(long a, vsi *p) { return __builtin_vec_lvlxl (a,p); }
3686+vsi llxl05(long a, si *p) { return __builtin_vec_lvlxl (a,p); }
3687+vui llxl06(long a, vui *p) { return __builtin_vec_lvlxl (a,p); }
3688+vui llxl07(long a, ui *p) { return __builtin_vec_lvlxl (a,p); }
3689+vbs llxl08(long a, vbs *p) { return __builtin_vec_lvlxl (a,p); }
3690+vp llxl09(long a, vp *p) { return __builtin_vec_lvlxl (a,p); }
3691+vss llxl10(long a, vss *p) { return __builtin_vec_lvlxl (a,p); }
3692+vss llxl11(long a, ss *p) { return __builtin_vec_lvlxl (a,p); }
3693+vus llxl12(long a, vus *p) { return __builtin_vec_lvlxl (a,p); }
3694+vus llxl13(long a, us *p) { return __builtin_vec_lvlxl (a,p); }
3695+vbc llxl14(long a, vbc *p) { return __builtin_vec_lvlxl (a,p); }
3696+vsc llxl15(long a, vsc *p) { return __builtin_vec_lvlxl (a,p); }
3697+vsc llxl16(long a, sc *p) { return __builtin_vec_lvlxl (a,p); }
3698+vuc llxl17(long a, vuc *p) { return __builtin_vec_lvlxl (a,p); }
3699+vuc llxl18(long a, uc *p) { return __builtin_vec_lvlxl (a,p); }
3700diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c
3701--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 1969-12-31 18:00:00.000000000 -0600
3702+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c 2012-03-06 12:31:15.922038996 -0600
3703@@ -0,0 +1,48 @@
3704+/* { dg-do compile { target { powerpc*-*-* } } } */
3705+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3706+/* { dg-require-effective-target powerpc_altivec_ok } */
3707+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3708+/* { dg-final { scan-assembler-times "lvrx" 19 } } */
3709+
3710+#include <altivec.h>
3711+
3712+typedef __vector signed char vsc;
3713+typedef __vector signed short vss;
3714+typedef __vector signed int vsi;
3715+typedef __vector unsigned char vuc;
3716+typedef __vector unsigned short vus;
3717+typedef __vector unsigned int vui;
3718+typedef __vector bool char vbc;
3719+typedef __vector bool short vbs;
3720+typedef __vector bool int vbi;
3721+typedef __vector float vsf;
3722+typedef __vector pixel vp;
3723+typedef signed char sc;
3724+typedef signed short ss;
3725+typedef signed int si;
3726+typedef signed long sl;
3727+typedef unsigned char uc;
3728+typedef unsigned short us;
3729+typedef unsigned int ui;
3730+typedef unsigned long ul;
3731+typedef float sf;
3732+
3733+vsc lc3(long a, void *p) { return __builtin_altivec_lvrx (a,p); }
3734+vsf lrx01(long a, vsf *p) { return __builtin_vec_lvrx (a,p); }
3735+vsf lrx02(long a, sf *p) { return __builtin_vec_lvrx (a,p); }
3736+vbi lrx03(long a, vbi *p) { return __builtin_vec_lvrx (a,p); }
3737+vsi lrx04(long a, vsi *p) { return __builtin_vec_lvrx (a,p); }
3738+vsi lrx05(long a, si *p) { return __builtin_vec_lvrx (a,p); }
3739+vui lrx06(long a, vui *p) { return __builtin_vec_lvrx (a,p); }
3740+vui lrx07(long a, ui *p) { return __builtin_vec_lvrx (a,p); }
3741+vbs lrx08(long a, vbs *p) { return __builtin_vec_lvrx (a,p); }
3742+vp lrx09(long a, vp *p) { return __builtin_vec_lvrx (a,p); }
3743+vss lrx10(long a, vss *p) { return __builtin_vec_lvrx (a,p); }
3744+vss lrx11(long a, ss *p) { return __builtin_vec_lvrx (a,p); }
3745+vus lrx12(long a, vus *p) { return __builtin_vec_lvrx (a,p); }
3746+vus lrx13(long a, us *p) { return __builtin_vec_lvrx (a,p); }
3747+vbc lrx14(long a, vbc *p) { return __builtin_vec_lvrx (a,p); }
3748+vsc lrx15(long a, vsc *p) { return __builtin_vec_lvrx (a,p); }
3749+vsc lrx16(long a, sc *p) { return __builtin_vec_lvrx (a,p); }
3750+vuc lrx17(long a, vuc *p) { return __builtin_vec_lvrx (a,p); }
3751+vuc lrx18(long a, uc *p) { return __builtin_vec_lvrx (a,p); }
3752diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c
3753--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 1969-12-31 18:00:00.000000000 -0600
3754+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c 2012-03-06 12:31:15.922038996 -0600
3755@@ -0,0 +1,48 @@
3756+/* { dg-do compile { target { powerpc*-*-* } } } */
3757+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3758+/* { dg-require-effective-target powerpc_altivec_ok } */
3759+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3760+/* { dg-final { scan-assembler-times "lvrxl" 19 } } */
3761+
3762+#include <altivec.h>
3763+
3764+typedef __vector signed char vsc;
3765+typedef __vector signed short vss;
3766+typedef __vector signed int vsi;
3767+typedef __vector unsigned char vuc;
3768+typedef __vector unsigned short vus;
3769+typedef __vector unsigned int vui;
3770+typedef __vector bool char vbc;
3771+typedef __vector bool short vbs;
3772+typedef __vector bool int vbi;
3773+typedef __vector float vsf;
3774+typedef __vector pixel vp;
3775+typedef signed char sc;
3776+typedef signed short ss;
3777+typedef signed int si;
3778+typedef signed long sl;
3779+typedef unsigned char uc;
3780+typedef unsigned short us;
3781+typedef unsigned int ui;
3782+typedef unsigned long ul;
3783+typedef float sf;
3784+
3785+vsc lc4(long a, void *p) { return __builtin_altivec_lvrxl (a,p); }
3786+vsf lrxl01(long a, vsf *p) { return __builtin_vec_lvrxl (a,p); }
3787+vsf lrxl02(long a, sf *p) { return __builtin_vec_lvrxl (a,p); }
3788+vbi lrxl03(long a, vbi *p) { return __builtin_vec_lvrxl (a,p); }
3789+vsi lrxl04(long a, vsi *p) { return __builtin_vec_lvrxl (a,p); }
3790+vsi lrxl05(long a, si *p) { return __builtin_vec_lvrxl (a,p); }
3791+vui lrxl06(long a, vui *p) { return __builtin_vec_lvrxl (a,p); }
3792+vui lrxl07(long a, ui *p) { return __builtin_vec_lvrxl (a,p); }
3793+vbs lrxl08(long a, vbs *p) { return __builtin_vec_lvrxl (a,p); }
3794+vp lrxl09(long a, vp *p) { return __builtin_vec_lvrxl (a,p); }
3795+vss lrxl10(long a, vss *p) { return __builtin_vec_lvrxl (a,p); }
3796+vss lrxl11(long a, ss *p) { return __builtin_vec_lvrxl (a,p); }
3797+vus lrxl12(long a, vus *p) { return __builtin_vec_lvrxl (a,p); }
3798+vus lrxl13(long a, us *p) { return __builtin_vec_lvrxl (a,p); }
3799+vbc lrxl14(long a, vbc *p) { return __builtin_vec_lvrxl (a,p); }
3800+vsc lrxl15(long a, vsc *p) { return __builtin_vec_lvrxl (a,p); }
3801+vsc lrxl16(long a, sc *p) { return __builtin_vec_lvrxl (a,p); }
3802+vuc lrxl17(long a, vuc *p) { return __builtin_vec_lvrxl (a,p); }
3803+vuc lrxl18(long a, uc *p) { return __builtin_vec_lvrxl (a,p); }
3804diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c
3805--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 1969-12-31 18:00:00.000000000 -0600
3806+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c 2012-03-06 12:31:15.922038996 -0600
3807@@ -0,0 +1,48 @@
3808+/* { dg-do compile { target { powerpc*-*-* } } } */
3809+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3810+/* { dg-require-effective-target powerpc_altivec_ok } */
3811+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3812+/* { dg-final { scan-assembler-times "stvlx" 19 } } */
3813+
3814+#include <altivec.h>
3815+
3816+typedef __vector signed char vsc;
3817+typedef __vector signed short vss;
3818+typedef __vector signed int vsi;
3819+typedef __vector unsigned char vuc;
3820+typedef __vector unsigned short vus;
3821+typedef __vector unsigned int vui;
3822+typedef __vector bool char vbc;
3823+typedef __vector bool short vbs;
3824+typedef __vector bool int vbi;
3825+typedef __vector float vsf;
3826+typedef __vector pixel vp;
3827+typedef signed char sc;
3828+typedef signed short ss;
3829+typedef signed int si;
3830+typedef signed long sl;
3831+typedef unsigned char uc;
3832+typedef unsigned short us;
3833+typedef unsigned int ui;
3834+typedef unsigned long ul;
3835+typedef float sf;
3836+
3837+void sc1(vsc v, long a, void *p) { __builtin_altivec_stvlx (v,a,p); }
3838+void slx01(vsf v, long a, vsf *p) { __builtin_vec_stvlx (v,a,p); }
3839+void slx02(vsf v, long a, sf *p) { __builtin_vec_stvlx (v,a,p); }
3840+void slx03(vbi v, long a, vbi *p) { __builtin_vec_stvlx (v,a,p); }
3841+void slx04(vsi v, long a, vsi *p) { __builtin_vec_stvlx (v,a,p); }
3842+void slx05(vsi v, long a, si *p) { __builtin_vec_stvlx (v,a,p); }
3843+void slx06(vui v, long a, vui *p) { __builtin_vec_stvlx (v,a,p); }
3844+void slx07(vui v, long a, ui *p) { __builtin_vec_stvlx (v,a,p); }
3845+void slx08(vbs v, long a, vbs *p) { __builtin_vec_stvlx (v,a,p); }
3846+void slx09(vp v, long a, vp *p) { __builtin_vec_stvlx (v,a,p); }
3847+void slx10(vss v, long a, vss *p) { __builtin_vec_stvlx (v,a,p); }
3848+void slx11(vss v, long a, ss *p) { __builtin_vec_stvlx (v,a,p); }
3849+void slx12(vus v, long a, vus *p) { __builtin_vec_stvlx (v,a,p); }
3850+void slx13(vus v, long a, us *p) { __builtin_vec_stvlx (v,a,p); }
3851+void slx14(vbc v, long a, vbc *p) { __builtin_vec_stvlx (v,a,p); }
3852+void slx15(vsc v, long a, vsc *p) { __builtin_vec_stvlx (v,a,p); }
3853+void slx16(vsc v, long a, sc *p) { __builtin_vec_stvlx (v,a,p); }
3854+void slx17(vuc v, long a, vuc *p) { __builtin_vec_stvlx (v,a,p); }
3855+void slx18(vuc v, long a, uc *p) { __builtin_vec_stvlx (v,a,p); }
3856diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c
3857--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 1969-12-31 18:00:00.000000000 -0600
3858+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c 2012-03-06 12:31:15.923039000 -0600
3859@@ -0,0 +1,48 @@
3860+/* { dg-do compile { target { powerpc*-*-* } } } */
3861+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3862+/* { dg-require-effective-target powerpc_altivec_ok } */
3863+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3864+/* { dg-final { scan-assembler-times "stvlxl" 19 } } */
3865+
3866+#include <altivec.h>
3867+
3868+typedef __vector signed char vsc;
3869+typedef __vector signed short vss;
3870+typedef __vector signed int vsi;
3871+typedef __vector unsigned char vuc;
3872+typedef __vector unsigned short vus;
3873+typedef __vector unsigned int vui;
3874+typedef __vector bool char vbc;
3875+typedef __vector bool short vbs;
3876+typedef __vector bool int vbi;
3877+typedef __vector float vsf;
3878+typedef __vector pixel vp;
3879+typedef signed char sc;
3880+typedef signed short ss;
3881+typedef signed int si;
3882+typedef signed long sl;
3883+typedef unsigned char uc;
3884+typedef unsigned short us;
3885+typedef unsigned int ui;
3886+typedef unsigned long ul;
3887+typedef float sf;
3888+
3889+void sc2(vsc v, long a, void *p) { __builtin_altivec_stvlxl (v,a,p); }
3890+void slxl01(vsf v, long a, vsf *p) { __builtin_vec_stvlxl (v,a,p); }
3891+void slxl02(vsf v, long a, sf *p) { __builtin_vec_stvlxl (v,a,p); }
3892+void slxl03(vbi v, long a, vbi *p) { __builtin_vec_stvlxl (v,a,p); }
3893+void slxl04(vsi v, long a, vsi *p) { __builtin_vec_stvlxl (v,a,p); }
3894+void slxl05(vsi v, long a, si *p) { __builtin_vec_stvlxl (v,a,p); }
3895+void slxl06(vui v, long a, vui *p) { __builtin_vec_stvlxl (v,a,p); }
3896+void slxl07(vui v, long a, ui *p) { __builtin_vec_stvlxl (v,a,p); }
3897+void slxl08(vbs v, long a, vbs *p) { __builtin_vec_stvlxl (v,a,p); }
3898+void slxl09(vp v, long a, vp *p) { __builtin_vec_stvlxl (v,a,p); }
3899+void slxl10(vss v, long a, vss *p) { __builtin_vec_stvlxl (v,a,p); }
3900+void slxl11(vss v, long a, ss *p) { __builtin_vec_stvlxl (v,a,p); }
3901+void slxl12(vus v, long a, vus *p) { __builtin_vec_stvlxl (v,a,p); }
3902+void slxl13(vus v, long a, us *p) { __builtin_vec_stvlxl (v,a,p); }
3903+void slxl14(vbc v, long a, vbc *p) { __builtin_vec_stvlxl (v,a,p); }
3904+void slxl15(vsc v, long a, vsc *p) { __builtin_vec_stvlxl (v,a,p); }
3905+void slxl16(vsc v, long a, sc *p) { __builtin_vec_stvlxl (v,a,p); }
3906+void slxl17(vuc v, long a, vuc *p) { __builtin_vec_stvlxl (v,a,p); }
3907+void slxl18(vuc v, long a, uc *p) { __builtin_vec_stvlxl (v,a,p); }
3908diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c
3909--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 1969-12-31 18:00:00.000000000 -0600
3910+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c 2012-03-06 12:31:15.923039000 -0600
3911@@ -0,0 +1,48 @@
3912+/* { dg-do compile { target { powerpc*-*-* } } } */
3913+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3914+/* { dg-require-effective-target powerpc_altivec_ok } */
3915+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3916+/* { dg-final { scan-assembler-times "stvrx" 19 } } */
3917+
3918+#include <altivec.h>
3919+
3920+typedef __vector signed char vsc;
3921+typedef __vector signed short vss;
3922+typedef __vector signed int vsi;
3923+typedef __vector unsigned char vuc;
3924+typedef __vector unsigned short vus;
3925+typedef __vector unsigned int vui;
3926+typedef __vector bool char vbc;
3927+typedef __vector bool short vbs;
3928+typedef __vector bool int vbi;
3929+typedef __vector float vsf;
3930+typedef __vector pixel vp;
3931+typedef signed char sc;
3932+typedef signed short ss;
3933+typedef signed int si;
3934+typedef signed long sl;
3935+typedef unsigned char uc;
3936+typedef unsigned short us;
3937+typedef unsigned int ui;
3938+typedef unsigned long ul;
3939+typedef float sf;
3940+
3941+void sc3(vsc v, long a, void *p) { __builtin_altivec_stvrx (v,a,p); }
3942+void srx01(vsf v, long a, vsf *p) { __builtin_vec_stvrx (v,a,p); }
3943+void srx02(vsf v, long a, sf *p) { __builtin_vec_stvrx (v,a,p); }
3944+void srx03(vbi v, long a, vbi *p) { __builtin_vec_stvrx (v,a,p); }
3945+void srx04(vsi v, long a, vsi *p) { __builtin_vec_stvrx (v,a,p); }
3946+void srx05(vsi v, long a, si *p) { __builtin_vec_stvrx (v,a,p); }
3947+void srx06(vui v, long a, vui *p) { __builtin_vec_stvrx (v,a,p); }
3948+void srx07(vui v, long a, ui *p) { __builtin_vec_stvrx (v,a,p); }
3949+void srx08(vbs v, long a, vbs *p) { __builtin_vec_stvrx (v,a,p); }
3950+void srx09(vp v, long a, vp *p) { __builtin_vec_stvrx (v,a,p); }
3951+void srx10(vss v, long a, vss *p) { __builtin_vec_stvrx (v,a,p); }
3952+void srx11(vss v, long a, ss *p) { __builtin_vec_stvrx (v,a,p); }
3953+void srx12(vus v, long a, vus *p) { __builtin_vec_stvrx (v,a,p); }
3954+void srx13(vus v, long a, us *p) { __builtin_vec_stvrx (v,a,p); }
3955+void srx14(vbc v, long a, vbc *p) { __builtin_vec_stvrx (v,a,p); }
3956+void srx15(vsc v, long a, vsc *p) { __builtin_vec_stvrx (v,a,p); }
3957+void srx16(vsc v, long a, sc *p) { __builtin_vec_stvrx (v,a,p); }
3958+void srx17(vuc v, long a, vuc *p) { __builtin_vec_stvrx (v,a,p); }
3959+void srx18(vuc v, long a, uc *p) { __builtin_vec_stvrx (v,a,p); }
3960diff -ruN gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c
3961--- gcc-4.6.2-orig/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 1969-12-31 18:00:00.000000000 -0600
3962+++ gcc-4.6.2/gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c 2012-03-06 12:31:15.923039000 -0600
3963@@ -0,0 +1,48 @@
3964+/* { dg-do compile { target { powerpc*-*-* } } } */
3965+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3966+/* { dg-require-effective-target powerpc_altivec_ok } */
3967+/* { dg-options "-O2 -maltivec -mcpu=cell" } */
3968+/* { dg-final { scan-assembler-times "stvrxl" 19 } } */
3969+
3970+#include <altivec.h>
3971+
3972+typedef __vector signed char vsc;
3973+typedef __vector signed short vss;
3974+typedef __vector signed int vsi;
3975+typedef __vector unsigned char vuc;
3976+typedef __vector unsigned short vus;
3977+typedef __vector unsigned int vui;
3978+typedef __vector bool char vbc;
3979+typedef __vector bool short vbs;
3980+typedef __vector bool int vbi;
3981+typedef __vector float vsf;
3982+typedef __vector pixel vp;
3983+typedef signed char sc;
3984+typedef signed short ss;
3985+typedef signed int si;
3986+typedef signed long sl;
3987+typedef unsigned char uc;
3988+typedef unsigned short us;
3989+typedef unsigned int ui;
3990+typedef unsigned long ul;
3991+typedef float sf;
3992+
3993+void sc4(vsc v, long a, void *p) { __builtin_altivec_stvrxl (v,a,p); }
3994+void srxl01(vsf v, long a, vsf *p) { __builtin_vec_stvrxl (v,a,p); }
3995+void srxl02(vsf v, long a, sf *p) { __builtin_vec_stvrxl (v,a,p); }
3996+void srxl03(vbi v, long a, vbi *p) { __builtin_vec_stvrxl (v,a,p); }
3997+void srxl04(vsi v, long a, vsi *p) { __builtin_vec_stvrxl (v,a,p); }
3998+void srxl05(vsi v, long a, si *p) { __builtin_vec_stvrxl (v,a,p); }
3999+void srxl06(vui v, long a, vui *p) { __builtin_vec_stvrxl (v,a,p); }
4000+void srxl07(vui v, long a, ui *p) { __builtin_vec_stvrxl (v,a,p); }
4001+void srxl08(vbs v, long a, vbs *p) { __builtin_vec_stvrxl (v,a,p); }
4002+void srxl09(vp v, long a, vp *p) { __builtin_vec_stvrxl (v,a,p); }
4003+void srxl10(vss v, long a, vss *p) { __builtin_vec_stvrxl (v,a,p); }
4004+void srxl11(vss v, long a, ss *p) { __builtin_vec_stvrxl (v,a,p); }
4005+void srxl12(vus v, long a, vus *p) { __builtin_vec_stvrxl (v,a,p); }
4006+void srxl13(vus v, long a, us *p) { __builtin_vec_stvrxl (v,a,p); }
4007+void srxl14(vbc v, long a, vbc *p) { __builtin_vec_stvrxl (v,a,p); }
4008+void srxl15(vsc v, long a, vsc *p) { __builtin_vec_stvrxl (v,a,p); }
4009+void srxl16(vsc v, long a, sc *p) { __builtin_vec_stvrxl (v,a,p); }
4010+void srxl17(vuc v, long a, vuc *p) { __builtin_vec_stvrxl (v,a,p); }
4011+void srxl18(vuc v, long a, uc *p) { __builtin_vec_stvrxl (v,a,p); }
diff --git a/recipes-devtools/gcc/files/gcc.experimental_move.patch b/recipes-devtools/gcc/files/gcc.experimental_move.patch
deleted file mode 100644
index b9642ed..0000000
--- a/recipes-devtools/gcc/files/gcc.experimental_move.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1diff -ruN gcc-4.4.0/gcc/config/rs6000/rs6000.c gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.c
2--- gcc-4.4.0/gcc/config/rs6000/rs6000.c 2009-03-17 15:18:21.000000000 -0500
3+++ gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.c 2009-12-04 10:36:44.000000000 -0600
4@@ -11032,6 +11059,14 @@
5 mode = SImode;
6 gen_func.mov = gen_movsi;
7 }
8+ else if (TARGET_COPY_UNALIGNED && bytes == 3 && offset > 0)
9+ {
10+ /* We generate a single unaligned SI move instead of 2 (HI, QI) */
11+ move_bytes = 3;
12+ mode = SImode;
13+ gen_func.mov = gen_movsi;
14+ offset--;
15+ }
16 else if (bytes >= 2 && (align >= 16 || !STRICT_ALIGNMENT))
17 { /* move 2 bytes */
18 move_bytes = 2;
19diff -ruN gcc-4.4.0/gcc/config/rs6000/rs6000.opt gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.opt
20--- gcc-4.4.0/gcc/config/rs6000/rs6000.opt 2009-02-20 09:20:38.000000000 -0600
21+++ gcc-4.4.0-e500mc64/gcc/config/rs6000/rs6000.opt 2009-09-30 13:51:17.000000000 -0500
22@@ -201,6 +201,10 @@
23 Target RejectNegative Joined
24 -misel=yes/no Deprecated option. Use -misel/-mno-isel instead
25
26+mcopy-unaligned
27+Target Report Var(TARGET_COPY_UNALIGNED)
28+Generate unaligned word load and stores to move 3 bytes
29+
30 mspe
31 Target
32 Generate SPE SIMD instructions on E500
diff --git a/recipes-devtools/gcc/files/gcc.extelim-v3.patch b/recipes-devtools/gcc/files/gcc.extelim-v3.patch
deleted file mode 100644
index e124b18..0000000
--- a/recipes-devtools/gcc/files/gcc.extelim-v3.patch
+++ /dev/null
@@ -1,3491 +0,0 @@
1Eliminate sign and zero extensions in PPC generated code
2A new module is introduced 'extelim.c' and a new RTL pass is introduced.
3The '-f[no-]extelim' flag controls this pass and is enabled at -O2 and above.
4The algorithm is based on the paper "Effective Sign Extension Elimination", Kawahito, et. al.
5More details on implementation in the extelim.c module.
6
7--- gcc-4.6-branch-clean/gcc/opts.c 2011-07-27 12:02:02.483850879 -0500
8+++ gcc-4.6-branch/gcc/opts.c 2011-07-25 17:59:00.911975444 -0500
9@@ -492,6 +492,7 @@
10 { OPT_LEVELS_2_PLUS, OPT_falign_jumps, NULL, 1 },
11 { OPT_LEVELS_2_PLUS, OPT_falign_labels, NULL, 1 },
12 { OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 },
13+ { OPT_LEVELS_2_PLUS, OPT_fextelim, NULL, 1 },
14
15 /* -O3 optimizations. */
16 { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
17--- gcc-4.6-branch-clean/gcc/tree-pass.h 2011-07-27 12:02:02.485981448 -0500
18+++ gcc-4.6-branch/gcc/tree-pass.h 2011-07-25 17:59:00.912976334 -0500
19@@ -483,6 +483,7 @@
20 extern struct rtl_opt_pass pass_initial_value_sets;
21 extern struct rtl_opt_pass pass_unshare_all_rtl;
22 extern struct rtl_opt_pass pass_instantiate_virtual_regs;
23+extern struct rtl_opt_pass pass_rtl_extelim;
24 extern struct rtl_opt_pass pass_rtl_fwprop;
25 extern struct rtl_opt_pass pass_rtl_fwprop_addr;
26 extern struct rtl_opt_pass pass_jump2;
27--- gcc-4.6-branch-clean/gcc/timevar.def 2011-07-27 12:02:02.487999008 -0500
28+++ gcc-4.6-branch/gcc/timevar.def 2011-07-25 17:59:00.913979563 -0500
29@@ -180,6 +180,7 @@
30 DEFTIMEVAR (TV_VARCONST , "varconst")
31 DEFTIMEVAR (TV_LOWER_SUBREG , "lower subreg")
32 DEFTIMEVAR (TV_JUMP , "jump")
33+DEFTIMEVAR (TV_EXTELIM , "extension elimination")
34 DEFTIMEVAR (TV_FWPROP , "forward prop")
35 DEFTIMEVAR (TV_CSE , "CSE")
36 DEFTIMEVAR (TV_DCE , "dead code elimination")
37--- gcc-4.6-branch-clean/gcc/common.opt 2011-07-27 12:02:02.490978128 -0500
38+++ gcc-4.6-branch/gcc/common.opt 2011-07-25 17:59:00.915979093 -0500
39@@ -996,6 +996,10 @@
40 Common Report Var(flag_eliminate_dwarf2_dups)
41 Perform DWARF2 duplicate elimination
42
43+fextelim
44+Common Report Var(flag_extelim)
45+Perform zero/sign extension removal
46+
47 fipa-sra
48 Common Report Var(flag_ipa_sra) Init(0) Optimization
49 Perform interprocedural reduction of aggregates
50--- gcc-4.6-branch-clean/gcc/Makefile.in 2011-07-27 12:02:02.498976606 -0500
51+++ gcc-4.6-branch/gcc/Makefile.in 2011-07-25 17:59:00.919975303 -0500
52@@ -1233,6 +1233,7 @@
53 explow.o \
54 expmed.o \
55 expr.o \
56+ extelim.o \
57 final.o \
58 fixed-value.o \
59 fold-const.o \
60@@ -2891,6 +2892,11 @@
61 reload.h langhooks.h intl.h $(TM_P_H) $(TARGET_H) \
62 tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
63 $(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H)
64+extelim.o : extelim.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
65+ $(TREE_H) $(TM_P_H) $(FLAGS_H) $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) \
66+ insn-config.h $(FUNCTION_H) $(EXPR_H) $(INSN_ATTR_H) $(RECOG_H) \
67+ toplev.h $(TARGET_H) $(TIMEVAR_H) $(OPTABS_H) insn-codes.h \
68+ output.h $(PARAMS_H) $(TREE_PASS_H) $(CGRAPH_H)
69 dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
70 $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
71 langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h
72--- gcc-4.6-branch-clean/gcc/passes.c 2011-07-27 12:02:02.502976386 -0500
73+++ gcc-4.6-branch/gcc/passes.c 2011-07-25 17:59:00.922975752 -0500
74@@ -990,6 +990,7 @@
75 NEXT_PASS (pass_web);
76 NEXT_PASS (pass_rtl_cprop);
77 NEXT_PASS (pass_cse2);
78+ NEXT_PASS (pass_rtl_extelim);
79 NEXT_PASS (pass_rtl_dse1);
80 NEXT_PASS (pass_rtl_fwprop_addr);
81 NEXT_PASS (pass_inc_dec);
82--- gcc-4.6.1-clean/gcc/extelim.c 1969-12-31 18:00:00.000000000 -0600
83+++ gcc-4.6.1/gcc/extelim.c 2011-11-14 15:43:10.041143996 -0600
84@@ -0,0 +1,3407 @@
85+/* Redundant extension elimination
86+ Copyright (C) 2010 Free Software Foundation, Inc.
87+ Contributed by John Russo (john.russo@freescale.com)
88+
89+This file is part of GCC.
90+
91+GCC is free software; you can redistribute it and/or modify it under
92+the terms of the GNU General Public License as published by the Free
93+Software Foundation; either version 3, or (at your option) any later
94+version.
95+
96+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
97+WARRANTY; without even the implied warranty of MERCHANTABILITY or
98+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
99+for more details.
100+
101+You should have received a copy of the GNU General Public License
102+along with GCC; see the file COPYING3. If not see
103+<http://www.gnu.org/licenses/>. */
104+
105+/*
106+PURPOSE: Implement a method for eliminating redundant and superflous sign
107+extension instructions from 64-bit PPC e5500 generated code.
108+
109+MOTIVATING EXAMPLE:
110+The Nullstone loop_6.c kernel looks like:
111+ int i;
112+ int a[100];
113+
114+ ref_int_p (&a[0]);
115+
116+ for (i=2; i<100; i++)
117+ a[i] = a[i-1] + a[i-2];
118+
119+The final, generated code for the loop body is:
120+
121+32-bit 64-bit
122+add r25,r11,r0 add r5,r5,r8
123+add r26,r0,r25 addi r4,r4,12
124+stw r25,0(r9) add r27,r5,r8
125+add r27,r25,r26 stw r5,0(r9)
126+stw r26,4(r9) extsw r12,r27 <===
127+add r28,r26,r27 stw r27,4(r9)
128+stw r27,8(r9) add r6,r5,r12
129+add r29,r27,r28 add r28,r6,r12
130+stw r28,12(r9) stw r6,8(r9)
131+add r30,r28,r29 extsw r0,r28 <===
132+stw r29,16(r9) stw r28,12(r9)
133+add r12,r29,r30 add r7,r6,r0
134+stw r30,20(r9) add r29,r7,r0
135+add r3,r30,r12 stw r7,16(r9)
136+stw r12,24(r9) extsw r3,r29 <===
137+add r4,r12,r3 stw r29,20(r9)
138+stw r3,28(r9) add r10,r7,r3
139+add r5,r3,r4 add r30,r10,r3
140+stw r4,32(r9) stw r10,24(r9)
141+add r6,r4,r5 extsw r8,r30 <===
142+stw r5,36(r9) stw r30,28(r9)
143+add r7,r5,r6 add r11,r10,r8
144+stw r6,40(r9) add r12,r11,r8
145+add r8,r6,r7 stw r11,32(r9)
146+stw r7,44(r9) extsw r26,r12 <===
147+add r10,r7,r8 stw r12,36(r9)
148+stw r8,48(r9) add r0,r11,r26
149+add r11,r8,r10 add r3,r0,r26
150+stw r10,52(r9) stw r0,40(r9)
151+add r0,r10,r11 subfic r26,r4,100
152+stw r11,56(r9) stw r3,44(r9)
153+stw r0,60(r9) extsw r5,r0 <===
154+addi r9,r9,64 extsw r8,r3 <===
155+bdnz+ 10000640 extsw r4,r4 <===
156+ clrldi r26,r26,32
157+ addi r9,r9,48
158+ bdnz+ 10000890
159+
160+GENERAL APPROACH:
161+Consider a machine whose native register size is 64-bits
162+
163+0 3132 63
164+|-----------||-----------|
165+
166+where bit 63 is the LSB and bit 0 is the MSB of a long int
167+and bit 63 is the LSB and bit 32 is the MSB of an int.
168+
169+Sign and zero extension are inserted to RTL to preserve the
170+operation's semantics when the operands used are not the
171+native register size since normally the machine only performs
172+the operation using a native register size. In practice, many
173+of the inserted extensions are not necessary.
174+
175+First, the extension may simply be redundant. That is, the
176+same operation is performed on the same operands. The redundant
177+extensions can be eliminated.
178+
179+Secondly, if the extended portion of the register (the "upper" bits)
180+are not essential to the calculations performed on the output of the
181+extension, then the extension is not necessary. For example, given
182+int (32-bit) inputs and outputs:
183+
184+c = a + b
185+d = sxt(c)
186+e = d + 1;
187+
188+The "upper" bits of d (bit 0-31) do not affect the calculation
189+of e. It doesn't matter what the "upper" bits of d are, the int result
190+e is the same regardless of the sxt instruction.
191+
192+Thirdly, the extensions may not be necessary if the operands are
193+already extended and the operation preserves the extended bits.
194+
195+a = mem[&b] ; sign extending load
196+c = a + 1
197+d = sxt(c)
198+
199+Here, a is generated by a sign extending load, the operation
200+does nothing to invalidate the extension to c, thus the extension
201+on c to d is not necessary.
202+
203+In each case, the redundant extension must be replaced by a copy,
204+with the copy to be optimized out in later phases.
205+
206+The three cases described above form the general idea behind the
207+algorithms implemented here to eliminate redundant and unneccessary
208+extensions.
209+
210+Sign extensions do not have to be preserved for overflow conditions
211+since signed overflow behavior is not defined in C. For example,
212+take a 16-bit variable in a 32-bit register. It is ok
213+for 0x0000_7fff to overflow to 0x0000_8000 and not 0xffff_8000.
214+This implies that it is not necessary to preserve the sign
215+extension.
216+
217+Unsigned overflow extension need to be preserved because
218+unsigned overflow is modulo. For example, a 16-bit unsigned
219+overflow of 0x0000_FFFF must be 0x0000_0000 in a 32-bit register,
220+not 0x0001_0000. In order to remove the unsigned zero extension,
221+we would need to range check the variable to be sure it doesn't
222+overflow.
223+
224+RTL ANALYSIS:
225+I looked at the RTL representation after RTL generation (.expand) and
226+after the first forward propagation (.fwprop1). Since RTL is not compact
227+when printing out, I reduced the .fwprop1 RTL to this pseudocode:
228+
229+(note: sxt,zxt mean double word length, 64-bit, extension).
230+
231+(1) r198 = m[r113+ #112] ; load a[0]
232+(2) r174 = sxt(r198)
233+(3) r199 = m[r113+ #116] ; load a[1]
234+(4) r186 = sxt(r199)
235+(5) r181 = r113 + #120 ; load &a[2]
236+(6) r180 = 2 ; i = 2
237+(7) L1:
238+(8) r200 = r174 + r186 ; t1 = a[i-1] + a[i-2]
239+(9) r174 = sxt(r200)
240+(10) m[r181] = r200 ; a[i] = t1
241+(11) r201 = r200 + r186 ; t2 = t1 + a[i-1]
242+(12) r186 = sxt(r201)
243+(13) m[r181+4] = r201 ; a[i+1] = t2
244+(14) r202 = r180 + 2 ; i += 2
245+(14.1) r180 = sxt(r202)
246+(15) r203 = 100 - r202 ; used to calc loop remainder
247+(16) r185 = zxt(r203) ; used to calc loop remainder
248+(17) r181 = r181 + 8 ; address induction var
249+(18) ccr204 = cmp(r202,#98) ; set CC
250+(19) BNE ccr204,L1 ; branch
251+
252+In the pseudo-code, you see several sign extension candidates: (2),(4),
253+(9), (12), (14.1), (16).
254+
255+ALGORITHM:
256+To eliminate the extra sign ext you have to look at (1) the definitions
257+of the source of the sign extensions and/or (2) look at the uses of the target
258+of the sign extensions. In either case, if doing a global elimination
259+pass, you'll need def-use chain information.
260+
261+The algorithms are recursive. Using the use/def and def/use chains
262+we attempt to find ultimately whether the extension is relevant
263+or not.
264+
265+
266+Example 1.
267+Extensions (2) and (4) are not put in the candidate list because
268+they are combined into a load/ext pair that is ultimately generated
269+as sign extending loads.
270+
271+Take the sign extension at (9), r174 = sxt(r200).
272+Def analysis shows that r200 is defined by 2 registers, thus no
273+further def analysis recursion can occur.
274+Use analysis. Find all the uses of r174. There is 1 use at (8) r200 = r174 + r186.
275+The extension does not affect the add operation results. Continuing, we look at
276+the uses of r200 to see if the results of operations on r200 need the sign extended bits.
277+We see 2 uses of r200 at (10) and (11). (10) is a 32-bit store of r200,
278+so the sign extended bits are irrelevant. (11), however, is an unknown,
279+so we must look that the uses of this result, r201. A similar sequence
280+occurs for r201 when it defines r186. Looking at the uses of r186 at
281+(8) and (11), we have already visited those statements so they have
282+been covered already. So it appears that the sxt to r174 at (9) ultimately
283+dead-ends to a store instruction that doesn't case about the sign extended
284+bits. The sxt at (9) can be removed.
285+
286+The remaining extensions are processed similarly.
287+
288+PROGRAM STRUCTURE:
289+
290+extension elimination -- main entry point
291+ find extensions -- identify extension candidates
292+ extension duplication -- insert extension at strategic points to
293+ enable removal of extensions at more frequently
294+ executed points.
295+ find extensions -- recreate extension candidate list
296+ sort extensions -- sort extension candidate list by loop depth
297+ for each ext in list -- process each extension candidate
298+ eliminate one extension
299+ replace marked candidates with copy -- optimize the extension
300+
301+PSEUDOCODE:
302+
303+Create working list of sign extensions, sxt_list
304+
305+For each insn, insn_sxt, in sxt_list
306+ ext_needed = true
307+ For all insns, insn_def, that DEFINE and REACH the SOURCE_REG(insn_sxt)
308+ ext_needed = analyze_def(insn_def, insn_sxt)
309+ if (ext_needed)
310+ break;
311+ end_loop
312+ if (ext_needed)
313+ For all insns, insn_use, that USE and are REACHED by the DEST_REG(insn_sxt)
314+ ext_needed = analyze_use(insn_use, insn_sxt)
315+ if (ext_needed)
316+ break;
317+ end_loop
318+
319+ if (!ext_needed)
320+ mark_for_replace_with_copy(I)
321+end_loop
322+
323+For each insn, insn_sxt, in sxt_list
324+ if (insn_sxt is marked for replacement)
325+ replace_insn_with_copy(insn_sxt)
326+end_loop
327+
328+--------------------------
329+function: analyze_def(def)
330+---------------------------
331+return true if extension is needed, false otherwise.
332+
333+destination_operand = defined operand of source
334+source_operand = source operand of def
335+
336+if (have_seen_this_insn_already (def))
337+ return true;
338+
339+set_seen_this_insn_flag (def)
340+
341+analysis_result = analyze_result_def (def)
342+switch (analysis_result)
343+ case source_operand_is_extended:
344+ return false
345+ case stop_recursion:
346+ return true
347+ case continue_recursion:
348+ break;
349+
350+ext_needed = true;
351+
352+For all insns, insn_def, that USE and REACHED by the register of destination_operand
353+ ext_needed = analyze_def(insn_def))
354+ if (ext_needed)
355+ break;
356+end_loop
357+
358+return ext_needed
359+
360+--------------------------
361+function: analyze_use(use)
362+---------------------------
363+return true if extension is needed, false otherwise.
364+
365+destination_operand = destination operand of use
366+source_operand = source operand of use
367+
368+if (have_seen_this_insn_already (use))
369+ return false;
370+
371+set_seen_this_insn_flag (use)
372+
373+analysis_result = analyze_result_use (use)
374+switch (analysis_result)
375+ case low_bits_not_affected_by_use:
376+ return false
377+ case low_bits_affected_by_use:
378+ return true
379+ case look_at_uses_of_destination_operand
380+ break;
381+
382+ext_needed = true;
383+For all insns, insn_use, that USE the register of destination_operand
384+ ext_needed = analyze_use(insn_use))
385+ if (ext_needed)
386+ break;
387+end_loop
388+
389+return ext_needed
390+
391+REFERENCES:
392+
393+"Effective Sign Extension Elimination", Kawahito, Komatsu, Nakatani.
394+IBM Tokyo Researc Laboratory.
395+
396+"New sign/zero extension elimination pass", deVries.
397+http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01529.html
398+*/
399+
400+/*
401+Iteration 4: pre-ZERO_EXTEND version, duplicates sign_extend at uses
402+Iteration 5: begin supporting ZERO_EXTEND, crashes on Coremark.
403+Iteration 6: revert to 4, support SI:HI sign_extensions.
404+Iteration 7: Add support for zero extend. This version deletes
405+ "inserted" duplicate extensions when redundant and propagates
406+ the copied value. This propagate fails in other_tests/test2.sh.
407+ I am reverting back to replacing the "inserted" extension to a copy.
408+ Copy propagation should always be able to eliminate this copy.
409+ Coremark was stable, however.
410+Iteration 8: Revert to change extensions to copy, regardless of whether
411+ the extension was duplicated or not.
412+ Refactor setting of dest,src in analyze_ext_use, analyze_ext_def, now
413+ handled with a single function.
414+Iteration 9:
415+ Inserted redundant extensions at function return points.
416+ Sorted the order that extensions are processed by loop depth.
417+ Additional cases in upper_bits_do_not_affect_dest
418+Iteration 10:
419+ Fixes for test failures. A major problem was uncovered where
420+ the "visited" flag was not properly cleared. This meant that
421+ each time a new extension was processed, it appeared that some
422+ extensions were visited already and there were not. The result
423+ was false removals. This fix significantly affects the benchmark.
424+ Another change was to comment out the duplicate_exts_at_uses. This
425+ seemed to have little effect now that the visited flag issue is
426+ fixed.
427+Iteration 11:
428+ Cleanup warnings during build.
429+Iteration 12:
430+ QImode support started.
431+Iteration 13:
432+ Redesign and refactor analyze_ext_use, analyze_ext_def
433+Iteration 14:
434+ Continue redesign and refactor of analyze_ext_use, analyze_ext_def
435+ Debugging paper_example.c
436+Iteration 15:
437+ cond_c fix
438+Iteration 16: (not tested)
439+ Refactor check_compare code
440+ Refactor action decision in PARALLEL
441+ Allow pass-thru on insns that are marked for replace copy
442+ instead of stopping recursion if we see a marked insn.
443+ Examining lshiftrt.c program (signed and unsigned).
444+Iteration 17:
445+ Refactor mostly complete. Passed all local testing including
446+ nas and perfect. Best coremark results so far.
447+Iteration 18:
448+ Oops. analyze_ext_def was disabled. Enabling it improves
449+ Coremark. Passed coremark, perfect.
450+Iteration 19:
451+ Local tests are passing. Tested with glibc.
452+ Added statistics.
453+ Fixed elimination from CALL output in operand_is_extended.
454+ This impacted Coremark went from 6300 to 6170. But is necessary.
455+ More safety for used regs in analyze_ext_def.
456+ More safety for the types of extensions.
457+Iteration 20:
458+ Fixes for various tests.
459+Iteration 21:
460+ pr43017 -funroll_loops fix.
461+Iteration 22:
462+ Fixes for AND immediate in operand_is_extended.
463+ Cosmetic cleanup.
464+Iteration 23:
465+ Fixes for consumer-2,spec2k,spec2k6. Handle
466+ SUBREG_PROMOTED_VAR_P flags on operands whose
467+ dependent extension has been eliminated.
468+Iteration 24:
469+ Fixed problem in native build during bootstrapping.
470+ Extelim was considering debug_insns and should have
471+ ignored them. This resulted in a compare fail between
472+ stage2 and stage3.
473+Iteration 25:
474+ - Post-release 4.6.1 development
475+ - Full duplication of extensions at uses turned on.
476+ - Recursion into original extension no longer kills optimization (analyze_ext_def only)
477+ - Allow some duplication into the same block if it enables insn selection
478+ - Allow CCmode and CCUNSmode into mode_supported_p
479+Iteration 26:
480+ - Solve ICEs due to null df-ref.
481+Iteration 27:
482+ - Fixed issue with duplication of extension at a self-assign.
483+ - Some fixes for copying flags during duplication
484+ - Some fixes for counting register uses.
485+Iteration 28:
486+ - Fixed issue with duplication of extension when use has multiple
487+ reaching definitions.
488+Iteration 29:
489+ - Release candidate for Q42011 release iteration.
490+Iteration 30:
491+ - Turn off extension duplication - minimally effective
492+
493+*/
494+
495+#include "config.h"
496+#include "system.h"
497+#include "coretypes.h"
498+#include "tm.h"
499+#include "rtl.h"
500+#include "tree.h"
501+#include "tm_p.h"
502+#include "flags.h"
503+#include "regs.h"
504+#include "hard-reg-set.h"
505+#include "basic-block.h"
506+#include "insn-config.h"
507+#include "function.h"
508+#include "expr.h"
509+#include "insn-attr.h"
510+#include "recog.h"
511+#include "toplev.h"
512+#include "target.h"
513+#include "timevar.h"
514+#include "optabs.h"
515+#include "insn-codes.h"
516+#include "rtlhooks-def.h"
517+#include "output.h"
518+#include "params.h"
519+#include "timevar.h"
520+#include "tree-pass.h"
521+#include "cgraph.h"
522+#include "df.h"
523+#include "vec.h"
524+
525+/* Feature flags */
526+/* Duplicate extensions at each immediate use */
527+#define EXTELIM_DUPLICATE_EXTS_AT_USES 0
528+/* Dump DF information also in dump */
529+#define EXTELIM_DF_DUMP 0
530+
531+
532+/* Typedefs */
533+typedef unsigned int insn_flag_t; /* Insn flags type */
534+typedef int extelim_uid_t; /* UID type */
535+DEF_VEC_I (insn_flag_t); /* Define vector type and allocation type */
536+DEF_VEC_ALLOC_I (insn_flag_t, heap);
537+
538+typedef struct GTY (()) ext_record
539+{
540+ rtx ext; /* The extension insn */
541+ VEC (rtx, heap) * ext_uses; /* List of use records for this extension. For some
542+ some extensions, we will duplicate the extension
543+ at these use points. */
544+ VEC (rtx, heap) * ext_updates;/* List of rtx that need to be updated if the extension
545+ is to be eliminated. For example, SUBREG_PROMOTED flags
546+ on SUBREG uses defined by this extension should
547+ be reset since the extension is eliminated. The PROMOTED
548+ flag is no longer valid. */
549+} *ext_record_t;
550+
551+typedef struct regspec_cb_data
552+{
553+ unsigned int regno;
554+ rtx exp;
555+} regspec_cb_data_t;
556+
557+/* Static variables */
558+DEF_VEC_P (ext_record_t);
559+DEF_VEC_ALLOC_P (ext_record_t, heap);
560+VEC (ext_record_t, heap) * extensions; /* Vector holding all extension records */
561+VEC (insn_flag_t, heap) * insn_flags; /* Vector holding flags for all insns */
562+VEC (rtx, heap) * returns; /* Vector holding return insns for this function */
563+
564+ static extelim_uid_t max_uid; /* Max UID insn value for insn_flags allocation */
565+ static ext_record_t current_ext_record; /* Current extension record being processed */
566+
567+/* Statistics */
568+ static int num_cand; /* Number of extensions detected */
569+ static int num_cand_ignored; /* Number of extensions ignored */
570+ static int num_cand_transformed; /* Number of extensions transformed to copy */
571+
572+/* Basic information about the extension being processed */
573+ enum machine_mode ext_to_mode; /* Mode extended to */
574+ enum machine_mode ext_from_mode; /* Mode extended from */
575+ enum rtx_code ext_code; /* Sign or zero extend */
576+
577+/* Insn use analysis possible results */
578+ enum insn_use_results
579+ {
580+ EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED,
581+ EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED,
582+ EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION
583+ };
584+
585+/* Insn def analysis possible results */
586+ enum insn_def_results
587+ {
588+ EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED,
589+ EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION,
590+ EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION
591+ };
592+
593+/* Insn flags for this pass */
594+#define EXTELIM_NONE 0
595+#define EXTELIM_SEEN (1<<0) /* Mark insn as visited during DF traversal */
596+#define EXTELIM_REPLACE_COPY (1<<1) /* Mark ext insn as replace with copy */
597+#define EXTELIM_INSERTED (1<<2) /* Mark ext insn as algorithmically inserted */
598+#define EXTELIM_INSERTED_FOR (1<<3) /* Mark use insn for which ext has been inserted */
599+
600+
601+/* Query the insn flag */
602+
603+ static bool insn_flag_p (insn_flag_t set_p, extelim_uid_t uid)
604+{
605+ insn_flag_t flags;
606+
607+ if (((flags = VEC_index (insn_flag_t, insn_flags, uid)) & set_p) == set_p)
608+ return true;
609+
610+ return false;
611+}
612+
613+/* Set the insn flags */
614+
615+static void
616+insn_flag_set (insn_flag_t flags, extelim_uid_t uid)
617+{
618+ insn_flag_t set;
619+ set = VEC_index (insn_flag_t, insn_flags, uid);
620+ set |= flags;
621+ VEC_replace (insn_flag_t, insn_flags, uid, set);
622+}
623+
624+/* Clear insn flags */
625+
626+static void
627+insn_flag_clear (insn_flag_t flags, extelim_uid_t uid)
628+{
629+ insn_flag_t clear;
630+ clear = VEC_index (insn_flag_t, insn_flags, uid);
631+ clear &= ~flags;
632+ VEC_replace (insn_flag_t, insn_flags, uid, clear);
633+}
634+
635+/* Set static variable max_uid to the largest
636+ insn uid found in the module plus 1. This will be the
637+ size of the vector for insn flags. */
638+
639+static void
640+set_max_uid (void)
641+{
642+ basic_block bb;
643+ rtx insn;
644+ extelim_uid_t lmax_uid = 0;
645+
646+ FOR_EACH_BB (bb) FOR_BB_INSNS (bb, insn)
647+ {
648+ if (INSN_P (insn))
649+ {
650+ if (INSN_UID (insn) > lmax_uid)
651+ lmax_uid = INSN_UID (insn);
652+ }
653+ }
654+ max_uid = lmax_uid + 1;
655+}
656+
657+/* Re-initializes the requested insn flags to their reset state */
658+
659+static void
660+reinit_insn_flags (insn_flag_t flags_to_be_reset)
661+{
662+ extelim_uid_t i;
663+
664+ /* Account for new insns */
665+ set_max_uid ();
666+
667+ for (i = 0; i < max_uid; i++)
668+ {
669+ insn_flag_clear (flags_to_be_reset, i);
670+ }
671+}
672+
673+/* Init the vector for insn flags. One
674+ vector element per insn is created.
675+ The flags are init'd to EXTELIM_NONE. */
676+
677+static void
678+init_flags_vector (void)
679+{
680+ extelim_uid_t i;
681+ /* Get the maximum uid value. We'll use this
682+ information to set up a vector of max_uid
683+ length. Each element of the vector will hold
684+ the pass-specific flags for each insn. */
685+ max_uid = 0;
686+ set_max_uid ();
687+
688+ /* Allocate the vector of insn flags */
689+ insn_flags = VEC_alloc (insn_flag_t, heap, max_uid);
690+
691+ /* Initialize the insn flags vector */
692+ for (i = 0; i < max_uid; i++)
693+ {
694+ VEC_quick_insert (insn_flag_t, insn_flags, i, EXTELIM_NONE);
695+ }
696+}
697+
698+/* Initialize this pass */
699+
700+static void
701+init_pass (void)
702+{
703+ /* Init insn flags vector */
704+ init_flags_vector ();
705+
706+ /* This pass requires def-use chain information */
707+ df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN);
708+ df_analyze ();
709+}
710+
711+static void
712+free_extensions (void)
713+{
714+ ext_record_t ext_record;
715+ unsigned i;
716+
717+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, ext_record)
718+ {
719+ if (!VEC_empty (rtx, ext_record->ext_uses))
720+ VEC_free (rtx, heap, ext_record->ext_uses);
721+
722+ if (!VEC_empty (rtx, ext_record->ext_updates))
723+ VEC_free (rtx, heap, ext_record->ext_updates);
724+ }
725+ VEC_free (ext_record_t, heap, extensions);
726+}
727+
728+/* Clean up this pass */
729+
730+static void
731+finish_pass (void)
732+{
733+ free_extensions ();
734+ VEC_free (insn_flag_t, heap, insn_flags);
735+ VEC_free (rtx, heap, returns);
736+}
737+
738+static void
739+update_uid_vectors (extelim_uid_t uid)
740+{
741+ VEC_safe_grow_cleared (insn_flag_t, heap, insn_flags, uid + 1);
742+}
743+
744+/* Emit a insn before a given insn, update vector lengths
745+ of those vectors that are indexed by uid. Return uid
746+ of the inserted insn. */
747+
748+static extelim_uid_t
749+extelim_emit_before (rtx new_insn, rtx before_insn)
750+{
751+ rtx seq;
752+ extelim_uid_t new_uid;
753+
754+ start_sequence ();
755+ emit_insn (new_insn);
756+ seq = get_insns ();
757+ end_sequence ();
758+ new_insn = emit_insn_before (seq, before_insn);
759+
760+ /* Expand the flags vector to hold the new insn and set the
761+ inserted flag on the insn. */
762+ new_uid = INSN_UID (new_insn);
763+ update_uid_vectors (new_uid);
764+ return new_uid;
765+}
766+
767+/* Utility function to find the REG exp
768+ given an rtx */
769+
770+static rtx
771+register_exp (rtx exp)
772+{
773+ if (REG_P (exp))
774+ {
775+ return exp;
776+ }
777+ else if (GET_CODE (exp) == SUBREG)
778+ {
779+ return SUBREG_REG (exp);
780+ }
781+ else
782+ return NULL;
783+}
784+
785+/* Check whether this is a sign extension. */
786+
787+static bool
788+extension_p (rtx insn, rtx * dest, rtx * inner, int *preserved_size)
789+{
790+ rtx src, op0;
791+
792+ /* Detect set of reg. */
793+ if (GET_CODE (PATTERN (insn)) != SET)
794+ return false;
795+
796+ src = SET_SRC (PATTERN (insn));
797+ *dest = SET_DEST (PATTERN (insn));
798+
799+ if (!REG_P (*dest))
800+ return false;
801+
802+ if (GET_CODE (src) == SIGN_EXTEND || GET_CODE (src) == ZERO_EXTEND)
803+ {
804+ op0 = XEXP (src, 0);
805+
806+ /* Determine amount of least significant bits preserved by operation. */
807+ if (GET_CODE (src) == AND)
808+ *preserved_size = ctz_hwi (~UINTVAL (XEXP (src, 1)));
809+ else
810+ *preserved_size = GET_MODE_BITSIZE (GET_MODE (op0));
811+
812+ if (GET_CODE (op0) == SUBREG)
813+ {
814+ if (subreg_lsb (op0) != 0)
815+ return false;
816+
817+ *inner = SUBREG_REG (op0);
818+ return true;
819+ }
820+ else if (REG_P (op0))
821+ {
822+ *inner = op0;
823+ return true;
824+ }
825+ }
826+
827+ return false;
828+}
829+
830+/* Return true if this is the last use of a
831+ register, false otherwise. */
832+
833+static bool
834+reg_is_dead_p (rtx insn, rtx reg_expr)
835+{
836+ rtx link;
837+ gcc_assert (REG_P (reg_expr));
838+
839+ for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
840+ {
841+ if (REG_NOTE_KIND (link) == REG_DEAD && REG_P (XEXP (link, 0)))
842+ {
843+ if (REGNO (XEXP (link, 0)) == REGNO (reg_expr))
844+ return true;
845+ }
846+ }
847+ return false;
848+}
849+
850+/* Return true if we don't want to place this
851+ extension in the candidate extensions list because of the
852+ previous insn. Return false otherwise. */
853+
854+static bool
855+ignore_extension_prev_p (rtx ext_insn, rtx prev_insn)
856+{
857+ rtx prev_dest, prev_src, prev = PATTERN (prev_insn);
858+ rtx ext_src, ext = PATTERN (ext_insn);
859+
860+ /* It's OK to allow extension with no accompanying prev real insn */
861+ if (!NONDEBUG_INSN_P (prev_insn) || NOTE_P (prev_insn))
862+ return false;
863+
864+ if (GET_CODE (prev) != SET)
865+ return false;
866+
867+ if (GET_CODE (ext) != SET)
868+ return false;
869+
870+ prev_dest = SET_DEST (prev);
871+ prev_src = SET_SRC (prev);
872+
873+ /* Source register of sign extension */
874+ ext_src = XEXP (SET_SRC (ext), 0);
875+
876+ /* Check previous insns */
877+
878+ /* Previous insn is a load whose dest is the
879+ extension's source and the dest reg is
880+ dead */
881+ if (MEM_P (prev_src) && (prev_dest = register_exp (prev_dest)))
882+ {
883+ if ((ext_src = register_exp (ext_src)))
884+ {
885+ if ((REGNO (prev_dest) == REGNO (ext_src))
886+ && reg_is_dead_p (ext_insn, ext_src))
887+ return true;
888+ }
889+ }
890+ return false;
891+}
892+
893+/* Return true if we don't want to place this
894+ extension in the candidate extensions list because of the
895+ next insn. Return false otherwise. */
896+
897+static bool
898+ignore_extension_next_p (rtx ext_insn, rtx next_insn)
899+{
900+ rtx next = PATTERN (next_insn);
901+ rtx ext_src, ext = PATTERN (ext_insn);
902+
903+ if (GET_CODE (ext) != SET)
904+ return false;
905+
906+ /* Check next insns */
907+ if (!NONDEBUG_INSN_P (next_insn) || NOTE_P (next_insn))
908+ return false;
909+
910+ if (GET_CODE (next) != SET)
911+ return false;
912+
913+ /* zero-extend followed by left shift by 1 -- this sequence will be
914+ detected by the insn selection. */
915+ if (GET_CODE (SET_SRC (ext)) == ZERO_EXTEND)
916+ {
917+ if (GET_CODE (SET_SRC (next)) == ASHIFT
918+ && CONST_INT_P (XEXP (SET_SRC (next), 1))
919+ && UINTVAL (XEXP (SET_SRC (next), 1)) == 0x1)
920+ return true;
921+ }
922+
923+ return false;
924+}
925+
926+/* Find extensions and store them in the extensions vector. */
927+
928+static bool
929+find_extensions (void)
930+{
931+ basic_block bb;
932+ rtx insn, dest, inner;
933+ int preserved_size;
934+ ext_record_t extrec;
935+
936+ /* For all insns, call note_use for each use in insn. */
937+ FOR_EACH_BB (bb)
938+ {
939+ FOR_BB_INSNS (bb, insn)
940+ {
941+ if (!NONDEBUG_INSN_P (insn))
942+ continue;
943+
944+ if (!extension_p (insn, &dest, &inner, &preserved_size))
945+ {
946+ continue;
947+ }
948+
949+ /* We do not consider extensions that follow a load for
950+ this target, as the code selector optimizes the sequence
951+ to a load with sign extend or load with zero extend. */
952+ if (PREV_INSN (insn)
953+ && ignore_extension_prev_p (insn, PREV_INSN (insn)))
954+ {
955+ if (dump_file)
956+ fprintf (dump_file, "extension at uid=%d ignored\n",
957+ INSN_UID (insn));
958+ num_cand_ignored++;
959+ continue;
960+ }
961+ /* We don't consider certain sequences that are picked up by
962+ insn selection. */
963+ if (NEXT_INSN (insn)
964+ && ignore_extension_next_p (insn, NEXT_INSN (insn)))
965+ {
966+ if (dump_file)
967+ fprintf (dump_file, "extension at uid=%d ignored\n",
968+ INSN_UID (insn));
969+ num_cand_ignored++;
970+ continue;
971+ }
972+
973+ /* Only looking at sign extensions to DImode, SImode, or HImode */
974+ if (GET_MODE_BITSIZE (SImode) != preserved_size
975+ && GET_MODE_BITSIZE (HImode) != preserved_size
976+ && GET_MODE_BITSIZE (QImode) != preserved_size)
977+ continue;
978+
979+ extrec = (ext_record_t) xmalloc (sizeof (struct ext_record));
980+ extrec->ext = insn;
981+ extrec->ext_uses = NULL;
982+ extrec->ext_updates = NULL;
983+ VEC_safe_push (ext_record_t, heap, extensions, extrec);
984+ num_cand++;
985+ }
986+ }
987+
988+ if (dump_file)
989+ {
990+ if (!VEC_empty (ext_record_t, extensions))
991+ fprintf (dump_file, "\n");
992+ else
993+ fprintf (dump_file, "no extensions found.\n");
994+ }
995+
996+ return !VEC_empty (ext_record_t, extensions);
997+}
998+
999+/* Return true if the rtx mode is a supported mode for
1000+ this optimization, false otherwise. */
1001+
1002+static bool
1003+mode_supported_p (rtx exp)
1004+{
1005+ if (GET_MODE (exp) != QImode
1006+ && GET_MODE (exp) != HImode
1007+ && GET_MODE (exp) != SImode
1008+ && GET_MODE (exp) != DImode
1009+ && GET_MODE (exp) != CCmode
1010+ && GET_MODE (exp) != CCUNSmode)
1011+ return false;
1012+
1013+ return true;
1014+}
1015+
1016+/* Return true if the rtx is a function return expr, false otherwise */
1017+
1018+static bool
1019+return_val_p (rtx dest)
1020+{
1021+ if ((REG_P (dest) || GET_CODE (dest) == PARALLEL) &&
1022+ REG_FUNCTION_VALUE_P (dest))
1023+ {
1024+ return true;
1025+ }
1026+ return false;
1027+}
1028+
1029+
1030+/* A 'for_each_rtx' callback returning 1 if the rtx is a
1031+ REG or SUBREG rtx. The first matching rtx found stops the
1032+ rtx traversal. */
1033+
1034+static int
1035+reg_or_subreg_rtx (rtx * x, void *data)
1036+{
1037+ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data;
1038+
1039+ if (REG_P (*x))
1040+ {
1041+ ldata->exp = *x;
1042+ return 1;
1043+ }
1044+
1045+ if (GET_CODE (*x) == SUBREG)
1046+ {
1047+ ldata->exp = SUBREG_REG (*x);
1048+ return 1;
1049+ }
1050+
1051+ return 0;
1052+}
1053+
1054+/* A 'for_each_rtx' callback returning 1 if the rtx is a
1055+ REG or SUBREG rtx whose register number is that passed
1056+ in the data parameter. Data parameter's rtx value is
1057+ set to the matching rtx if found. */
1058+
1059+static int
1060+reg_or_subreg_rtx_regno (rtx * x, void *data)
1061+{
1062+ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data;
1063+
1064+ if (REG_P (*x) && (REGNO (*x) == ldata->regno))
1065+ {
1066+ ldata->exp = *x;
1067+ return 1;
1068+ }
1069+ if (GET_CODE (*x) == SUBREG && (REGNO (SUBREG_REG (*x)) == ldata->regno))
1070+ {
1071+ ldata->exp = SUBREG_REG (*x);
1072+ return 1;
1073+ }
1074+ return 0;
1075+}
1076+
1077+/* Callback that counts the number of register operands
1078+ in an expression. Return 0 to allow all rtxs to be
1079+ traversed. */
1080+
1081+static int
1082+count_reg_operands (rtx * x, void *data)
1083+{
1084+ regspec_cb_data_t *ldata = (regspec_cb_data_t *) data;
1085+
1086+ if (register_exp (*x) != NULL)
1087+ {
1088+ ldata->regno++;
1089+ }
1090+ return 0;
1091+}
1092+
1093+/* Count the number of register operands in an expression.
1094+ We use the regspec_cb_data_t regno field as the number
1095+ of register operands we found in an expression. */
1096+
1097+static int
1098+num_reg_operands (rtx x)
1099+{
1100+ int rv;
1101+ regspec_cb_data_t data;
1102+ data.regno = 0;
1103+ data.exp = NULL_RTX;
1104+
1105+ if ((rv = for_each_rtx (&x, count_reg_operands, (void *) &data)) == 0)
1106+ return (data.regno); /* contains the count */
1107+ else
1108+ return 0;
1109+}
1110+
1111+/* Find the SUBREG or REG rtx corresponding to regno in the given rtx.
1112+ Return NULL_RTX if the regno rtx is not found. */
1113+
1114+static rtx
1115+find_regspec_regno (unsigned int regno, rtx x)
1116+{
1117+ int rv;
1118+ regspec_cb_data_t data;
1119+ data.regno = regno;
1120+ data.exp = NULL_RTX;
1121+
1122+ if ((rv = for_each_rtx (&x, reg_or_subreg_rtx_regno, (void *) &data)) != 0)
1123+ return (data.exp);
1124+ else
1125+ return NULL_RTX;
1126+}
1127+
1128+/* Find a REG or SUBREG rtx, starting at expr x.
1129+ Return NULL_RTX if no REG or SUBREG rtx is found.
1130+ If found, the rtx returned is a REG (not SUBREG) */
1131+
1132+static rtx
1133+find_regspec (rtx x)
1134+{
1135+ int rv;
1136+ regspec_cb_data_t data;
1137+ data.regno = -1; /* not used */
1138+ data.exp = NULL_RTX;
1139+
1140+ if ((rv = for_each_rtx (&x, reg_or_subreg_rtx, (void *) &data)) != 0)
1141+ return (data.exp);
1142+ else
1143+ return NULL_RTX;
1144+}
1145+
1146+/* Return true if the expression defines single register, regno. */
1147+
1148+static bool
1149+expr_defines_regno_p (rtx insn, unsigned int regno)
1150+{
1151+ rtx reg;
1152+ if (GET_CODE (insn) == SET)
1153+ {
1154+ reg = SET_DEST (insn);
1155+ if (find_regspec_regno (regno, reg) != NULL_RTX)
1156+ return true;
1157+ }
1158+ return false;
1159+}
1160+
1161+/* Return true if the insn defines a single register, regno.
1162+ Return false otherwise */
1163+
1164+static bool
1165+defines_regno_p (rtx insn_insn, unsigned int regno, int indent)
1166+{
1167+ extelim_uid_t uid = INSN_UID (insn_insn);
1168+ df_ref *p_def;
1169+
1170+ /* Get the operands defined */
1171+ p_def = DF_INSN_UID_DEFS (uid);
1172+
1173+ if (!p_def)
1174+ return false;
1175+
1176+ if (*(p_def + 1) != NULL)
1177+ {
1178+ if (dump_file)
1179+ fprintf (dump_file, "%*suid=%d defines multiple registers\n",
1180+ indent, " ", uid);
1181+ return false;
1182+ }
1183+
1184+ if (DF_REF_REGNO (*p_def) != regno)
1185+ {
1186+ if (dump_file)
1187+ fprintf (dump_file, "%*suid=%d defines does not define %d\n",
1188+ indent, " ", uid, regno);
1189+ return false;
1190+ }
1191+
1192+ return true;
1193+}
1194+
1195+/* The operand is already extended and the extension is compatible with
1196+ the originating extension with respect to type and size.
1197+ E.g. zero_extend:HI meets and AND r,#0xffff. Another example
1198+ is LSHIFT:SI left or right and zero_extend:SI, because the
1199+ instruction selected is rlwinm and clears the upper 32 bits.
1200+ Other examples in the code. Return true if a compatible extension
1201+ is found, false otherwise. */
1202+
1203+static bool
1204+operand_is_extended (rtx dest, rtx srcexp, int indent)
1205+{
1206+ /* Output of a CALL is already extended.
1207+ To ensure that the return value is not modified by the extend,
1208+ the extend from mode size must be at least the size of the CALL output.
1209+ Example - this is redundant since output of CALL is extended.
1210+ X:SI = CALL ...
1211+ Y:DI = sign_extend:DI (X:SI) */
1212+ if (GET_CODE (srcexp) == CALL
1213+ && (GET_MODE_BITSIZE (ext_from_mode)) >=
1214+ GET_MODE_BITSIZE (GET_MODE (dest)))
1215+ {
1216+ if (dump_file)
1217+ fprintf (dump_file,
1218+ "%*s...is extended already (CALL insn output)\n", indent,
1219+ " ");
1220+ return true;
1221+ }
1222+
1223+ /* Output is load immediate or load constant */
1224+ if (CONST_INT_P (srcexp))
1225+ {
1226+ bool is_extended;
1227+ if (ext_from_mode == QImode && (UINTVAL (srcexp) <= 0xff))
1228+ is_extended = true;
1229+ else if (ext_from_mode == HImode && (UINTVAL (srcexp) <= 0xffff))
1230+ is_extended = true;
1231+ else if (ext_from_mode == SImode && (UINTVAL (srcexp) <= 0xffffffff))
1232+ is_extended = true;
1233+ else
1234+ is_extended = false;
1235+
1236+ if (is_extended)
1237+ {
1238+ if (dump_file)
1239+ fprintf (dump_file,
1240+ "%*s... is extended already (CONST_INT load)\n", indent,
1241+ " ");
1242+ return true;
1243+ }
1244+ }
1245+
1246+ /* Sign extension of the same type as the originating extension.
1247+ Here the candidate defines the register used in the originating extension.
1248+ The originating extension will be replaced by a copy if it is found to be
1249+ redundant with respect to the candidate extension.
1250+ The candidate (this extension dest,src) must write the at least the same bits as the
1251+ originating extension in order to be redundant. So, we follow these rules:
1252+
1253+ cand_to_mode == machine mode of the destination for this candidate extension
1254+ cand_from_mode == machine mode of the source for this candidate extension
1255+ ext_to_mode == machine mode of the originating extension output
1256+ ext_from_mode == machine mode of the originating extension input
1257+
1258+ SIZE(cand_to_mode) >= SIZE(extend_to_mode) && SIZE(cand_from_mode) <= SIZE(extend_from_mode)
1259+
1260+ Example 1:
1261+ Candidate (HI->SI extension)
1262+ DI SI HI QI 0
1263+ | |<---| | |
1264+
1265+ Originating (SI->DI)
1266+ DI SI HI QI 0
1267+ |<-------| | | |
1268+
1269+ Not redundant, candidate does not cover the original bits:
1270+ SIZE(cand_to_mode)[SI] !>= SIZE(extend_to_mode)[DI]
1271+
1272+ Example 2:
1273+ Candidate (QI->DI extension)
1274+ DI SI HI QI 0
1275+ |<-------|----|--| |
1276+
1277+ Originating (HI->SI)
1278+ DI SI HI QI 0
1279+ | |<---| | |
1280+
1281+ Redundant, candidate covers the original bits:
1282+ SIZE(cand_to_mode) [DI] >= SIZE(extend_to_mode) [SI]
1283+ AND
1284+ SIZE(cand_from_mode) [QI] <= SIZE(extend_from_mode) [HI]
1285+ */
1286+ if (GET_CODE (srcexp) == ext_code)
1287+ {
1288+ enum machine_mode cand_from_mode = GET_MODE (XEXP (srcexp, 0));
1289+ enum machine_mode cand_to_mode = GET_MODE (dest);
1290+ if ((GET_MODE_BITSIZE (cand_to_mode) >= GET_MODE_BITSIZE (ext_to_mode))
1291+ && (GET_MODE_BITSIZE (cand_from_mode) <=
1292+ GET_MODE_BITSIZE (ext_from_mode)))
1293+ {
1294+ if (dump_file)
1295+ fprintf (dump_file,
1296+ "%*s...is already extended (redundant extension)\n",
1297+ indent, " ");
1298+ return true;
1299+ }
1300+ }
1301+
1302+ /* Encountered an insn with the same effect as extension, e.g.
1303+ AND (regspec) (const_int). E.g. AND (reg:SI) (0x7fff) is equivalent
1304+ to ZERO_EXTEND:DI (reg:HI) or SIGN_EXTEND:DI (reg:HI). The code selection
1305+ for AND zero extends the entire register, so we don't have to
1306+ check that srcexp extends to at least ext_to_mode size. */
1307+ if ((GET_CODE (srcexp) == AND) && CONST_INT_P (XEXP (srcexp, 1)))
1308+ {
1309+ if (ext_from_mode == QImode && (UINTVAL (XEXP (srcexp, 1)) <= 0x7f))
1310+ return true;
1311+ else if (ext_from_mode == HImode
1312+ && (UINTVAL (XEXP (srcexp, 1)) <= 0x7fff))
1313+ return true;
1314+ else if (ext_from_mode == SImode
1315+ && (UINTVAL (XEXP (srcexp, 1)) <= 0x7fffffff))
1316+ return true;
1317+ }
1318+
1319+ return false;
1320+}
1321+
1322+/* Determine if the operation allows us to continue the propagation.
1323+ We kill the propagation for all operations except copy. This
1324+ ensures that the extended operand that we may find eventually
1325+ is not modified by insns in the def-use chain. It's harsh,
1326+ but it's safest eliminate all but the most benign (copy) operations
1327+ in the propagation chain. */
1328+
1329+static bool
1330+continue_def_propagation (rtx dest, rtx srcexp, rtx src_operand, int indent)
1331+{
1332+ /* Only continue if its a copy -- that is, the srcexp is a register expression */
1333+ if ( register_exp (srcexp) )
1334+ return true;
1335+
1336+ return false;
1337+}
1338+
1339+/* Helper for insn_def_analysis_result.
1340+ The register operand, src is set here. Recall we
1341+ can only handle one register operand in the src expression.
1342+ We one of 3 states:
1343+ 1) Determine the operand is extended, ...DEF_EXTENDED returned.
1344+ 2) Determine the propagation can continue, ...DEF_CONTINUE_RECURSION returned.
1345+ 3) Otherwise, ...DEF_STOP_RECURSION is returned. */
1346+static enum insn_def_results
1347+insn_def_analysis_result_1 (rtx insn, bool treat_as_copy,
1348+ unsigned int regno_def ATTRIBUTE_UNUSED,
1349+ rtx * src, int indent)
1350+{
1351+ rtx dest, srcexp;
1352+ int num_operands;
1353+
1354+ /* Insn has to be an expression we can analyze */
1355+ if (GET_CODE (insn) != SET)
1356+ {
1357+ if (dump_file)
1358+ fprintf (dump_file, "%*s...is not a SET expression\n", indent, " ");
1359+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1360+ }
1361+ dest = SET_DEST (insn);
1362+ srcexp = SET_SRC (insn);
1363+
1364+ /* Dest must be a reg, not expression */
1365+ if (!REG_P (dest))
1366+ {
1367+ if (dump_file)
1368+ fprintf (dump_file,
1369+ "%*s...dest is not a simple register\n", indent, " ");
1370+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1371+ }
1372+
1373+ /* First check whether the operand is extended already. If so,
1374+ we can leave immediately successfully. */
1375+ if (operand_is_extended (dest, srcexp, indent) && !treat_as_copy)
1376+ return (EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED);
1377+
1378+
1379+ /* Failing to determine that the operand is already extended,
1380+ we have to validate that we have register operands to propagate. */
1381+ num_operands = num_reg_operands (srcexp);
1382+
1383+ /* At least one register operand required for propagation. */
1384+ if (num_operands == 0)
1385+ {
1386+ if (dump_file)
1387+ fprintf (dump_file,
1388+ "%*s...no register operands in RHS\n", indent, " ");
1389+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1390+ }
1391+
1392+ /* Only one register operand is allowed in the RHS since we can't
1393+ can't propagate more than one register. */
1394+ if (num_operands > 1)
1395+ {
1396+ if (dump_file)
1397+ fprintf (dump_file,
1398+ "%*s...found multiple register operands in RHS\n", indent,
1399+ " ");
1400+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1401+ }
1402+
1403+ /* Find the used operand in the src expression */
1404+ *src = find_regspec (srcexp);
1405+ if (*src == NULL_RTX || !mode_supported_p (*src))
1406+ {
1407+ if (dump_file)
1408+ fprintf (dump_file,
1409+ "%*s...src operand reg=%d cannot be found or is unsupported mode\n",
1410+ indent, " ", regno_def);
1411+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1412+ }
1413+
1414+ /* This is an extension, but it is previously marked to be transformed to a copy.
1415+ We just treat it as a copy even though it hasn't been transformed yet. So
1416+ continue the propagation. */
1417+ if (treat_as_copy)
1418+ {
1419+ if (dump_file)
1420+ fprintf (dump_file,
1421+ "%*s...%s is treated as a copy (marked for replace)\n",
1422+ indent, " ", GET_RTX_NAME (GET_CODE (srcexp)));
1423+ return (EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION);
1424+ }
1425+
1426+ /* Validate that it's ok to continue propagation with this operand. */
1427+ if (continue_def_propagation (dest, srcexp, *src, indent))
1428+ return (EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION);
1429+
1430+ /* Else we default to halting the search for a redundant extension */
1431+ return (EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION);
1432+}
1433+
1434+/* Determine if the insn extends it's destination register in
1435+ a manner such that the original extension is redundant. */
1436+
1437+static enum insn_def_results
1438+insn_def_analysis_result (rtx insn_insn, unsigned int regno_def, rtx * src,
1439+ int indent)
1440+{
1441+ bool treat_as_copy = false;
1442+
1443+ /* Insn must only define one output */
1444+ if (!defines_regno_p (insn_insn, regno_def, indent))
1445+ {
1446+ if (dump_file)
1447+ fprintf (dump_file,
1448+ "%*s...defines more than 1 output\n", indent, " ");
1449+ return EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1450+ }
1451+
1452+ /* We want to treat this extension as a copy and continue propagation.
1453+ Otherwise, it would be detected again as redundant. */
1454+ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (insn_insn)))
1455+ {
1456+ if (dump_file)
1457+ fprintf (dump_file,
1458+ "%*suse at uid=%d is marked to transform to copy\n", indent,
1459+ " ", INSN_UID (insn_insn));
1460+ treat_as_copy = true;
1461+ }
1462+
1463+ /* Do the analysis */
1464+ return (insn_def_analysis_result_1
1465+ (PATTERN (insn_insn), treat_as_copy, regno_def, src, indent));
1466+}
1467+
1468+/* Analyze each of the expressions in a PARALLEL expression. As each of
1469+ the expressions may yield a different state, select the most conservative
1470+ state to return. */
1471+
1472+static enum insn_def_results
1473+insn_def_analysis_2 (rtx insn_def, unsigned int regno_def, rtx * src,
1474+ int indent)
1475+{
1476+ int i;
1477+ rtx insn = PATTERN (insn_def);
1478+ enum insn_def_results action;
1479+ enum insn_def_results return_action =
1480+ EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION;
1481+
1482+ gcc_assert (GET_CODE (insn) == PARALLEL);
1483+
1484+ for (i = XVECLEN (insn, 0) - 1; i >= 0; i--)
1485+ {
1486+ rtx body = XVECEXP (insn, 0, i);
1487+ /* Only act on the expressions that define regno_def */
1488+ if (!expr_defines_regno_p (body, regno_def))
1489+ continue;
1490+ /* Determine the next action */
1491+ action = insn_def_analysis_result_1 (body, false /* treat_as_copy */ ,
1492+ regno_def, src, indent);
1493+ /* The result of this expression stops the recursion, i.e. no
1494+ longer reasonable to continue looking at further recursion. */
1495+ if (action == EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION)
1496+ return action;
1497+ /* Only return EXTENDED if there are no other different actions
1498+ in the series. Otherwise, CONTINUE_RECURSION is returned. */
1499+ if (action == EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION)
1500+ return_action = action;
1501+ else if (return_action ==
1502+ EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION)
1503+ return_action = EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION;
1504+ else
1505+ return_action = action;
1506+ }
1507+ return (return_action);
1508+}
1509+
1510+/* Helper 1 for insn_def_analysis */
1511+
1512+static enum insn_def_results
1513+insn_def_analysis_1 (rtx insn_def, unsigned int regno_def, rtx * src,
1514+ int indent)
1515+{
1516+ rtx def = PATTERN (insn_def);
1517+ enum insn_def_results action;
1518+
1519+ switch (GET_CODE (def))
1520+ {
1521+ case PARALLEL:
1522+ action = insn_def_analysis_2 (insn_def, regno_def, src, indent);
1523+ break;
1524+ default:
1525+ action = insn_def_analysis_result (insn_def, regno_def, src, indent);
1526+ break;
1527+ }
1528+ return action;
1529+}
1530+
1531+/* We look at the definition of a register that is either the
1532+ sign or zero extend source register or a definition that that
1533+ has been propagated to here via analyze_ext_def. The objective
1534+ is to determine, by looking at the operation and operands, whether
1535+ the register is sign/zero extended by virtue of the operation and/or
1536+ operands. If so, the original extension is redundant.
1537+ The function returns one of 3 possible states after analyzing the
1538+ insn:
1539+ 1. EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED - we determined that the
1540+ insn does indeed extend the original source extension register.
1541+ analyze_ext_def returns FALSE, therefore, ending the recursion
1542+ and propagation.
1543+ 2. EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION - we determined that
1544+ the insn does not meet the criteria to continue the recursive search.
1545+ Some conditions causing this may be multiple operands defining this
1546+ register (we only propagate on a single input operand) or the insn
1547+ defines more than one output or the operation does not allow
1548+ a previous extension to propagate, e.g. an arithmetic shift on
1549+ a SI value clears the upper bits using rlwinm. MUL, DIV, MOD
1550+ stop recursion because the result is longer than the input size,
1551+ thus impacting the possible previous extension.
1552+ 3. EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION - we found an
1553+ operation with one register operand and the operation will not
1554+ affect a previous extension if one exists. ADD, SUB are examples.
1555+ We continue looking up the chain at the definition of the operand
1556+ for an extended result.
1557+ If we run into a previous extension marked for replacement during
1558+ recursion, we treat it as a copy (CONTINUE_RECURSION since the
1559+ extension is preserved by the copy). */
1560+
1561+static enum insn_def_results
1562+insn_def_analysis (rtx insn_def, unsigned int regno_def, rtx * src,
1563+ int indent)
1564+{
1565+ return (insn_def_analysis_1 (insn_def, regno_def, src, indent));
1566+}
1567+
1568+/* Analyze the insn defining the source of the sign extension.
1569+ If it can be determined that the definition is already
1570+ sign extended, return false. Otherwise, return true if
1571+ extension is needed. */
1572+
1573+static bool
1574+analyze_ext_def (rtx insn_def, unsigned int regno_def, int indent)
1575+{
1576+ extelim_uid_t uid;
1577+ rtx def = PATTERN (insn_def);
1578+ rtx src;
1579+ df_ref df_def, *p_use;
1580+ bool ext_needed, indent_once;
1581+ struct df_link *link;
1582+ enum insn_def_results analysis_result;
1583+
1584+ gcc_assert (def != NULL);
1585+
1586+ uid = INSN_UID (insn_def);
1587+
1588+ /* If we seen the originating extension again, return false (ext not needed) */
1589+ if (current_ext_record->ext == insn_def)
1590+ {
1591+ if (dump_file)
1592+ fprintf (dump_file,
1593+ "%*sdef at uid=%d is original extension\n", indent, " ", uid);
1594+ return false;
1595+ }
1596+
1597+ /* The recursion has to definitively end with an operand being
1598+ extended (and compatible with the originating extension). If
1599+ we see the insn again, this could return a faulty positive (false),
1600+ so we return true here instead of false. See pr43017 (-funroll-loops)
1601+ as an example. */
1602+ if (insn_flag_p (EXTELIM_SEEN, uid))
1603+ {
1604+ if (dump_file)
1605+ fprintf (dump_file,
1606+ "%*sdef at uid=%d is visited already\n", indent, " ", uid);
1607+ return true;
1608+ }
1609+
1610+ /* Mark this insn as seen */
1611+ insn_flag_set (EXTELIM_SEEN, uid);
1612+
1613+ analysis_result = insn_def_analysis (insn_def, regno_def, &src, indent);
1614+ switch (analysis_result)
1615+ {
1616+ /* We know conclusively that the register defined in this expression
1617+ is already extended. */
1618+ case EXTELIM_ANALYSIS_RESULT_DEF_EXTENDED:
1619+ if (dump_file)
1620+ fprintf (dump_file, "%*sdef at uid=%d is extended\n", indent, " ",
1621+ uid);
1622+ return false;
1623+ break;
1624+ /* We know conclusively that we cannot continue the recursion. Perhaps
1625+ the expression defines multiple registers, etc. */
1626+ case EXTELIM_ANALYSIS_RESULT_DEF_STOP_RECURSION:
1627+ if (dump_file)
1628+ fprintf (dump_file, "%*sdef at uid=%d cannot be propagated\n", indent,
1629+ " ", uid);
1630+ return true;
1631+ break;
1632+ /* Continue to look at the operands of this expression. They may be extended
1633+ already. */
1634+ case EXTELIM_ANALYSIS_RESULT_DEF_CONTINUE_RECURSION:
1635+ break;
1636+ default:
1637+ gcc_unreachable ();
1638+ }
1639+
1640+ /* This is the operand for which we want to find definitions. There should
1641+ only be one operand as we have previously checked for operations with only
1642+ one register operand as the src previously. */
1643+ p_use = DF_INSN_UID_USES (uid);
1644+ gcc_assert (p_use != NULL);
1645+
1646+ /* Make sure that this use is the one returned in src. Otherwise we simply
1647+ stop the propagation. Note the DF_INSN_UID_USES works at the insn
1648+ level, so a PARALLEL pattern may return many uses, hence the need
1649+ to validate the correct use here. */
1650+ if ((*p_use == NULL) || (DF_REF_REGNO (*p_use) != REGNO (src)))
1651+ return true;
1652+
1653+ ext_needed = true;
1654+ indent_once = true;
1655+ for (link = DF_REF_CHAIN (*p_use); link; link = link->next)
1656+ {
1657+ rtx insn_def;
1658+ df_def = link->ref;
1659+ if (!df_def)
1660+ continue;
1661+ /* Link must be to a definition of the use */
1662+ if (!DF_REF_REG_DEF_P (df_def))
1663+ continue;
1664+ /* Ignore ARTIFICIAL defs */
1665+ if (DF_REF_IS_ARTIFICIAL (df_def))
1666+ continue;
1667+ insn_def = DF_REF_INSN (df_def);
1668+ /* Don't consider debug_insns */
1669+ if (!NONDEBUG_INSN_P (insn_def))
1670+ continue;
1671+ if (dump_file)
1672+ fprintf (dump_file,
1673+ "%*sdef of reg=%d at uid=%d\n", indent, " ",
1674+ DF_REF_REGNO (df_def), INSN_UID (insn_def));
1675+ /* Set indent for dump formatting */
1676+ if (indent_once)
1677+ {
1678+ ++indent;
1679+ indent_once = false;
1680+ }
1681+ ext_needed = analyze_ext_def (insn_def, DF_REF_REGNO (df_def), indent);
1682+ if (ext_needed)
1683+ break;
1684+ }
1685+
1686+ if (dump_file)
1687+ fprintf (dump_file,
1688+ "%*sext %s needed\n", indent, " ", ext_needed ? "" : "not");
1689+
1690+ return ext_needed;
1691+}
1692+
1693+/* Determine whether the expression needs to be saved for this extension.
1694+ The expression will be updated in some way if the extension is ultimately
1695+ eliminated. */
1696+
1697+static bool
1698+exp_needs_update_p (rtx exp)
1699+{
1700+ if (GET_CODE (exp) == SUBREG
1701+ && (SUBREG_PROMOTED_VAR_P (exp)))
1702+ {
1703+ return true;
1704+ }
1705+ return false;
1706+}
1707+
1708+/* Some expressions may need to be updated if the originating extension
1709+ is eliminated. For example, SUBREG_PROMOTED flags on uses are no longer
1710+ valid if the extension is eliminated. Save the expression here. */
1711+
1712+static void
1713+save_ext_update (ext_record_t extrec, rtx exp)
1714+{
1715+ /* Save this expression to be updated if the extension is eliminated. */
1716+ VEC_safe_push (rtx, heap, extrec->ext_updates, exp);
1717+}
1718+
1719+/* Check a compare operation to determine whether the operands
1720+ of the compare use the upper bits of the extension. Return
1721+ true if the upper bits are not relevant in the compare, false
1722+ otherwise. */
1723+
1724+static bool
1725+check_compare (rtx dest, rtx src)
1726+{
1727+ /* Detect
1728+ (set (reg:CC r0) (compare:CC (REGSPEC) (REGSPEC)))
1729+ or
1730+ (set (reg:CC r0) (compare:CC (REGSPEC) (CONST)))
1731+ where REGSPEC is (reg:mm r) or (subreg:mm (reg:MM r) n)
1732+ CONST is a constant integer.
1733+ The mode size of compare ops must be less than the
1734+ mode of the original extension for the upper bits to
1735+ be irrelevant.
1736+ An exception is made for mode sizes less than a word size.
1737+ For our targets, there is no 'cmph' insn, so we bail out
1738+ if we see a comparison of sizes less than a word (SI). */
1739+ if (REG_P (dest)
1740+ && (GET_MODE (dest) == CCmode || GET_MODE (dest) == CCUNSmode)
1741+ && GET_CODE (src) == COMPARE
1742+ && (GET_MODE (src) == CCmode || GET_MODE (src) == CCUNSmode))
1743+ {
1744+ rtx compare_op0 = XEXP (src, 0);
1745+ rtx compare_op1 = XEXP (src, 1);
1746+
1747+ /* Check the first operand, op0, size. */
1748+ if ((REG_P (compare_op0) || GET_CODE (compare_op0) == SUBREG)
1749+ && (GET_MODE_BITSIZE (GET_MODE (compare_op0)) <=
1750+ GET_MODE_BITSIZE (ext_from_mode)))
1751+ {
1752+ /* Half word compares and smaller are performed as word compares, so upper bits are used. */
1753+ if (GET_MODE_BITSIZE (GET_MODE (compare_op0)) < SImode)
1754+ return false;
1755+
1756+ /* Now check the other operand, op1. */
1757+ if ((REG_P (compare_op1) || GET_CODE (compare_op1) == SUBREG)
1758+ && (GET_MODE_BITSIZE (GET_MODE (compare_op1)) <=
1759+ GET_MODE_BITSIZE (ext_from_mode)))
1760+ return true;
1761+
1762+ /* Compare to constant, we know op0 already meets size constraints. */
1763+ if (CONST_INT_P (compare_op1))
1764+ return true;
1765+ }
1766+ }
1767+ return false;
1768+}
1769+
1770+/* Determine condition a, whether the upper bits are relevant to the operation.
1771+ Return false if we prove the upper bits are not relevant in the operation,
1772+ true otherwise. */
1773+
1774+static bool
1775+operation_uses_upper_bits (rtx dest, rtx src, unsigned int regno_use,
1776+ int indent ATTRIBUTE_UNUSED)
1777+{
1778+ rtx regspec_src = find_regspec_regno (regno_use, src);
1779+
1780+ if (check_compare (dest, src))
1781+ return false;
1782+
1783+ /* Store of regno to mem, size stored is the same or smaller than the extended from size */
1784+ if (MEM_P (dest)
1785+ && (GET_MODE_BITSIZE (GET_MODE (dest)) <=
1786+ GET_MODE_BITSIZE (ext_from_mode))
1787+ /* Ensure the used register is being stored and not used in another capacity, say, as a pointer. */
1788+ && (regspec_src))
1789+ return false;
1790+
1791+ /* Operation operand size is the same or smaller than the extended from size */
1792+ if (regspec_src)
1793+ {
1794+ if (GET_MODE_BITSIZE (GET_MODE (regspec_src)) <=
1795+ GET_MODE_BITSIZE (ext_from_mode))
1796+ return false;
1797+ }
1798+
1799+ /* Default to the safest result */
1800+ return true;
1801+}
1802+
1803+/* Determine if this insn also extends to the size or greater of the original extension.
1804+ Sign extend can propagate to zero extend and vice-versa because the upper bits
1805+ haven't affected the low bits up to now throughout the propagation. */
1806+
1807+static bool
1808+operation_extends_to_upper_bits_size (rtx src, int indent ATTRIBUTE_UNUSED)
1809+{
1810+ /* Sign extension of the same type as the originating extension.
1811+ Here the candidate uses the register defined by the originating extension.
1812+ If the candidate is found to be redundant, the originating extension is
1813+ replaced with a copy.
1814+
1815+ We follow these rules:
1816+
1817+ dest_mode == machine mode of the destination for this candidate extension
1818+ (it's the same mode as the src, e,g, reg:DI = sign_extend:DI ...)
1819+ src_mode == machine mode of the source for this candidate extension
1820+ (the mode of the used register, SI in this case, e.g. reg:DI = sign_extend:DI (subreg:SI (reg:DI))
1821+ ext_to_mode == machine mode of the originating extension output
1822+ ext_from_mode == machine mode of the originating extension input
1823+
1824+ SIZE(cand_from_mode) >= SIZE(extend_from_mode) && SIZE(cand_to_mode) <= SIZE(extend_to_mode)
1825+
1826+ Example 1:
1827+ Originating (SI->DI)
1828+ DI SI HI QI 0
1829+ |<-------| | | |
1830+
1831+ Candidate (HI->SI extension)
1832+ DI SI HI QI 0
1833+ | |<---| | |
1834+
1835+ Not redundant, candidate does not cover the original bits:
1836+ SIZE(dest_mode)[SI] !<= SIZE(extend_to_mode)[DI]
1837+
1838+ Example 2:
1839+ Originating (HI->SI)
1840+ DI SI HI QI 0
1841+ | |<---| | |
1842+
1843+ Candidate (QI->DI extension)
1844+ DI SI HI QI 0
1845+ |<-------|----|--| |
1846+
1847+ Redundant, candidate covers the original bits:
1848+ SIZE(cand_to_mode) [DI] >= SIZE(extend_to_mode) [SI]
1849+ AND
1850+ SIZE(cand_from_mode) [QI] <= SIZE(extend_from_mode) [HI] */
1851+ if (GET_CODE (src) == ext_code)
1852+ {
1853+ /* Extend is redundant if we don't overwrite the source of the
1854+ previous extension and extends to at least the extent of the original. */
1855+ enum machine_mode cand_from_mode = GET_MODE (XEXP (src, 0));
1856+ enum machine_mode cand_to_mode = GET_MODE (src);
1857+ if (GET_MODE_BITSIZE (cand_from_mode) >=
1858+ GET_MODE_BITSIZE (ext_from_mode)
1859+ && (GET_MODE_BITSIZE (cand_to_mode) <=
1860+ GET_MODE_BITSIZE (ext_to_mode)))
1861+ return true;
1862+ }
1863+
1864+ /* Encountered an insn with the same effect as extension, e.g.
1865+ AND (regspec) (const_int). E.g. AND (reg:SI) (0xffff) is equivalent
1866+ to ZERO_EXTEND:DI (reg:HI) */
1867+ if ((GET_CODE (src) == AND) && CONST_INT_P (XEXP (src, 1)))
1868+ {
1869+ /* Extends to at least the original extension size */
1870+ if (GET_MODE_BITSIZE (GET_MODE (src)) >= GET_MODE_BITSIZE (ext_to_mode))
1871+ {
1872+ if (ext_from_mode == QImode && (UINTVAL (XEXP (src, 1)) <= 0xff))
1873+ return true;
1874+ else if (ext_from_mode == HImode
1875+ && (UINTVAL (XEXP (src, 1)) <= 0xffff))
1876+ return true;
1877+ else if (ext_from_mode == SImode
1878+ && (UINTVAL (XEXP (src, 1)) <= 0xffffffff))
1879+ return true;
1880+ else
1881+ return false;
1882+ }
1883+ }
1884+ return false;
1885+}
1886+
1887+/* Determine whether the operation's upper bits subtly or overtly affects the low bits. */
1888+
1889+static bool
1890+operation_implicitly_affects_lowbits (rtx dest, rtx src,
1891+ unsigned int regno_use, int indent)
1892+{
1893+ rtx regspec = find_regspec_regno (regno_use, src);
1894+
1895+ /* First, a return expression must be assumed to affect the lowbits as the return value
1896+ must be extended properly. */
1897+ if (return_val_p (dest))
1898+ {
1899+ if (dump_file)
1900+ {
1901+ fprintf (dump_file, "%*sDestination is a return value\n", indent,
1902+ " ");
1903+ }
1904+ return true;
1905+ }
1906+
1907+ /* These operations implicitly affect the lowbits, except where noted. */
1908+ switch (GET_CODE (src))
1909+ {
1910+ case MULT:
1911+ case DIV:
1912+ case UDIV:
1913+ case UMOD:
1914+ case MOD:
1915+ /* Normally, yes, these operations return true (affects low bits). But when the
1916+ the operand size is less than or equal to the "low bits" size AND the operation size
1917+ is the same as the operand size, the operation is performed only on the "low bits"
1918+ and the "upper bits" do not contribute to the output. */
1919+ if (regspec
1920+ && (GET_MODE_BITSIZE (GET_MODE (regspec)) <=
1921+ GET_MODE_BITSIZE (ext_from_mode))
1922+ && GET_MODE_BITSIZE (GET_MODE (src)) ==
1923+ GET_MODE_BITSIZE (GET_MODE (regspec)))
1924+ return false;
1925+ return true;
1926+
1927+ break;
1928+ /* Shift rights normally affect the low bits. There can be special cases where this
1929+ is not true, such a the operand size is smaller than the extended from size, e.g.
1930+ set (reg:SI Y) (zero_extend:SI (subreg:HI (reg:SI X)))
1931+ set (reg:QI Z) (lshiftrt (subreg:QI (reg:SI Y))
1932+ The shift of the QI data is not affected by the extension of HI data unless the
1933+ shift is large enough to encroach into the QI bits. This seems rare and I do not
1934+ check for it. */
1935+ case LSHIFTRT:
1936+ case ASHIFTRT:
1937+ return true;
1938+ break;
1939+ /* Other operations are known not to impact the low bits */
1940+ default:
1941+ return false;
1942+ }
1943+
1944+}
1945+
1946+/* The operation directly defines a propagatable output. Several
1947+ operations do not define such output. E.g. MEM (loads) do not
1948+ define an output based on the operation. USE is another example,
1949+ as it isn't a real operation. */
1950+
1951+static bool
1952+operation_directly_defines_an_output (rtx dest, rtx src,
1953+ int indent ATTRIBUTE_UNUSED)
1954+{
1955+ switch (GET_CODE (src))
1956+ {
1957+ case REG:
1958+ case SUBREG:
1959+ case PLUS:
1960+ case MINUS:
1961+ case NEG:
1962+ case MULT:
1963+ case DIV:
1964+ case MOD:
1965+ case UDIV:
1966+ case UMOD:
1967+ case AND:
1968+ case IOR:
1969+ case XOR:
1970+ case NOT:
1971+ case ASHIFT:
1972+ case ROTATE:
1973+ case ASHIFTRT:
1974+ case LSHIFTRT:
1975+ case ROTATERT:
1976+ case SIGN_EXTEND:
1977+ case ZERO_EXTEND:
1978+ case TRUNCATE:
1979+ return true;
1980+ break;
1981+ /* OK to propagate if the output of IF_THEN_ELSE is a register */
1982+ case IF_THEN_ELSE:
1983+ if (REG_P (dest))
1984+ return true;
1985+ break;
1986+ /* All others are assumed not to generate a normal output */
1987+ default:
1988+ break;
1989+ }
1990+ return false;
1991+}
1992+
1993+/* Helper for insn_use_analysis_result */
1994+
1995+static enum insn_use_results
1996+insn_use_analysis_result_1 (rtx insn, bool treat_as_copy,
1997+ unsigned int regno_use, rtx * dest, int indent)
1998+{
1999+ rtx src;
2000+ bool cond_a, cond_b, cond_c, cond_d;
2001+
2002+ if (GET_CODE (insn) != SET)
2003+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2004+
2005+ *dest = SET_DEST (insn);
2006+ src = SET_SRC (insn);
2007+
2008+ /* Bail out on inline assembly also */
2009+ if (GET_CODE (src) == ASM_INPUT || GET_CODE (src) == ASM_OPERANDS)
2010+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2011+
2012+ /* Bail out on non supported types */
2013+ if (!mode_supported_p (*dest))
2014+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2015+
2016+ /* First, we determine cond_c (is a redundant extension) because it gates the
2017+ other conditions. */
2018+ if ((cond_c = operation_extends_to_upper_bits_size (src, indent)))
2019+ {
2020+ if (treat_as_copy)
2021+ {
2022+ if (dump_file)
2023+ fprintf (dump_file,
2024+ "%*s...%s is treated as a copy (marked for replace)\n",
2025+ indent, " ", GET_RTX_NAME (GET_CODE (src)));
2026+ return EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION;
2027+ }
2028+
2029+ if (dump_file)
2030+ fprintf (dump_file,
2031+ "%*s...%s is a redundant extension\n",
2032+ indent, " ", GET_RTX_NAME (GET_CODE (src)));
2033+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED;
2034+ }
2035+
2036+ cond_a = operation_uses_upper_bits (*dest, src, regno_use, indent);
2037+
2038+ cond_b =
2039+ operation_implicitly_affects_lowbits (*dest, src, regno_use, indent);
2040+
2041+ cond_d = operation_directly_defines_an_output (*dest, src, indent);
2042+
2043+ /* Operation implicitly affects low bits */
2044+ if (cond_b)
2045+ {
2046+ if (dump_file)
2047+ fprintf (dump_file,
2048+ "%*s...%s implicitly affects low bits\n",
2049+ indent, " ", GET_RTX_NAME (GET_CODE (src)));
2050+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2051+ }
2052+
2053+ /* Neither cond_a nor cond_b affects the low bits */
2054+ if (!cond_a)
2055+ {
2056+ if (dump_file)
2057+ fprintf (dump_file,
2058+ "%*s...%s does not use upper bits\n",
2059+ indent, " ", GET_RTX_NAME (GET_CODE (src)));
2060+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED;
2061+ }
2062+
2063+ /* To continue recursion, the operation must define a
2064+ meaningful output. */
2065+ if (!cond_d)
2066+ {
2067+ if (dump_file)
2068+ fprintf (dump_file,
2069+ "%*s...%s does not define a propagatable output\n",
2070+ indent, " ", GET_RTX_NAME (GET_CODE (src)));
2071+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2072+ }
2073+
2074+ /* This leaves cond_a, meaning we need to continue down the chain
2075+ to see if the low bits are ultimately affected by the upper bits. */
2076+ return EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION;
2077+}
2078+
2079+/* Determine the action based on the insn conditions. The truth table is
2080+ simplified using if statements. Insns previously marked for replace by copy
2081+ are identified, these will be essentially be treated as copies now and not
2082+ be detected as redundant for this use. */
2083+static enum insn_use_results
2084+insn_use_analysis_result (rtx insn_insn, unsigned int regno_use, rtx * dest,
2085+ int indent)
2086+{
2087+ bool treat_as_copy = false;
2088+ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (insn_insn)))
2089+ {
2090+ if (dump_file)
2091+ fprintf (dump_file,
2092+ "%*suse at uid=%d is marked to transform to copy\n", indent,
2093+ " ", INSN_UID (insn_insn));
2094+ treat_as_copy = true;
2095+ }
2096+ return (insn_use_analysis_result_1
2097+ (PATTERN (insn_insn), treat_as_copy, regno_use, dest, indent));
2098+}
2099+
2100+/* We have to analyze each expression action in a PARALLEL series.
2101+ Return the appropriate action for a series of expressions in a PARALLEL insn.
2102+ LOWBITS_AFFECTED stops the loop. This leaves only CONTINUE_RECURSION
2103+ or LOWBITS_NOT_AFFECTED. LOWBITS_NOT_AFFECTED is only returned
2104+ if there are no other different actions in the series (no CONTINUE_RECURSION
2105+ states). For each CONTINUE_RECURSION action we encounter, the destination
2106+ registers must be identical since we can only propagate one use (one definition
2107+ of dest) should CONTINUE_RECURSION be returned. */
2108+
2109+static enum insn_use_results
2110+analyze_action (enum insn_use_results cur_action,
2111+ enum insn_use_results prev_action,
2112+ rtx * dest, rtx * prev_dest)
2113+{
2114+ enum insn_use_results return_action;
2115+
2116+ if (cur_action == EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED)
2117+ return cur_action;
2118+
2119+ if (cur_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION)
2120+ return_action = cur_action;
2121+ else if (prev_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION)
2122+ return_action = EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION;
2123+ else
2124+ return_action = cur_action;
2125+
2126+ if (return_action == EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION)
2127+ {
2128+ if (*prev_dest)
2129+ {
2130+ /* All bets off if the series defines multiple outputs */
2131+ if (*prev_dest != *dest)
2132+ return_action = EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2133+ }
2134+ }
2135+ /* Set prev_dest */
2136+ *prev_dest = *dest;
2137+
2138+ return return_action;
2139+}
2140+
2141+/* Helper 2 for insn_use_analysis. Return the appropriate action
2142+ for a series of expressions in a PARALLEL insn. */
2143+
2144+static enum insn_use_results
2145+insn_use_analysis_2 (rtx insn_use, unsigned int regno_use, rtx * dest,
2146+ int indent)
2147+{
2148+ int i;
2149+ rtx insn = PATTERN (insn_use);
2150+ rtx prev_dest = NULL_RTX;
2151+ enum insn_use_results action;
2152+ enum insn_use_results return_action =
2153+ EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED;
2154+
2155+ gcc_assert (GET_CODE (insn) == PARALLEL);
2156+
2157+ /* We make a quick decision about call_insns here. Since the use reached
2158+ a call, we assume it's an outgoing parameter and thus must be extended
2159+ as per the ABI. */
2160+ if (CALL_P (insn_use))
2161+ {
2162+ if (dump_file)
2163+ fprintf (dump_file, "%*s...is a call parameter\n", indent, " ");
2164+ return EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED;
2165+ }
2166+
2167+ for (i = XVECLEN (insn, 0) - 1; i >= 0; i--)
2168+ {
2169+ rtx body = XVECEXP (insn, 0, i);
2170+ /* Only act on the expressions containing a use of regno_use. */
2171+ if (regno_use_in (regno_use, body) == NULL_RTX)
2172+ continue;
2173+
2174+ /* Determine the next action */
2175+ action = insn_use_analysis_result_1 (body, false /* treat as copy */ ,
2176+ regno_use, dest, indent);
2177+
2178+ /* Here we make a decision on the return action based on the previous actions.
2179+ This is done to accomodate different actions from different elements in the
2180+ PARALLEL series of expressions. */
2181+ return_action =
2182+ analyze_action (action, return_action, dest, &prev_dest);
2183+
2184+ /* The result of this expression stops the recursion, i.e. "low bits"
2185+ are affected by the operation. */
2186+ if (return_action == EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED)
2187+ break;
2188+ }
2189+ return (return_action);
2190+}
2191+
2192+/* Helper 1 for insn_use_analysis */
2193+
2194+static enum insn_use_results
2195+insn_use_analysis_1 (rtx insn_use, unsigned int regno_use, rtx * dest,
2196+ int indent)
2197+{
2198+ rtx use = PATTERN (insn_use);
2199+ enum insn_use_results action;
2200+
2201+ switch (GET_CODE (use))
2202+ {
2203+ case PARALLEL:
2204+ action = insn_use_analysis_2 (insn_use, regno_use, dest, indent);
2205+ break;
2206+ default:
2207+ action = insn_use_analysis_result (insn_use, regno_use, dest, indent);
2208+ break;
2209+ }
2210+
2211+ return action;
2212+}
2213+
2214+/* Analyze the insn and determine the next course of action in the
2215+ use analysis loop.
2216+ There are several conditions to consider:
2217+
2218+ 1. The "extended from" mode. This is an enum machine_mode value
2219+ that determines what is the size extended. It is derived from the
2220+ source of the original extension. It is the "low bits" value.
2221+ It is these range of bits that cannot be affected by the operation's
2222+ "upper bits" in order to determine whether the extend is useful or not.
2223+ Examples:
2224+ (1) set (reg:DI Y (zero_extend:DI (subreg:QI (reg:DI X))) ==> low bits = QI
2225+ (2) set (reg:SI Y (sign_extend:SI (reg:HI X) ==> low bits = HI
2226+
2227+ 2. The "extend to" mode. This is the size extended to in the original
2228+ extension. It is the "upper bits" value. The entire extended to size may
2229+ be used subsequently or it may be subreg'd to a smaller or larger sizes
2230+ later in the propagation.
2231+ For example (1) above, "upper bits" is DI, and (2) "upper bits" is SI.
2232+
2233+ 3. The code, ext_code, of the original extension, either ZERO_EXTEND or SIGN_EXTEND.
2234+
2235+ 4. Operation code. For an insn, the actual operation code corresponding to
2236+ a machine instruction. For certain codes, we know that the "low bits" of the
2237+ result are modified by the insn because of the values in the "upper bits" of the
2238+ input operand. We say the operation implicitly uses the "upper bits" to modify the
2239+ "low bits". For other codes, the "upper bits" do not affect the output result
2240+ in the "low bits".
2241+
2242+ If the operation does implicitly use the "upper bits" to modify
2243+ the "low bits", it is instantly a deal killer. The original extension must be
2244+ preserved.
2245+
2246+ If the operation does not implicitly use "upper bits" to modify the "low bits",
2247+ then the action to take depends on the operation operand size relative to
2248+ "low bits" size.
2249+
2250+ We only want to deal with codes that map to real instructions,
2251+ like ADD, SUB, MULT, LSHIFTRT, etc. Codes such as PARALLEL, etc. do not map to
2252+ instruction and must be dissected to extract the real instructions.
2253+
2254+ Furthermode, for recursion to continue, the operation and operand must define
2255+ an output related to the input operand (the use register). This doesn't happen
2256+ for operations such as "mem" where the output is indirectly related to the
2257+ input operand.
2258+
2259+ 5. Operation mode. The operation mode of the operation code. This sometimes impacts
2260+ the effect of the operation. For example MULT:SI and MULT:DI map to two different
2261+ machine instructions and both may have operands of SI mode. However, the MULT:SI
2262+ results will be oblivious to the upper bits of the DI register whereas, SI part of
2263+ MULT:DI result will be affected by the upper bits of the DI register.
2264+
2265+ Several conditions determine the action to take based on the various inputs.
2266+
2267+ The truth table inputs are A, B, and C. The truth table output is the action to take.
2268+
2269+ A. True if the used operand mode size is greater than the extended_from ("low bits") mode size.
2270+ B. True if the operation implicitly uses upper bits to define the low bits
2271+ C. True if the operation also extends the output to upper bits size
2272+ D. True if the operation and input operand directly define an output operand.
2273+
2274+ Condition A. means the upper bits are in use in the operation. The extend _may_ be needed,
2275+ all things being equal, so the action would be to continue recursion to the use of the
2276+ defined operand, i.e. return CONTINUE_RECURSION.
2277+
2278+ Condition B. means the "low bits" are modified by the extended portion of the register
2279+ by virtue of the operation. For example, logical shift right, where the extended
2280+ portion is shifted into the "low bits". Another example, multiply, where the machine
2281+ uses the extended portion implicitly to calculate the results, some of which are
2282+ reflected in the "low bits" of the result. The extension is definitely needed in these
2283+ cases for this use, so return LOWBITS_AFFECTED. Recursion is stopped and analysis of
2284+ this extension is halted.
2285+
2286+ Condition C. means the operation and it's operands perform the same extension as
2287+ the originating extension. The operation must extend to the same size _or higher_ of
2288+ the original extension. In this case, the original extension is truly redundant and
2289+ we return LOWBITS_NOT_AFFECTED for this use.
2290+
2291+ Condtion D. means the operation and operand directly define an output operand. For most
2292+ arithmetic and unary operations this is true. For mem and other internal operations,
2293+ e.g. USE, this is false.
2294+
2295+ Condition Action Comments
2296+ ==================================================================
2297+ A. B. C. D.
2298+ ------------------------------------------------------------------
2299+ X X true true LOW_BITS_NOT_AFFECTED extend is redundant
2300+ ------------------------------------------------------------------
2301+ false false false X LOW_BITS_NOT_AFFECTED used operand is smaller than "low bits"
2302+ ------------------------------------------------------------------
2303+ false true false true LOW_BITS_AFFECTED "low bits" modified implicitly by operation
2304+ ------------------------------------------------------------------
2305+ true false false true CONTINUE_RECURSION "low bits" _may_ be impacted by next uses
2306+ ------------------------------------------------------------------
2307+ true true false true LOW_BITS_AFFECTED "low bits" modified implicitly by operation */
2308+
2309+static enum insn_use_results
2310+insn_use_analysis (rtx insn_use, unsigned int regno_use, rtx * dest,
2311+ int indent)
2312+{
2313+ return (insn_use_analysis_1 (insn_use, regno_use, dest, indent));
2314+}
2315+
2316+/* Analyze the operation and operands of this use of a sign extension
2317+ target register. If the target register's upper bits do not
2318+ affect the result of the operation, then the sign extension is
2319+ useless. Returns true if the extension is needed, false
2320+ otherwise. */
2321+
2322+static bool
2323+analyze_ext_use (rtx insn_use, unsigned int regno_use, int indent)
2324+{
2325+ bool ext_needed, indent_once;
2326+ unsigned int dest_target_regno;
2327+ extelim_uid_t uid;
2328+ rtx use = PATTERN (insn_use), dest;
2329+ df_ref df_use, *p_def;
2330+ struct df_link *link;
2331+ enum insn_use_results analysis_result;
2332+
2333+ gcc_assert (use != NULL);
2334+
2335+ uid = INSN_UID (insn_use);
2336+
2337+ if (insn_flag_p (EXTELIM_SEEN, uid))
2338+ {
2339+ if (dump_file)
2340+ fprintf (dump_file,
2341+ "%*suse at uid=%d is visited already\n", indent, " ", uid);
2342+ return false;
2343+ }
2344+
2345+ /* Mark this insn as seen */
2346+ insn_flag_set (EXTELIM_SEEN, uid);
2347+
2348+ analysis_result = insn_use_analysis (insn_use, regno_use, &dest, indent);
2349+ switch (analysis_result)
2350+ {
2351+ /* We know conclusively that the "upper bits" of the extended
2352+ entity do not impact the "low bits" of the output of the operation. */
2353+ case EXTELIM_ANALYSIS_RESULT_LOWBITS_NOT_AFFECTED:
2354+ if (dump_file)
2355+ fprintf (dump_file, "%*suse at uid=%d is not affected\n", indent, " ",
2356+ uid);
2357+ return false;
2358+ break;
2359+ /* We know conclusively that the "upper bits" of the extended
2360+ entity _do_ impact the "low bits" of the output of the operation. */
2361+ case EXTELIM_ANALYSIS_RESULT_LOWBITS_AFFECTED:
2362+ if (dump_file)
2363+ fprintf (dump_file, "%*suse at uid=%d is affected\n", indent, " ",
2364+ uid);
2365+ return true;
2366+ break;
2367+ /* Continue to look at the uses of the result to determine the impact
2368+ of the "upper bits" */
2369+ case EXTELIM_ANALYSIS_RESULT_CONTINUE_RECURSION:
2370+ break;
2371+ default:
2372+ gcc_unreachable ();
2373+ }
2374+
2375+ /* We reach here because the action taken is CONTINUE_RECURSION.
2376+ Continue to look at the uses of the destination register recursively.
2377+ If the propagation ultimately ends where the upper bits are not significant
2378+ to the final output, then the extension can be removed. */
2379+ if (!REG_P (dest))
2380+ {
2381+ if (dump_file)
2382+ fprintf (dump_file,
2383+ "%*sdest of uid=%d (SET) is not a register\n", indent, " ",
2384+ uid);
2385+ return true;
2386+ }
2387+
2388+ dest_target_regno = REGNO (dest);
2389+
2390+ /* What this insn defines */
2391+ p_def = DF_INSN_UID_DEFS (uid);
2392+
2393+ /* Ref must be valid and there must be only one definition and it must be the
2394+ destination */
2395+ if ((*p_def == NULL) || (*(p_def + 1) != NULL))
2396+ return true;
2397+
2398+ gcc_assert (DF_REF_REGNO (*p_def) == dest_target_regno);
2399+
2400+ ext_needed = true;
2401+ indent_once = true;
2402+ for (link = DF_REF_CHAIN (*p_def); link; link = link->next)
2403+ {
2404+ rtx insn_use, use_exp;
2405+ df_use = link->ref;
2406+ if (!df_use)
2407+ continue;
2408+ /* Link must be a USE of the DEF */
2409+ if (!DF_REF_REG_USE_P (df_use))
2410+ continue;
2411+ /* Ignore ARTIFICIAL USES */
2412+ if (DF_REF_IS_ARTIFICIAL (df_use))
2413+ continue;
2414+ insn_use = DF_REF_INSN (df_use);
2415+ /* Don't consider debug_insns */
2416+ if (!NONDEBUG_INSN_P (insn_use))
2417+ continue;
2418+ use_exp = DF_REF_REG (df_use);
2419+
2420+ if (exp_needs_update_p (use_exp))
2421+ {
2422+ if (dump_file)
2423+ fprintf (dump_file,
2424+ "%*ssaved reg=%d expression for update\n", indent, " ", DF_REF_REGNO (df_use));
2425+ save_ext_update (current_ext_record, use_exp);
2426+ }
2427+
2428+ if (dump_file)
2429+ fprintf (dump_file,
2430+ "%*suse at uid=%d of reg=%d\n", indent, " ",
2431+ INSN_UID (insn_use), DF_REF_REGNO (df_use));
2432+ /* Set indent for dump formatting */
2433+ if (indent_once)
2434+ {
2435+ ++indent;
2436+ indent_once = false;
2437+ }
2438+ ext_needed = analyze_ext_use (insn_use, DF_REF_REGNO (df_use), indent);
2439+ if (ext_needed)
2440+ break;
2441+ }
2442+
2443+ if (dump_file)
2444+ fprintf (dump_file,
2445+ "%*sext %s needed\n", indent, " ", ext_needed ? "" : "not");
2446+
2447+ return ext_needed;
2448+}
2449+
2450+/* Set a flag on an insn indicating that it is
2451+ marked for replacement by a copy insn or for
2452+ deletion. */
2453+
2454+static void
2455+mark_replace_with_copy (rtx ext)
2456+{
2457+ extelim_uid_t uid = INSN_UID (ext);
2458+ insn_flag_set (EXTELIM_REPLACE_COPY, uid);
2459+}
2460+
2461+/* Get the mode that we are sign/zero extending from */
2462+
2463+static enum machine_mode
2464+get_ext_from_mode (rtx src)
2465+{
2466+ rtx regexp;
2467+ gcc_assert (GET_CODE (src) == ZERO_EXTEND || GET_CODE (src) == SIGN_EXTEND);
2468+
2469+ /* The SUBREG or REG mode of the extend operand */
2470+ regexp = XEXP (src, 0);
2471+ return (GET_MODE (regexp));
2472+}
2473+
2474+/* Perform the action on the expression. Return true
2475+ if any action performed, false otherwise. */
2476+
2477+static bool
2478+process_ext_update (rtx exp)
2479+{
2480+ /* Reset SUBREG_PROMOTED state to false */
2481+ if (GET_CODE (exp) == SUBREG
2482+ && SUBREG_PROMOTED_VAR_P (exp))
2483+ {
2484+ SUBREG_PROMOTED_VAR_P (exp) = 0;
2485+ return true;
2486+ }
2487+
2488+ return false;
2489+}
2490+
2491+/* Process the current extension record, looking at all the
2492+ the expressions that need to be updated because this
2493+ extension will be replaced by a copy. */
2494+
2495+static void
2496+process_ext_updates (ext_record_t extrec)
2497+{
2498+ unsigned i;
2499+ rtx exp;
2500+ bool updated=false;
2501+
2502+
2503+ FOR_EACH_VEC_ELT (rtx, extrec->ext_updates, i, exp)
2504+ {
2505+ updated |= process_ext_update (exp);
2506+ }
2507+
2508+ if (dump_file && updated)
2509+ fprintf (dump_file, " updates processed for extension at uid=%d\n",
2510+ INSN_UID (extrec->ext));
2511+}
2512+
2513+/* Try to eliminate the sign extension by examining the
2514+ definitions of the extension source and the uses
2515+ of the extension destination. */
2516+
2517+static void
2518+eliminate_one_extend (rtx ext)
2519+{
2520+ rtx src, dest, regexp;
2521+ df_ref df_use, df_def, *ext_use, *ext_def;
2522+ unsigned int ext_dest_regno, ext_src_regno, def_use_count = 1;
2523+ bool ext_needed = true;
2524+ extelim_uid_t uid = INSN_UID (ext);
2525+ struct df_link *link;
2526+ const char *inserted =
2527+ insn_flag_p (EXTELIM_INSERTED, uid) ? "inserted" : "";
2528+
2529+ /* Reset desired per insn flags for each extension analyzed */
2530+ reinit_insn_flags (EXTELIM_SEEN);
2531+
2532+ gcc_assert (GET_CODE (PATTERN (ext)) == SET);
2533+ src = SET_SRC (PATTERN (ext));
2534+ dest = SET_DEST (PATTERN (ext));
2535+
2536+ /* Save the basic information about the extension in a file global */
2537+ ext_to_mode = GET_MODE (dest);
2538+ ext_from_mode = get_ext_from_mode (src);
2539+ ext_code = GET_CODE (src);
2540+
2541+ /* Also mark this original extension as "SEEN" so we don't recurse into it. */
2542+ insn_flag_set (EXTELIM_SEEN, INSN_UID (ext));
2543+
2544+ /* Find the target of the extension */
2545+ if (!REG_P (dest))
2546+ return;
2547+ ext_dest_regno = REGNO (dest);
2548+
2549+ /* Find the source of the extension: set (REG:MODE (sign_extend (REG|SUBREG:MODE ... */
2550+ if ((regexp = register_exp (XEXP (src, 0))) == NULL)
2551+ return;
2552+ ext_src_regno = REGNO (regexp);
2553+
2554+ /* Iterate through the reaching definitions of the source of the extension
2555+ recursively. If the source if already sign extended, mark the
2556+ extension for replacement with a copy or deletion (deletion if it was
2557+ inserted in the duplication pass). */
2558+ ext_use = DF_INSN_UID_USES (uid);
2559+ /* There is only one use in a sign/zero extension insn and it must be the
2560+ source register */
2561+ gcc_assert (*(ext_use + 1) == NULL);
2562+ gcc_assert (DF_REF_REGNO (*ext_use) == ext_src_regno);
2563+
2564+ /* Now look at all the reaching definitions of this use */
2565+ for (link = DF_REF_CHAIN (*ext_use); link; link = link->next)
2566+ {
2567+ rtx insn_def;
2568+ df_def = link->ref;
2569+ if (!df_def)
2570+ continue;
2571+ /* Link must be to a definition of the use */
2572+ if (!DF_REF_REG_DEF_P (df_def))
2573+ continue;
2574+ /* Ignore ARTIFICIAL defs */
2575+ if (DF_REF_IS_ARTIFICIAL (df_def))
2576+ continue;
2577+ insn_def = DF_REF_INSN (df_def);
2578+ /* Don't consider debug_insns */
2579+ if (!NONDEBUG_INSN_P (insn_def))
2580+ continue;
2581+ if (dump_file)
2582+ fprintf (dump_file,
2583+ " analyze def #%d of reg=%d at uid=%u\n",
2584+ def_use_count, DF_REF_REGNO (*ext_use), INSN_UID (insn_def));
2585+ ext_needed = analyze_ext_def (insn_def, DF_REF_REGNO (*ext_use), 2);
2586+ if (ext_needed)
2587+ break;
2588+ def_use_count++;
2589+ }
2590+
2591+ /* Try the def-use chains if the extension wasn't marked by the
2592+ previous pass. */
2593+ if (ext_needed)
2594+ {
2595+ /* Defs of the sign extension */
2596+ ext_def = DF_INSN_UID_DEFS (uid);
2597+ /* There is only one def in a sign extension insn and it must be the
2598+ destination */
2599+ gcc_assert (*(ext_def + 1) == NULL);
2600+ gcc_assert (DF_REF_REGNO (*ext_def) == ext_dest_regno);
2601+
2602+ /* Counter for debug dump */
2603+ def_use_count = 1;
2604+ /* Reset desired per insn flags for each extension analyzed */
2605+ reinit_insn_flags (EXTELIM_SEEN);
2606+ /* Also mark this original extension as "SEEN" so we don't recurse into it. */
2607+ insn_flag_set (EXTELIM_SEEN, INSN_UID (ext));
2608+
2609+ /* Iterate over the reached uses of extension destination register recursively.
2610+ If the destination register's upper bits are ultimately not
2611+ relevant, the extension can be marked for replacement with a
2612+ copy. */
2613+ for (link = DF_REF_CHAIN (*ext_def); link; link = link->next)
2614+ {
2615+ rtx insn_use, use_exp;
2616+ df_use = link->ref;
2617+ if (!df_use)
2618+ continue;
2619+ /* Link must be a USE of the DEF */
2620+ if (!DF_REF_REG_USE_P (df_use))
2621+ continue;
2622+ /* Ignore ARTIFICIAL USES */
2623+ if (DF_REF_IS_ARTIFICIAL (df_use))
2624+ continue;
2625+ insn_use = DF_REF_INSN (df_use);
2626+ /* Don't consider debug_insns */
2627+ if (!NONDEBUG_INSN_P (insn_use))
2628+ continue;
2629+ use_exp = DF_REF_REG (df_use);
2630+
2631+ if (exp_needs_update_p (use_exp))
2632+ {
2633+ if (dump_file)
2634+ fprintf (dump_file,
2635+ " saved reg=%d expression for update\n", DF_REF_REGNO (df_use));
2636+ save_ext_update (current_ext_record, use_exp);
2637+ }
2638+
2639+ if (dump_file)
2640+ fprintf (dump_file,
2641+ " analyze use #%d at uid=%u of reg=%d\n",
2642+ def_use_count, INSN_UID (insn_use),
2643+ DF_REF_REGNO (*ext_def));
2644+ ext_needed = analyze_ext_use (insn_use, DF_REF_REGNO (*ext_def), 2);
2645+ if (ext_needed)
2646+ break;
2647+ def_use_count++;
2648+ }
2649+ }
2650+
2651+ /* The extension is not needed. The rtl for the extension is marked
2652+ for replace by copy. */
2653+ if (!ext_needed)
2654+ {
2655+ process_ext_updates (current_ext_record);
2656+
2657+ if (dump_file)
2658+ fprintf (dump_file,
2659+ ":) mark %s extension insn uid=%d for copy replacement\n",
2660+ inserted, INSN_UID (ext));
2661+ mark_replace_with_copy (ext);
2662+ num_cand_transformed++;
2663+ }
2664+ else
2665+ {
2666+ if (dump_file)
2667+ fprintf (dump_file,
2668+ ":( %s extension insn uid=%d is needed\n", inserted,
2669+ INSN_UID (ext));
2670+ }
2671+}
2672+
2673+/* Replace the sign extension with a copy instruction
2674+
2675+ example 1:
2676+ from:
2677+ dest src
2678+ (set (reg:DI destreg) (sign_extend:DI (reg:SI srcreg)))
2679+ to:
2680+ (clobber (reg:DI destreg))
2681+ (set (subreg:SI (reg:DI destreg) 4) (reg:SI srcreg))
2682+
2683+ or
2684+
2685+ example 2:
2686+ from:
2687+ dest src
2688+ (set (reg:DI destreg) (sign_extend:DI (subreg:SI (reg:DI srcreg) 4)))
2689+ to:
2690+ (clobber (reg:DI destreg))
2691+ (set (subreg:SI (reg:DI destreg) 4) (subreg:SI (reg:DI srcreg) 4))
2692+
2693+ or
2694+
2695+ example 3:
2696+ from:
2697+ dest src
2698+ (set (reg:SI destreg) (sign_extend:SI (subreg:HI (reg:SI srcreg) 2)))
2699+ to:
2700+ (clobber (reg:SI destreg))
2701+ (set (subreg:HI (reg:SI destreg) 2) (subreg:HI (reg:SI srcreg) 2)) */
2702+
2703+static void
2704+replace_with_copy (rtx ext)
2705+{
2706+ rtx extension = PATTERN (ext);
2707+ rtx ext_op, src, dest, insns, cp_dest, cp_src;
2708+ enum machine_mode inner_mode;
2709+ gcc_assert (GET_CODE (extension) == SET);
2710+
2711+ dest = SET_DEST (extension);
2712+ src = SET_SRC (extension);
2713+
2714+ /* The sign extension operand */
2715+ ext_op = XEXP (src, 0);
2716+ /* Get the inner mode */
2717+ inner_mode = GET_MODE (ext_op);
2718+ gcc_assert (inner_mode == SImode || inner_mode == HImode
2719+ || inner_mode == QImode);
2720+
2721+ /* Make dest a SUBREG:mm */
2722+ cp_dest = gen_lowpart_SUBREG (inner_mode, dest);
2723+
2724+ /* Copy src is the sign extension target register */
2725+ cp_src = ext_op;
2726+
2727+ /* ??? clobber is needed for rtl consistency, don't know why */
2728+ start_sequence ();
2729+ emit_clobber (dest);
2730+ emit_move_insn (cp_dest, cp_src);
2731+ insns = get_insns ();
2732+ end_sequence ();
2733+ emit_insn_before (insns, ext);
2734+
2735+ delete_insn (ext);
2736+}
2737+
2738+/* Iterate through extensions, replace those extensions
2739+ that are marked as so with a copy insn. */
2740+
2741+static void
2742+replace_ext_with_copy (void)
2743+{
2744+ ext_record_t extrec;
2745+ unsigned i;
2746+
2747+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec)
2748+ {
2749+ const char *inserted = insn_flag_p (EXTELIM_INSERTED,
2750+ INSN_UID (extrec->
2751+ ext)) ? "inserted" : "";
2752+ if (insn_flag_p (EXTELIM_REPLACE_COPY, INSN_UID (extrec->ext)))
2753+ {
2754+ if (dump_file)
2755+ fprintf (dump_file,
2756+ " replace %s extension uid=%d with a copy\n", inserted,
2757+ INSN_UID (extrec->ext));
2758+ replace_with_copy (extrec->ext);
2759+ }
2760+ }
2761+}
2762+
2763+
2764+/* Copy the RTX flags from old to new */
2765+
2766+static void
2767+copy_flags (rtx oldrtx, rtx newrtx)
2768+{
2769+ if (RTX_FLAG (oldrtx, in_struct))
2770+ RTX_FLAG (newrtx, in_struct) = true;
2771+
2772+ if (RTX_FLAG (oldrtx, volatil))
2773+ RTX_FLAG (newrtx, volatil) = true;
2774+
2775+ if (RTX_FLAG (oldrtx, unchanging))
2776+ RTX_FLAG (newrtx, unchanging) = true;
2777+
2778+ if (RTX_FLAG (oldrtx, frame_related))
2779+ RTX_FLAG (newrtx, frame_related) = true;
2780+
2781+ if (RTX_FLAG (oldrtx, jump))
2782+ RTX_FLAG (newrtx, jump) = true;
2783+
2784+ if (RTX_FLAG (oldrtx, call))
2785+ RTX_FLAG (newrtx, call) = true;
2786+
2787+ if (RTX_FLAG (oldrtx, return_val))
2788+ RTX_FLAG (newrtx, return_val) = true;
2789+}
2790+
2791+/* Iterate through the insn notes looking for 'kind'. If
2792+ found replace the register rtx with the new rtx. */
2793+
2794+static void
2795+update_notes (enum reg_note kind, rtx insn, rtx reg, rtx new_reg)
2796+{
2797+ rtx link;
2798+ for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
2799+ if (REG_NOTE_KIND (link) == kind)
2800+ {
2801+ rtx op0 = XEXP (link, 0);
2802+ if (kind == REG_DEAD)
2803+ if (REG_P (op0) && op0 == reg)
2804+ XEXP (link, 0) = new_reg;
2805+ }
2806+}
2807+
2808+
2809+
2810+#if EXTELIM_DUPLICATE_EXTS_AT_USES
2811+/* Insert a duplicate sign extension at the use point.
2812+ Add a flag indicating this extension is algorithmically
2813+ added. Since the "inserted" extensions have the form
2814+ regX = sign_extend (subreg:mm (reg:MM regX), offset),
2815+ they can simply be deleted if they are redundant since we
2816+ are at a reaching use of the original definition. We also
2817+ mark the use insn where the insert occurs so we don't insert
2818+ the same extension from another def at this use. */
2819+
2820+static void
2821+insert_duplicate_ext_at_use (rtx ext_insn, rtx use_insn)
2822+{
2823+ rtx ext = PATTERN (ext_insn), ext_src, ext_dest;
2824+ rtx new_ext_src_inner, new_ext_src_outer, new_ext_part;
2825+ rtx new_ext_dest, new_ext_insn;
2826+ extelim_uid_t new_uid;
2827+ df_ref *p_df_uses;
2828+ unsigned int ext_dest_regno;
2829+ enum machine_mode inner_mode;
2830+ bool sign_extend_p =
2831+ GET_CODE (SET_SRC (PATTERN (ext_insn))) == SIGN_EXTEND ? true : false;
2832+
2833+ /* This new extension must be of the form:
2834+ set (reg:MM X (sign_extend:MM (subreg:mm (reg:MM X))))
2835+ where mm is smaller than MM. */
2836+ ext_dest = SET_DEST (ext);
2837+ ext_src = SET_SRC (ext);
2838+
2839+ gcc_assert (REG_P (register_exp (ext_dest)));
2840+
2841+ /* A copy of the extend destination register to a new virtual register */
2842+ new_ext_dest = gen_reg_rtx (GET_MODE (ext_dest));
2843+ /* A copy of the extend source (same reg as dest), REG_P */
2844+ new_ext_src_inner = copy_rtx (ext_dest);
2845+ /* Get inner mode, either mm for SUBREG:mm (REG:MM) or MM for (REG:MM) */
2846+ if (GET_CODE (XEXP (ext_src, 0)) == SUBREG)
2847+ inner_mode = GET_MODE (XEXP (ext_src, 0));
2848+ else if (REG_P (XEXP (ext_src, 0)))
2849+ inner_mode = GET_MODE (XEXP (ext_src, 0));
2850+ else
2851+ /* Can't determine sign_extend operand */
2852+ gcc_unreachable ();
2853+
2854+ /* Make a subreg rtx */
2855+ new_ext_src_outer = gen_lowpart_SUBREG (inner_mode, new_ext_src_inner);
2856+ /* Make a sign/zero extend insn */
2857+ new_ext_part = sign_extend_p
2858+ ? gen_rtx_SIGN_EXTEND (GET_MODE (ext_dest), new_ext_src_outer)
2859+ : gen_rtx_ZERO_EXTEND (GET_MODE (ext_dest), new_ext_src_outer);
2860+ /* (set (new:MM (sign_extend:MM (subreg:mm (reg:MM ext_dest))))) */
2861+ new_ext_insn = gen_rtx_SET (VOIDmode, new_ext_dest, new_ext_part);
2862+
2863+ /* Now update the use */
2864+ /* Operands used by this the use_insn */
2865+ ext_dest_regno = REGNO (register_exp (ext_dest));
2866+ for (p_df_uses = DF_INSN_UID_USES (INSN_UID (use_insn)); *p_df_uses;
2867+ p_df_uses++)
2868+ {
2869+ if (DF_REF_REGNO (*p_df_uses) == ext_dest_regno)
2870+ {
2871+ rtx use_reg = DF_REF_REG (*p_df_uses);
2872+
2873+ /* Replace the register use in use_insn with the new register. If the use
2874+ is a subreg pattern, replace the innermost reg. */
2875+ replace_rtx (PATTERN (use_insn), register_exp (use_reg),
2876+ new_ext_dest);
2877+ /* Update flags on new dest reg */
2878+ copy_flags (register_exp (use_reg), new_ext_dest);
2879+ /* Update any notes associated with use reg and use_insn */
2880+ update_notes (REG_DEAD, use_insn, register_exp (use_reg), new_ext_dest);
2881+ /* DF info must be updated since existing insn is changed */
2882+ df_insn_rescan (use_insn);
2883+ }
2884+ }
2885+
2886+ new_uid = extelim_emit_before (new_ext_insn, use_insn);
2887+ insn_flag_set (EXTELIM_INSERTED, new_uid);
2888+}
2889+
2890+/* Allow the duplication of the extension even if the extension
2891+ and the duplication use are in the same block. */
2892+
2893+static bool
2894+allow_same_block_duplication_p (rtx ext_insn, rtx use_insn)
2895+{
2896+ rtx ext = PATTERN (ext_insn);
2897+ rtx use = PATTERN (use_insn);
2898+
2899+ if (GET_CODE (SET_SRC (use)) == ASHIFT && GET_CODE (SET_SRC (ext)) == ZERO_EXTEND)
2900+ return true;
2901+ return false;
2902+}
2903+
2904+/* Determine if the extension should be duplicated at this use point.
2905+ Return true if yes, false otherwise. */
2906+
2907+static bool
2908+save_ext_use_p (ext_record_t extrec, rtx use_insn)
2909+{
2910+ rtx ext_insn, ext, ext_dest, use = PATTERN (use_insn), use_src;
2911+ df_ref df_use;
2912+
2913+ ext_insn = extrec->ext;
2914+ ext = PATTERN (ext_insn);
2915+ ext_dest = SET_DEST (ext);
2916+
2917+ if (GET_CODE (use) != SET)
2918+ {
2919+ if (dump_file)
2920+ fprintf (dump_file, " no -- use is not a SET code\n");
2921+ return false;
2922+ }
2923+
2924+ /* Check for obviousness */
2925+ /* 1. The use is only reached by the a single definition of the extension.
2926+ Otherwise, it wouldn't be legal to insert a duplicate extension
2927+ as other defs reaching this use may not need it. Certainly not all
2928+ other defs may reach here, but this is the conservative approximation.
2929+ Found in nof/muldf3.c */
2930+ df_use = df_find_use (use_insn, ext_dest);
2931+ if ( df_use && DF_REF_CHAIN (df_use)->next)
2932+ {
2933+ if (dump_file)
2934+ fprintf (dump_file,
2935+ " no -- there are multiple definitions of reg=%d reaching this use\n",
2936+ (REGNO (register_exp (ext_dest))));
2937+ return false;
2938+ }
2939+
2940+ /* 2. The extension and use are in the same block. Since
2941+ this is a reached use, it's obvious we don't need another
2942+ extension. The exception is this -- we are trying to set
2943+ up a specific extension,insn pattern that will be recognized
2944+ by the insn selector. This pattern will also be ignored when
2945+ the next extension candidate list is created in the next pass. */
2946+ if (INSN_P (ext_insn) && INSN_P (use_insn))
2947+ {
2948+ if (BLOCK_FOR_INSN (ext_insn) == BLOCK_FOR_INSN (use_insn))
2949+ {
2950+ if (allow_same_block_duplication_p (ext_insn, use_insn))
2951+ ;
2952+ else
2953+ {
2954+ if (dump_file)
2955+ fprintf (dump_file,
2956+ " no -- ext and use are in the same block\n");
2957+ return false;
2958+ }
2959+ }
2960+ }
2961+
2962+ /* 3. The use is a sign extension of the extension destination reg */
2963+ use_src = SET_SRC (use);
2964+ if (GET_CODE (use_src) == SIGN_EXTEND
2965+ && REG_P (register_exp (XEXP (use_src, 0)))
2966+ && REG_P (register_exp (ext_dest)))
2967+ if (GET_MODE (use_src) == GET_MODE (ext_dest)
2968+ && REGNO (register_exp (XEXP (use_src, 0))) ==
2969+ REGNO (register_exp (ext_dest)))
2970+ {
2971+ if (dump_file)
2972+ fprintf (dump_file,
2973+ " no -- the use is a sign extension of reg=%d\n",
2974+ REGNO (register_exp (XEXP (use_src, 0))));
2975+ return false;
2976+ }
2977+
2978+ /* 4. The use already has an extension inserted and one of the use's operands
2979+ is a register matching the reaching definition. So don't reinsert the same
2980+ extension. */
2981+ if (insn_flag_p (EXTELIM_INSERTED_FOR, INSN_UID (use_insn)))
2982+ {
2983+ df_ref *p_df_uses;
2984+ /* Operands used by this the use_insn */
2985+ for (p_df_uses = DF_INSN_UID_USES (INSN_UID (use_insn)); *p_df_uses;
2986+ p_df_uses++)
2987+ {
2988+ if (REG_P (register_exp (ext_dest)) &&
2989+ DF_REF_REGNO (*p_df_uses) == REGNO (register_exp (ext_dest)))
2990+ {
2991+ if (dump_file)
2992+ fprintf (dump_file,
2993+ " no -- this use is marked for sign extension insertion already\n");
2994+ return false;
2995+ }
2996+ }
2997+ }
2998+
2999+ /* 5. There is also a definition of the ext dest register at this use (as can occur in self assignment). */
3000+ if (register_exp (SET_DEST (use)) && REG_P (ext_dest)
3001+ && REGNO (register_exp (SET_DEST (use))) == REGNO (ext_dest))
3002+ {
3003+ if (dump_file)
3004+ fprintf (dump_file,
3005+ " no -- this use also assigns the used register\n");
3006+ return false;
3007+ }
3008+
3009+
3010+ if (dump_file)
3011+ fprintf (dump_file, " yes\n");
3012+ return true;
3013+}
3014+
3015+/* Save the use insn in the extension records list of
3016+ uses. At the next phase, we will duplicate the extension
3017+ at these use points. */
3018+
3019+static void
3020+save_ext_use (ext_record_t extrec, rtx use_insn)
3021+{
3022+ /* Mark the use insn, it will have a duplicate inserted */
3023+ insn_flag_set (EXTELIM_INSERTED_FOR, INSN_UID (use_insn));
3024+ /* Save use to the list of uses to be duplicated for this extension. */
3025+ VEC_safe_push (rtx, heap, extrec->ext_uses, use_insn);
3026+}
3027+
3028+
3029+/* Save the qualified use of an extension to a list */
3030+
3031+static void
3032+gather_ext_uses_info (ext_record_t extrec)
3033+{
3034+ rtx ext;
3035+ df_ref *ext_def, df_use;
3036+ unsigned int def_use_count = 1;
3037+ extelim_uid_t uid;
3038+ struct df_link *link;
3039+
3040+ gcc_assert (extrec != NULL);
3041+ ext = extrec->ext;
3042+ uid = INSN_UID (ext);
3043+
3044+ /* Insn level defs of the sign extension */
3045+ ext_def = DF_INSN_UID_DEFS (uid);
3046+ /* There is only one def in a sign extension insn */
3047+ gcc_assert (*(ext_def + 1) == NULL);
3048+
3049+ /* Iterate over the reached uses of extension destination register.
3050+ Duplicate the extension at the use point. */
3051+ for (link = DF_REF_CHAIN (*ext_def); link; link = link->next)
3052+ {
3053+ rtx insn_use;
3054+ df_use = link->ref;
3055+ if (!df_use)
3056+ continue;
3057+ /* Link must be a USE of the DEF */
3058+ if (!DF_REF_REG_USE_P (df_use))
3059+ continue;
3060+ /* Ignore ARTIFICIAL USES */
3061+ if (DF_REF_IS_ARTIFICIAL (df_use))
3062+ continue;
3063+ insn_use = DF_REF_INSN (df_use);
3064+
3065+ /* Don't consider debug_insns */
3066+ if (!NONDEBUG_INSN_P (insn_use))
3067+ continue;
3068+
3069+ if (dump_file)
3070+ fprintf (dump_file,
3071+ " use #%d duplicate ext of reg=%d at uid=%u?\n",
3072+ def_use_count, DF_REF_REGNO (*ext_def), INSN_UID (insn_use));
3073+ if (save_ext_use_p (extrec, insn_use))
3074+ save_ext_use (extrec, insn_use);
3075+ def_use_count++;
3076+ }
3077+}
3078+
3079+/* At each use point of the sign extension, unless the
3080+ use is obviously already sign extended, insert a
3081+ sign extension insn before the use. We do this in two
3082+ passes to avoid confusing the dataflow information. */
3083+
3084+static void
3085+duplicate_exts_at_uses (void)
3086+{
3087+ unsigned i, j;
3088+ ext_record_t extrec;
3089+ rtx use_insn;
3090+
3091+ /* Get the uses where the extensions will be duplicated */
3092+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec)
3093+ {
3094+ if (dump_file)
3095+ fprintf (dump_file, "gathering extension uid=%u use information\n",
3096+ INSN_UID (extrec->ext));
3097+ gather_ext_uses_info (extrec);
3098+ }
3099+
3100+ /* Now duplicate the extensions at the appropriate use points */
3101+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, extrec)
3102+ {
3103+ if (dump_file)
3104+ fprintf (dump_file, "extension uid=%u\n", INSN_UID (extrec->ext));
3105+
3106+ FOR_EACH_VEC_ELT (rtx, extrec->ext_uses, j, use_insn)
3107+ {
3108+ if (dump_file)
3109+ fprintf (dump_file, " duplicated at use uid=%u\n",
3110+ INSN_UID (use_insn));
3111+ insert_duplicate_ext_at_use (extrec->ext, use_insn);
3112+ }
3113+ }
3114+}
3115+#endif /* EXTELIM_DUPLICATE_EXTS_AT_USES */
3116+
3117+/* Determine if an instruction is a return insn */
3118+
3119+static rtx
3120+return_p (rtx rtn_insn)
3121+{
3122+ rtx rtn = PATTERN (rtn_insn), dest;
3123+ int i;
3124+
3125+ if (GET_CODE (rtn) != SET)
3126+ return false;
3127+
3128+ dest = SET_DEST (rtn);
3129+
3130+ /* Is a return value? */
3131+ if ((REG_P (dest) || GET_CODE (dest) == PARALLEL) &&
3132+ REG_FUNCTION_VALUE_P (dest))
3133+ {
3134+ /* Simple SET, return the insn */
3135+ if (REG_P (dest))
3136+ return rtn_insn;
3137+ /* PARALLEL, find the embedded rtx */
3138+ if (GET_CODE (dest) == PARALLEL)
3139+ for (i = XVECLEN (rtn_insn, 0) - 1; i >= 0; i--)
3140+ {
3141+ rtx body = XVECEXP (rtn_insn, 0, i);
3142+ if (GET_CODE (body) == SET)
3143+ {
3144+ dest = SET_DEST (body);
3145+ if (REG_FUNCTION_VALUE_P (dest))
3146+ return body;
3147+ }
3148+ }
3149+ }
3150+ /* Not a return */
3151+ return NULL;
3152+}
3153+
3154+/* Find all return RTLs in the function and save them in
3155+ a list. */
3156+
3157+static bool
3158+find_returns (void)
3159+{
3160+ basic_block bb;
3161+ rtx insn, rtn_insn;
3162+ bool found = false;
3163+
3164+ /* For all insns */
3165+ FOR_EACH_BB (bb)
3166+ {
3167+ FOR_BB_INSNS (bb, insn)
3168+ {
3169+ if (!NONDEBUG_INSN_P (insn))
3170+ continue;
3171+
3172+ if ((rtn_insn = return_p (insn)) == NULL)
3173+ {
3174+ continue;
3175+ }
3176+ if (dump_file)
3177+ fprintf (dump_file, " found return at uid=%u\n", INSN_UID (rtn_insn));
3178+
3179+ VEC_safe_push (rtx, heap, returns, rtn_insn);
3180+ found = true;
3181+ }
3182+ }
3183+
3184+ return (found);
3185+}
3186+
3187+/* Get the signedness and machine mode of the function */
3188+
3189+static bool
3190+get_return_info (bool * signed_p, enum machine_mode *return_mode)
3191+{
3192+ tree rtninfo;
3193+
3194+ if ((rtninfo = DECL_RESULT (current_function_decl)) != NULL)
3195+ {
3196+ *signed_p = !TYPE_UNSIGNED (TREE_TYPE (rtninfo));
3197+ *return_mode = DECL_MODE (rtninfo);
3198+ return true;
3199+ }
3200+ return false;
3201+}
3202+
3203+/* If the dest mode of the return is larger than
3204+ the function return mode, we can subreg the return
3205+ insn to the return mode and extend to the destination.
3206+ E.g. unsigned, return mode: HImode
3207+ set (reg/i:DI Y) (reg:DI X)
3208+ becomes
3209+ set (reg:DI new) (zero_extend:DI (subreg:HI (reg:DI X)))
3210+ set (reg/i:DI Y) (reg:DI new) */
3211+
3212+static void
3213+make_ext_at_rtn (rtx rtn_insn, bool fun_signed_p, enum machine_mode fun_mode)
3214+{
3215+ rtx rtn = PATTERN (rtn_insn);
3216+ rtx dest, src, new_ext_dest, new_ext_src, new_ext_outer, new_ext_part,
3217+ new_ext_insn;
3218+ extelim_uid_t new_uid;
3219+ gcc_assert (GET_CODE (rtn) == SET);
3220+
3221+ dest = SET_DEST (rtn);
3222+ src = SET_SRC (rtn);
3223+
3224+ /* Deal with scalar rtn values only */
3225+ if (fun_mode != DImode
3226+ && fun_mode != SImode && fun_mode != HImode && fun_mode != QImode)
3227+ {
3228+ if (dump_file)
3229+ fprintf (dump_file, "failed-- not scalar return mode\n");
3230+ return;
3231+ }
3232+
3233+ /* Dest and src have to have the same mode. This should always be
3234+ true for well formed rtl, but we check anyway. */
3235+ if (GET_MODE (dest) != GET_MODE (src))
3236+ {
3237+ if (dump_file)
3238+ fprintf (dump_file, "failed-- dest and src modes differ\n");
3239+ return;
3240+ }
3241+
3242+ /* Also check that we are dealing with simple regs here. */
3243+ if (!REG_P (dest) || !REG_P (src))
3244+ {
3245+ if (dump_file)
3246+ fprintf (dump_file, "failed-- dest or src is not REG_P\n");
3247+ return;
3248+ }
3249+
3250+ /* The return reg mode should never be smaller than fun return mode. If the
3251+ same size, however, we can't subreg either, so return */
3252+ if (GET_MODE_BITSIZE (GET_MODE (dest)) <= GET_MODE_BITSIZE (fun_mode))
3253+ {
3254+ if (dump_file)
3255+ fprintf (dump_file,
3256+ "failed-- dest size mode is smaller or equal to function mode size\n");
3257+ return;
3258+ }
3259+
3260+ /* From here we should be able to build a subreg since the function return mode
3261+ size is smaller than the return register mode size */
3262+ new_ext_dest = gen_reg_rtx (GET_MODE (src)); /* set (reg:MM new) */
3263+ new_ext_src = copy_rtx (src); /* copy of X, copyX */
3264+ new_ext_outer = gen_lowpart_SUBREG (fun_mode, new_ext_src); /* subreg:mm (reg:MM copyX) */
3265+ new_ext_part = fun_signed_p /* extend:MM (subreg:mm (reg:MM copyX)) */
3266+ ? gen_rtx_SIGN_EXTEND (GET_MODE (src), new_ext_outer)
3267+ : gen_rtx_ZERO_EXTEND (GET_MODE (src), new_ext_outer);
3268+ /* Put it together */
3269+ new_ext_insn = gen_rtx_SET (VOIDmode, new_ext_dest, new_ext_part);
3270+
3271+ /* Modify src of return insn to use new pseudo */
3272+ replace_rtx (PATTERN (rtn_insn), src, new_ext_dest);
3273+ /* Update flags on new dest reg */
3274+ copy_flags (src, new_ext_dest);
3275+ /* Update any notes associated with replaced register */
3276+ update_notes (REG_DEAD, rtn_insn, src, new_ext_dest);
3277+ /* Rescan the modified insn */
3278+ df_insn_rescan (rtn_insn);
3279+ /* Insert the new insn */
3280+ new_uid = extelim_emit_before (new_ext_insn, rtn_insn);
3281+
3282+ if (dump_file)
3283+ fprintf (dump_file, "success\n");
3284+}
3285+
3286+/* Insert extensions at return points. Scan the RTL
3287+ for the return statements. Determine if the RTL
3288+ can be modified to insert an extension. Modify the
3289+ return to insert the extension. */
3290+
3291+static void
3292+insert_ext_at_returns (void)
3293+{
3294+ bool signed_p;
3295+ enum machine_mode return_mode;
3296+ rtx rtn_insn;
3297+ int i;
3298+
3299+ /* Generate list of return rtls for the function */
3300+ if (dump_file)
3301+ fprintf (dump_file, "gathering return insns...\n");
3302+
3303+ if (!find_returns ())
3304+ return;
3305+
3306+ if (!get_return_info (&signed_p, &return_mode))
3307+ return;
3308+
3309+ /* For each return instruction, generate a sign/zero extend
3310+ if the current return size is larger than the function
3311+ return mode. */
3312+ FOR_EACH_VEC_ELT (rtx, returns, i, rtn_insn)
3313+ {
3314+ if (dump_file)
3315+ fprintf (dump_file, " making extension at return uid=%u...",
3316+ INSN_UID (rtn_insn));
3317+ make_ext_at_rtn (rtn_insn, signed_p, return_mode);
3318+ }
3319+}
3320+
3321+/* Compare two extension records by loop depth.
3322+ Used by VEC_qsort to sort the order in which extensions
3323+ are processed. */
3324+
3325+static int
3326+ext_record_compare (const void *p_er1, const void *p_er2)
3327+{
3328+ const ext_record_t er1 = *(const ext_record_t *) p_er1;
3329+ const ext_record_t er2 = *(const ext_record_t *) p_er2;
3330+ basic_block bb1, bb2;
3331+ rtx ext1, ext2;
3332+
3333+ if (er1 == er2)
3334+ return 0;
3335+
3336+ ext1 = er1->ext;
3337+ ext2 = er2->ext;
3338+
3339+ bb1 = BLOCK_FOR_INSN (ext1);
3340+ bb2 = BLOCK_FOR_INSN (ext2);
3341+
3342+ /* Sort high to low */
3343+ return (bb2->loop_depth - bb1->loop_depth);
3344+}
3345+
3346+/* The main interface to this optimization. */
3347+
3348+static void
3349+extension_elimination (void)
3350+{
3351+ ext_record_t ext;
3352+ unsigned i;
3353+
3354+ init_pass ();
3355+
3356+ /* Find initial sign extension candidates */
3357+ if (!find_extensions ())
3358+ {
3359+ finish_pass ();
3360+ return;
3361+ }
3362+
3363+ /* Insert sign extension at return points in
3364+ the function. */
3365+ insert_ext_at_returns ();
3366+
3367+ /* Duplicate the sign extensions at their use
3368+ points unless the use is already obviously sign
3369+ extended or extension is already added. */
3370+#if EXTELIM_DUPLICATE_EXTS_AT_USES
3371+ duplicate_exts_at_uses ();
3372+#endif
3373+
3374+ /* Update DF information since now have new insns. */
3375+ df_finish_pass (true);
3376+ df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN);
3377+ df_analyze ();
3378+
3379+#if EXTELIM_DF_DUMP
3380+ if (dump_file)
3381+ df_dump (dump_file);
3382+#endif
3383+
3384+ /* Init statistics */
3385+ num_cand = 0;
3386+ num_cand_ignored = 0;
3387+ num_cand_transformed = 0;
3388+
3389+ /* Free old extensions list, generate new one that includes
3390+ the new extensions. */
3391+ free_extensions ();
3392+
3393+ if (!find_extensions ())
3394+ {
3395+ finish_pass ();
3396+ return;
3397+ }
3398+
3399+ if (dump_file)
3400+ {
3401+ fprintf (dump_file, "\nRTL After Extension Duplication\n");
3402+ print_rtl (dump_file, get_insns ());
3403+ }
3404+
3405+ if (dump_file)
3406+ fprintf (dump_file, "Begin extension elimination analysis\n");
3407+
3408+ /* Sort the extensions by loop depth. We want to try to eliminate
3409+ those in innermost loops (highest loop depth) first. */
3410+ VEC_qsort (ext_record_t, extensions, ext_record_compare);
3411+
3412+ /* Iterate through extension worklist */
3413+ FOR_EACH_VEC_ELT (ext_record_t, extensions, i, ext)
3414+ {
3415+ rtx ext_insn = ext->ext;
3416+ rtx ext_src = SET_SRC (PATTERN (ext_insn));
3417+ const char *ext_name =
3418+ GET_CODE (ext_src) == SIGN_EXTEND ? "sign" : "zero";
3419+ const char *inserted =
3420+ insn_flag_p (EXTELIM_INSERTED, INSN_UID (ext_insn)) ? "inserted" : "";
3421+ extelim_uid_t uid = INSN_UID (ext_insn);
3422+
3423+ if (dump_file)
3424+ fprintf (dump_file,
3425+ "<analyzing %s %s extension uid=%u> (loop_depth=%d)\n",
3426+ inserted, ext_name, uid,
3427+ BLOCK_FOR_INSN (ext_insn)->loop_depth);
3428+
3429+ current_ext_record = ext;
3430+ eliminate_one_extend (ext->ext);
3431+ }
3432+
3433+ if (dump_file)
3434+ fprintf (dump_file, "Begin extension elimination transformations\n");
3435+
3436+ replace_ext_with_copy ();
3437+
3438+ if (dump_file)
3439+ fprintf (dump_file, "\nRTL After Extension Elimination\n");
3440+
3441+ finish_pass ();
3442+
3443+ /* Print statistics */
3444+ if (dump_file)
3445+ {
3446+ fprintf (dump_file,
3447+ "Number of extensions ignored: %d (of %d candidiates)\nDETECTION EFFECTIVENESS: %f%%\n",
3448+ num_cand_ignored, num_cand,
3449+ ((float) (num_cand - num_cand_ignored) / (float) num_cand) *
3450+ 100);
3451+ fprintf (dump_file,
3452+ "Number of extensions converted to copy: %d (of %d candidiates)\nCONVERSION EFFECTIVENESS: %f%%\n",
3453+ num_cand_transformed, num_cand,
3454+ ((float) num_cand_transformed / (float) num_cand) * 100);
3455+ }
3456+}
3457+
3458+/* Remove redundant extensions. */
3459+
3460+static unsigned int
3461+rest_of_handle_extelim (void)
3462+{
3463+ extension_elimination ();
3464+ return 0;
3465+}
3466+
3467+/* Run extelim pass when flag_extelim is set at optimization level > 0. */
3468+
3469+static bool
3470+gate_handle_extelim (void)
3471+{
3472+ return (optimize > 0 && flag_extelim);
3473+}
3474+
3475+struct rtl_opt_pass pass_rtl_extelim = {
3476+ {
3477+ RTL_PASS,
3478+ "extelim", /* name */
3479+ gate_handle_extelim, /* gate */
3480+ rest_of_handle_extelim, /* execute */
3481+ NULL, /* sub */
3482+ NULL, /* next */
3483+ 0, /* static_pass_number */
3484+ TV_EXTELIM, /* tv_id */
3485+ 0, /* properties_required */
3486+ 0, /* properties_provided */
3487+ 0, /* properties_destroyed */
3488+ 0, /* todo_flags_start */
3489+ TODO_ggc_collect | TODO_dump_func | TODO_df_finish | TODO_verify_rtl_sharing, /* todo_flags_finish */
3490+ }
3491+};
diff --git a/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch b/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch
deleted file mode 100644
index cb34859..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_MTWX51204-dwarf-vector-reg.patch
+++ /dev/null
@@ -1,9 +0,0 @@
1diff -Naur gcc-4.6.2/gcc/config/rs6000/sysv4.h gcc-4.6.2-MTWX51204-dwarf-vector-reg/gcc/config/rs6000/sysv4.h
2--- gcc-4.6.2/gcc/config/rs6000/sysv4.h 2011-03-07 01:50:23.000000000 -0600
3+++ gcc-4.6.2-MTWX51204-dwarf-vector-reg/gcc/config/rs6000/sysv4.h 2011-12-16 09:44:18.469039002 -0600
4@@ -1035,5 +1035,3 @@
5
6 /* This target uses the sysv4.opt file. */
7 #define TARGET_USES_SYSV4_OPT 1
8-
9-#undef DBX_REGISTER_NUMBER
diff --git a/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch b/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch
deleted file mode 100644
index 51dc558..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_SSIZE_MAX_undefine_issue.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gcc-4_6-branch/gcc/config/host-linux.c.orig 2012-03-08 02:18:57.282190580 -0600
2+++ gcc-4_6-branch/gcc/config/host-linux.c 2012-03-08 02:19:30.930158694 -0600
3@@ -17,6 +17,8 @@
4 along with GCC; see the file COPYING3. If not see
5 <http://www.gnu.org/licenses/>. */
6
7+#include <bits/posix1_lim.h>
8+
9 #include "config.h"
10 #include "system.h"
11 #include "coretypes.h"
diff --git a/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch b/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch
deleted file mode 100644
index cfceafd..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1gcc.fix_build-with-cxx
2
3On native builds, when linking cc1 with static libraries (ppl cloog,
4gmp, mpfr), there is c++ code brought in by libppl. Normally cc1 is
5linked through "gcc", but in this case it should be linked with "g++".
6
7To work around this, gcc is configured with --enable-build-with-cxx,
8which compiles and links the entire compiler with g++. Since g++ is
9more rigorous about the use of the "const" keyword, there is a couple
10of places that we get syntax errors. This patch fixes them.
11
12--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-05-09 10:35:55.627190744 -0500
13+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-05-09 10:39:09.232814653 -0500
14@@ -22502,11 +22502,12 @@
15 rs6000_xcoff_strip_dollar (const char *name)
16 {
17 char *strip, *p;
18+ const char *q;
19 int len;
20
21- p = strchr (name, '$');
22+ q = strchr (name, '$');
23
24- if (p == 0 || p == name)
25+ if (q == 0 || q == name)
26 return name;
27
28 len = strlen (name);
29--- gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c-orig 2011-05-11 13:46:44.559065173 -0500
30+++ gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c 2011-05-11 13:48:34.956939829 -0500
31@@ -1878,7 +1878,7 @@
32 static const char *
33 newabi_append_ro (const char *name)
34 {
35- char *dollar;
36+ const char *dollar;
37 char *p;
38 static char string[BUFSIZE];
39 dollar = strchr (name, '$');
diff --git a/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch b/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch
deleted file mode 100644
index afa29d9..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_cloogstatic2.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1gcc.fix_cloogstatic2
2
3When only static libraries are available (so we can build cc1 without
4depending on extras libraries), we get a bunch of undefined symbols
5that are defined in libpwl. This patch explicitly adds libpwl to the
6linker command.
7
8--- gcc-trunk/configure.orig 2011-03-10 12:48:29.433528020 -0600
9+++ gcc-trunk/configure 2011-03-10 12:52:11.342145967 -0600
10@@ -5770,7 +5770,7 @@
11 LDFLAGS="$saved_LDFLAGS"
12 fi
13
14- ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx"
15+ ppllibs="$ppllibs -lppl_c -lppl -lpwl $pwllib -lgmpxx"
16
17 if test "$enable_ppl_version_check" != no; then
18 saved_CFLAGS="$CFLAGS"
diff --git a/recipes-devtools/gcc/files/gcc.fix_constvector.patch b/recipes-devtools/gcc/files/gcc.fix_constvector.patch
deleted file mode 100644
index c4a2776..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_constvector.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1For altivec targets, 32 bits, the spec2k-gap bmk does not build. The
2reason is that at some point the vectorizer creates an CONST_VECTOR
3rtl, where the elements are SYMBOL_REFs.
4
5Gcc ICE on simplify_immed_subreg, where it checks that CONST_VECTORS
6can be only made of CONST_INT, CONST_DOUBLE, or CONST_FIXED.
7
8I really don't understand what that function does, but since the
9vectorizer will bailout later anyway, I think it is safe to treat
10SYMBOL_REFs as CONST_INT. (NOT for FSF submission, as I really don't
11have a clue)
12
13This problem does not exists on gcc-4.5
14
15This problem does not exists on 64 bits, since there is no altivec
16type that can support 64bit elements.
17
18Here is a simplified test case:
19
20typedef void f_t (void);
21extern f_t f;
22extern f_t *A[12];
23extern f_t *B[12];
24void bad_vector ()
25{
26 int i;
27
28 for (i = 0; i < 12; i++ ) {
29 A[i] = f;
30 B[i] = f;
31 }
32}
33
34--- gcc-4.6.2/gcc/simplify-rtx.c~ 2011-12-28 12:28:01.700039002 -0600
35+++ gcc-4.6.2/gcc/simplify-rtx.c 2011-12-28 12:38:22.287039002 -0600
36@@ -5001,6 +5001,7 @@
37 switch (GET_CODE (el))
38 {
39 case CONST_INT:
40+ case SYMBOL_REF:
41 for (i = 0;
42 i < HOST_BITS_PER_WIDE_INT && i < elem_bitsize;
43 i += value_bit)
diff --git a/recipes-devtools/gcc/files/gcc.fix_header_issue.patch b/recipes-devtools/gcc/files/gcc.fix_header_issue.patch
deleted file mode 100644
index e2b9f7f..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_header_issue.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1--- gcc-4_6-branch/gcc/limitx.h.orig 2012-03-08 01:11:23.024440826 -0600
2+++ gcc-4_6-branch/gcc/limitx.h 2012-03-08 01:13:44.372515706 -0600
3@@ -30,6 +30,7 @@
4 #define _GCC_LIMITS_H_
5
6 #ifndef _LIBC_LIMITS_H_
7-/* Use "..." so that we find syslimits.h only in this same directory. */
8-#include "syslimits.h"
9+#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
10+#include_next <limits.h>
11+#undef _GCC_NEXT_LIMITS_H
12 #endif
diff --git a/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch b/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch
deleted file mode 100644
index 86ad32a..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_ira-loop-pressure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-loop_invariant/gcc/config/rs6000/rs6000.c
2--- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-11-24 00:03:49.709144001 -0600
3+++ gcc-4.6.2-loop_invariant/gcc/config/rs6000/rs6000.c 2011-12-12 23:49:27.901487730 -0600
4@@ -2723,7 +2723,7 @@
5 calculation works better for RTL loop invariant motion on targets
6 with enough (>= 32) registers. It is an expensive optimization.
7 So it is on only for peak performance. */
8- if (optimize >= 3 && global_init_p)
9+ if (optimize >= 3 && global_init_p && !global_options_set.x_flag_ira_loop_pressure)
10 flag_ira_loop_pressure = 1;
11
12 /* Set the pointer size. */
diff --git a/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch b/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch
deleted file mode 100644
index 2d7fae7..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_longversionstring.patch
+++ /dev/null
@@ -1,16 +0,0 @@
1gcc.fix_longversionstring
2
3Freescale version string is really long, and it can overflow a
4buffer. This patch extends the size of the buffer.
5
6--- gcc-4.6.0/gcc/dwarf2out.c-orig 2011-03-18 11:22:01.000000000 -0500
7+++ gcc-4.6.0/gcc/dwarf2out.c 2011-05-06 10:24:24.114277925 -0500
8@@ -20005,7 +20005,7 @@
9 gen_compile_unit_die (const char *filename)
10 {
11 dw_die_ref die;
12- char producer[250];
13+ char producer[2500];
14 const char *language_string = lang_hooks.name;
15 int language;
16
diff --git a/recipes-devtools/gcc/files/gcc.fix_min_max.patch b/recipes-devtools/gcc/files/gcc.fix_min_max.patch
deleted file mode 100644
index 81167be..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_min_max.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1diff -Naur gcc-4.6.2/gcc/config/rs6000/rs6000.c gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c
2--- gcc-4.6.2/gcc/config/rs6000/rs6000.c 2011-09-18 17:01:56.000000000 -0500
3+++ gcc-4.6.2-modified-office2-gs8-ice-fix/gcc/config/rs6000/rs6000.c 2012-01-13 07:07:31.702487887 -0600
4@@ -17727,11 +17727,34 @@
5 c = GEU;
6
7 if (code == SMAX || code == UMAX)
8+ {
9 target = emit_conditional_move (dest, c, op0, op1, mode,
10 op0, op1, mode, 0);
11+ if(!target)
12+ {
13+ rtx tem;
14+ tem = simplify_const_relational_operation (c, mode, op0, op1);
15+ if(rtx_equal_p(tem,const0_rtx))
16+ target = op1;
17+ else if(rtx_equal_p(tem,const1_rtx))
18+ target = op0;
19+ }
20+
21+ }
22 else
23+ {
24 target = emit_conditional_move (dest, c, op0, op1, mode,
25 op1, op0, mode, 0);
26+ if(!target)
27+ {
28+ rtx tem;
29+ tem = simplify_const_relational_operation (c, mode, op0, op1);
30+ if(rtx_equal_p(tem,const0_rtx))
31+ target = op0;
32+ else if(rtx_equal_p(tem,const1_rtx))
33+ target = op1;
34+ }
35+ }
36 gcc_assert (target);
37 if (target != dest)
38 emit_move_insn (dest, target);
diff --git a/recipes-devtools/gcc/files/gcc.fix_mingw32.patch b/recipes-devtools/gcc/files/gcc.fix_mingw32.patch
deleted file mode 100644
index 0d8c00e..0000000
--- a/recipes-devtools/gcc/files/gcc.fix_mingw32.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gcc-4.6.0/gcc/configure~ 2011-02-28 09:36:37.000000000 -0600
2+++ gcc-4.6.0/gcc/configure 2011-06-28 10:07:22.430630818 -0500
3@@ -10898,7 +10898,7 @@
4 saved_CFLAGS="${CFLAGS}"
5 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
6 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
7- ${realsrcdir}/configure \
8+ ${realsrcdir}/configure --with-gnu-ld --with-gnu-as --enable-targets=all \
9 --enable-languages=${enable_languages-all} \
10 --target=$target_alias --host=$build_alias --build=$build_alias
11 CFLAGS="${saved_CFLAGS}"
diff --git a/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch b/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch
deleted file mode 100644
index 2eb270e..0000000
--- a/recipes-devtools/gcc/files/gcc.ld_unaligned-460.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1gcc.ld_unaligned-460
2
3Optimization:
4Allows a "ld" of an address that is world aligned. There is a penalty
5performance, but it still beats a pair of "lwz".
6
7Index: gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c
8===================================================================
9--- gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c (revision 137727)
10+++ gcc-4.4-e500mc64-20090322/gcc/config/rs6000/rs6000.c (working copy)
11@@ -10640,7 +10667,9 @@
12 else if (bytes >= 8 && TARGET_POWERPC64
13 /* 64-bit loads and stores require word-aligned
14 displacements. */
15- && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32)))
16+ && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32)
17+ || rs6000_cpu == PROCESSOR_PPCE5500
18+ || rs6000_cpu == PROCESSOR_PPCE6500))
19 {
20 clear_bytes = 8;
21 mode = DImode;
22@@ -10775,7 +10808,9 @@
23 else if (bytes >= 8 && TARGET_POWERPC64
24 /* 64-bit loads and stores require word-aligned
25 displacements. */
26- && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32)))
27+ && (align >= 64 || (!STRICT_ALIGNMENT && align >= 32)
28+ || rs6000_cpu == PROCESSOR_PPCE5500
29+ || rs6000_cpu == PROCESSOR_PPCE6500))
30 {
31 move_bytes = 8;
32 mode = DImode;
diff --git a/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch b/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch
deleted file mode 100644
index a03a7ff..0000000
--- a/recipes-devtools/gcc/files/gcc.load_on_store_bypass-462.patch
+++ /dev/null
@@ -1,138 +0,0 @@
1
2 This patch implements option -fbypass-load-on-store
3
4 A load on store collision causes the load to to be replayed if the store has not completed.
5 Under -fbypass-load-on-store, GCC will attempt to avoid a load on store collision by trying
6 to space the load away from the store by scheduling upto 14 instructions in between, to
7 prevent the load from executing too early.
8
9 -fbypass-load-on-store is enabled under -fschedule-insns
10
11 Cores supported: e5500, e6500, e500mc
12
13 Ref: Load-on-Store Collision Avoidance by Software Stall of Load. James Yang. May 18, 2010
14
15diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/common.opt fsl-gcc-4.6.2-new-bypass/gcc/common.opt
16--- fsl-gcc-4.6.2-sans-bypass/gcc/common.opt 2011-11-29 11:10:18.967872292 -0600
17+++ fsl-gcc-4.6.2-new-bypass/gcc/common.opt 2011-11-29 14:02:46.765994436 -0600
18@@ -840,6 +840,10 @@
19 Common Report Var(flag_btr_bb_exclusive) Optimization
20 Restrict target load migration not to re-use registers in any basic block
21
22+fbypass-load-on-store
23+Common Report Var(flag_bypass_load_on_store) Optimization
24+Bypass load on store collision
25+
26 fcall-saved-
27 Common Joined RejectNegative Var(common_deferred_options) Defer
28 -fcall-saved-<register> Mark <register> as being preserved across functions
29diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc64.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc64.md
30--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc64.md 2011-11-29 11:11:38.454868780 -0600
31+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc64.md 2011-11-29 17:10:39.849869060 -0600
32@@ -189,3 +189,5 @@
33 (and (eq_attr "type" "ddiv")
34 (eq_attr "cpu" "ppce500mc64"))
35 "e500mc64_decode,e500mc64_issue+e500mc64_fpu,e500mc64_fpu*34")
36+
37+(define_bypass 15 "e500mc64_store" "e500mc64_load" "rs6000_bypass_load_on_store_collision_p")
38diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc.md
39--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e500mc.md 2011-11-29 11:11:38.479869032 -0600
40+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e500mc.md 2011-11-29 17:10:27.810997020 -0600
41@@ -198,3 +198,5 @@
42 (and (eq_attr "type" "ddiv")
43 (eq_attr "cpu" "ppce500mc"))
44 "e500mc_decode,e500mc_issue+e500mc_fpu,e500mc_fpu*65")
45+
46+(define_bypass 15 "e500mc_store" "e500mc_load" "rs6000_bypass_load_on_store_collision_p")
47diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e5500.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e5500.md
48--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e5500.md 2011-11-29 11:11:38.321744639 -0600
49+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e5500.md 2011-11-29 17:10:47.255997293 -0600
50@@ -174,3 +174,5 @@
51 (and (eq_attr "type" "cr_logical,delayed_cr")
52 (eq_attr "cpu" "ppce5500"))
53 "e5500_decode,e5500_bu")
54+
55+(define_bypass 15 "e5500_store" "e5500_load" "rs6000_bypass_load_on_store_collision_p")
56diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e6500.md fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e6500.md
57--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/e6500.md 2011-11-29 11:11:37.831996567 -0600
58+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/e6500.md 2011-11-29 17:11:00.902869709 -0600
59@@ -211,3 +211,5 @@
60 (and (eq_attr "type" "vecperm")
61 (eq_attr "cpu" "ppce6500"))
62 "e6500_decode,e6500_vecperm")
63+
64+(define_bypass 15 "e6500_store" "e6500_load" "rs6000_bypass_load_on_store_collision_p")
65diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000.c fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000.c
66--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000.c 2011-11-29 11:11:38.393748363 -0600
67+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000.c 2011-11-29 17:10:15.740745470 -0600
68@@ -28719,3 +28719,20 @@
69
70
71 #include "gt-rs6000.h"
72+
73+bool
74+rs6000_bypass_load_on_store_collision_p (rtx out_insn, rtx in_insn)
75+{
76+ /* The out_insn is a store and the in_insn is a load */
77+ if (flag_bypass_load_on_store &&
78+ (GET_CODE (PATTERN (out_insn)) == SET &&
79+ GET_CODE (SET_DEST (PATTERN (out_insn))) == MEM &&
80+ GET_CODE (SET_SRC (PATTERN (out_insn))) == REG) &&
81+ (GET_CODE (PATTERN (in_insn)) == SET &&
82+ GET_CODE (SET_DEST (PATTERN (in_insn))) == REG &&
83+ GET_CODE (SET_SRC (PATTERN (in_insn))) == MEM))
84+ return rtx_equal_p (SET_DEST (PATTERN (out_insn)),
85+ SET_SRC (PATTERN (in_insn)));
86+ else
87+ return false;
88+}
89diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000-protos.h fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000-protos.h
90--- fsl-gcc-4.6.2-sans-bypass/gcc/config/rs6000/rs6000-protos.h 2011-11-29 11:11:37.783996630 -0600
91+++ fsl-gcc-4.6.2-new-bypass/gcc/config/rs6000/rs6000-protos.h 2011-11-29 17:42:51.443119385 -0600
92@@ -174,6 +174,8 @@
93
94 extern void rs6000_aix_asm_output_dwarf_table_ref (char *);
95
96+extern bool rs6000_bypass_load_on_store_collision_p (rtx out_insn, rtx in_insn);
97+
98 /* Declare functions in rs6000-c.c */
99
100 extern void rs6000_pragma_longcall (struct cpp_reader *);
101diff -ruN fsl-gcc-4.6.2-sans-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c fsl-gcc-4.6.2-new-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c
102--- fsl-gcc-4.6.2-sans-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c 1969-12-31 18:00:00.000000000 -0600
103+++ fsl-gcc-4.6.2-new-bypass/gcc/testsuite/gcc.target/powerpc/bypass-load-on-store.c 2011-11-30 16:36:55.168869498 -0600
104@@ -0,0 +1,34 @@
105+/* { dg-do compile { target { powerpc*-*-* } } } */
106+/* { dg-options "-O0 -fschedule-insns -fbypass-load-on-store -fdump-rtl-sched1 -fsched-verbose=2" } */
107+
108+void nescaf(void)
109+{
110+ long a, b, c, d,
111+ e, f, g, h,
112+ i, j, k, l,
113+ m, n, o, p,
114+ q, r, s, t,
115+
116+ z, w;
117+
118+ a = 41; b = 79; c = 20; d = 11;
119+ e = 13; f = 43; g = 13; h = 21;
120+ i = 12; j = 45; k = 55; l = 90;
121+ m = 23; n = 61; o = 89; p = 53;
122+ q = 83; r = 52; s = 76; t = 99;
123+
124+ /* Now, we have a store followed by a load. The assignments to a-t are
125+ * all independent of the store-load computation below. The question is:
126+ * Under -fschedule-insns -fbypass-load-on-store, are 14 of the above
127+ * instructions moved between the store-load?
128+ */
129+ z = 121;
130+ w = z;
131+}
132+
133+/* Note: There is going to be exactly one insn that will be assigned cost 15.
134+ * Since its insn-number will likely change, we do not include the insn
135+ * number in the scan - just the part of the dump that'll be invariant.
136+ */
137+/* { dg-final { scan-rtl-dump "into queue with cost=15" "sched1" { target powerpc*-*-* } } } */
138+/* { dg-final { cleanup-rtl-dump "sched1" } } */
diff --git a/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch b/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch
deleted file mode 100644
index feee54a..0000000
--- a/recipes-devtools/gcc/files/gcc.local_unaligned_altivec.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1gcc.local_unaligned_altivec
2
3Optimization:
4On Altivec targets, make all char arrays 128 bits aligned (instead of
532 bits aligned)
6
7--- gcc-4.5.0/gcc/config/rs6000/rs6000.h-orig 2010-10-20 10:23:52.000000000 -0500
8+++ gcc-4.5.0/gcc/config/rs6000/rs6000.h 2010-10-20 10:39:14.000000000 -0500
9@@ -768,7 +768,8 @@
10 ? 64 \
11 : (TREE_CODE (TYPE) == ARRAY_TYPE \
12 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
13- && (ALIGN) < BITS_PER_WORD) ? BITS_PER_WORD : (ALIGN)))
14+ && (ALIGN) < (TARGET_ALTIVEC ? 128 : BITS_PER_WORD)) \
15+ ? (TARGET_ALTIVEC ? 128 : BITS_PER_WORD) : (ALIGN)))
16
17 /* Nonzero if move instructions will actually fail to work
18 when given unaligned data. */
diff --git a/recipes-devtools/gcc/files/gcc.opt-array-offset.patch b/recipes-devtools/gcc/files/gcc.opt-array-offset.patch
deleted file mode 100644
index 7cdc6f7..0000000
--- a/recipes-devtools/gcc/files/gcc.opt-array-offset.patch
+++ /dev/null
@@ -1,350 +0,0 @@
1Implements a GIMPLE pass to optimize array access by factoring
2out expressions that calculate address offset from
3multiple array access. Controls with flag -fopt-array-offset
4
5diff -ruN XLMe500mc/gcc/common.opt XLMe5500/gcc/common.opt
6--- XLMe500mc/gcc/common.opt 2011-10-18 14:49:23.026644000 -0500
7+++ XLMe5500/gcc/common.opt 2011-10-05 12:39:26.242644101 -0500
8@@ -1992,6 +1992,10 @@
9 Common Report Var(flag_tree_vrp) Init(0) Optimization
10 Perform Value Range Propagation on trees
11
12+fopt-array-offset
13+Common Report Var(flag_opt_array_offset)
14+Expand array offset address calculations
15+
16 funit-at-a-time
17 Common Report Var(flag_unit_at_a_time) Init(1) Optimization
18 Compile whole compilation unit at a time
19diff -ruN XLMe500mc/gcc/Makefile.in XLMe5500/gcc/Makefile.in
20--- XLMe500mc/gcc/Makefile.in 2011-10-18 14:49:23.028644000 -0500
21+++ XLMe5500/gcc/Makefile.in 2011-10-05 12:08:28.104643898 -0500
22@@ -1306,6 +1306,7 @@
23 omp-low.o \
24 optabs.o \
25 options.o \
26+ opt-array-offset.o \
27 opts-common.o \
28 opts-global.o \
29 opts.o \
30@@ -2629,7 +2630,10 @@
31 $(FLAGS_H) $(CGRAPH_H) $(PLUGIN_H) \
32 $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \
33 $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H) $(REGSET_H)
34-
35+opt-array-offset.o : opt-array-offset.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
36+ $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(TIMEVAR_H) \
37+ $(TREE_PASS_H) alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H) \
38+ $(DIAGNOSTIC_H) gimple-pretty-print.h tree-pretty-print.h
39 widen-types.o : widen-types.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
40 $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \
41 $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \
42diff -ruN XLMe500mc/gcc/opt-array-offset.c XLMe5500/gcc/opt-array-offset.c
43--- XLMe500mc/gcc/opt-array-offset.c 1969-12-31 18:00:00.000000000 -0600
44+++ XLMe5500/gcc/opt-array-offset.c 2011-11-01 15:24:21.746039000 -0500
45@@ -0,0 +1,283 @@
46+/* Optimizing array element access
47+ Copyright (C) 2011
48+ Free Software Foundation, Inc.
49+
50+This file is part of GCC.
51+
52+GCC is free software; you can redistribute it and/or modify it
53+under the terms of the GNU General Public License as published by the
54+Free Software Foundation; either version 3, or (at your option) any
55+later version.
56+
57+GCC is distributed in the hope that it will be useful, but WITHOUT
58+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
59+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
60+for more details.
61+
62+You should have received a copy of the GNU General Public License
63+along with GCC; see the file COPYING3. If not see
64+<http://www.gnu.org/licenses/>. */
65+
66+
67+/* This is a GIMPLE pass over basic block which coverts the stmts:
68+
69+ a = b +/- c1;
70+ c = a * c2;
71+
72+ to:
73+
74+ a = b * c2;
75+ c = a +/- c1 * c2;
76+
77+ in effect expanding the multiplication across addition/substraction.
78+
79+ Motivating example:
80+ Consider the following simple integer array access:
81+
82+ a[i] = c;
83+ a[i + 1] = c;
84+
85+ The following GIMPLE equivalent will be generated:
86+
87+ off_1 = i * 4;
88+ a_i = a + off_1;
89+ *a_i = c;
90+
91+ off_1 = i + 1;
92+ off_2 = off_1 * 4;
93+ a_i1 = a + off_2;
94+ *a_i1 = c;
95+
96+ Notice that a_i1 could simply be a_i + 4. But the calcuation of i+1
97+ is preventing CSE to perform. This pass will essentially convert the
98+ second expr into:
99+
100+ off_1 = i * 4;
101+ off_2 = off_1 + 4;
102+ a_i1 = a + off_2;
103+ ....
104+
105+ Thus allowing the previous index i calculation to be reuse. off_1 + 4
106+ would also be combined into a_i if offset addressing mode is available.
107+ This also have side effect of avoiding redundant sign extension on
108+ i+1 for LP64 model where native integer size is different from pointer size.
109+
110+ The algorithm iterates through all the basic blocks looking for
111+ the above pattern. Care is taken to make sure off_1 only
112+ has the single use otherwise the transformation cannot be perform.
113+*/
114+
115+
116+#include "config.h"
117+#include "system.h"
118+#include "coretypes.h"
119+#include "tm.h"
120+#include "flags.h"
121+#include "tree.h"
122+#include "tree-flow.h"
123+#include "timevar.h"
124+#include "tree-pass.h"
125+#include "alloc-pool.h"
126+#include "basic-block.h"
127+#include "target.h"
128+#include "gimple-pretty-print.h"
129+#include "tree-pretty-print.h"
130+
131+
132+/*
133+ We are looking for:
134+ a = b +/- c1
135+ c = a * c2 (stmt incoming)
136+ d = &arr + c
137+*/
138+static bool
139+is_candidate (gimple stmt)
140+{
141+ tree mul_result = gimple_get_lhs (stmt);
142+ tree rhs1, rhs2;
143+ gimple rhs1_stmt, use_stmt;
144+ use_operand_p use_p;
145+ imm_use_iterator imm_iter;
146+
147+ /* check for a * c2 */
148+ if (gimple_assign_rhs_code (stmt) != MULT_EXPR)
149+ return false;
150+
151+ rhs1 = gimple_assign_rhs1 (stmt);
152+ rhs2 = gimple_assign_rhs2 (stmt);
153+
154+ if (TREE_CODE (rhs2) != INTEGER_CST)
155+ return false;
156+
157+ /* check for b + c1 */
158+ if (TREE_CODE (rhs1) == SSA_NAME)
159+ {
160+ rhs1_stmt = SSA_NAME_DEF_STMT (rhs1);
161+ if (is_gimple_assign (rhs1_stmt))
162+ {
163+ tree rhs1_2;
164+ tree plusminus_result;
165+
166+ if (gimple_assign_rhs_code (rhs1_stmt) != PLUS_EXPR
167+ && gimple_assign_rhs_code (rhs1_stmt) != MINUS_EXPR)
168+ return false;
169+
170+ rhs1_2 = gimple_assign_rhs2 (rhs1_stmt);
171+ if (TREE_CODE (rhs1_2) != INTEGER_CST)
172+ return false;
173+
174+ /* make sure there are no other uses of a
175+ e.g. if a is used as an indcution variable
176+ we cannot modified it
177+ */
178+ plusminus_result = gimple_get_lhs (rhs1_stmt);
179+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, plusminus_result)
180+ {
181+ use_stmt = USE_STMT (use_p);
182+
183+ /* ignore PHI node */
184+ if (is_gimple_assign (use_stmt) &&
185+ (gimple_assign_rhs_code (use_stmt) == GIMPLE_PHI))
186+ continue;
187+ if (use_stmt != stmt)
188+ return false;
189+ }
190+
191+#if 0
192+ if (gimple_bb(rhs1_stmt) != gimple_bb(stmt))
193+ return false;
194+#endif
195+ }
196+ else
197+ return false;
198+ }
199+ else
200+ return false;
201+
202+ /* now look for uses of c that is a pointer use */
203+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, mul_result)
204+ {
205+ enum tree_code use_code;
206+
207+ use_stmt = USE_STMT (use_p);
208+
209+ if (is_gimple_debug (use_stmt))
210+ continue;
211+
212+ if (gimple_bb (use_stmt) != gimple_bb (stmt))
213+ return false;
214+
215+ if (!is_gimple_assign (use_stmt))
216+ return false;
217+
218+ use_code = gimple_assign_rhs_code (use_stmt);
219+ if (use_code != POINTER_PLUS_EXPR)
220+ return false;
221+ }
222+
223+ if (dump_file)
224+ {
225+ fprintf (dump_file, "Found candidate:\n");
226+ print_gimple_stmt (dump_file, rhs1_stmt, 0, TDF_SLIM);
227+ print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
228+ print_gimple_stmt (dump_file, use_stmt, 0, TDF_SLIM);
229+ }
230+
231+ return true;
232+}
233+
234+/* Do the actual transformation:
235+ a = b + c1 ==> a = b * c2
236+ c = a * c2 ==> c = a + c1*c2
237+*/
238+static bool
239+expand_plusminus_mult (gimple stmt)
240+{
241+ tree c1, c2, mul_result;
242+ gimple rhs1_stmt;
243+
244+ /* get c2 */
245+ c2 = gimple_assign_rhs2 (stmt);
246+
247+ /* get c1 */
248+ rhs1_stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
249+ c1 = gimple_assign_rhs2 (rhs1_stmt);
250+
251+ /* form c1 * c2 */
252+ mul_result = double_int_to_tree (TREE_TYPE(c2), double_int_mul
253+ (tree_to_double_int (c1), tree_to_double_int (c2)));
254+
255+ /* a = b + c1 ==> a = b * c2 */
256+ gimple_assign_set_rhs2 (rhs1_stmt, c2);
257+ gimple_assign_set_rhs_code (rhs1_stmt, MULT_EXPR);
258+ update_stmt (rhs1_stmt);
259+
260+ /* c = a * c2 ==> c = a + c1*c2 */
261+ gimple_assign_set_rhs2 (stmt, mul_result);
262+ /* MINUS_EXPR has already been embedded into c1*c2 */
263+ gimple_assign_set_rhs_code (stmt, PLUS_EXPR);
264+ update_stmt (stmt);
265+
266+ return true;
267+}
268+
269+
270+static unsigned int
271+execute_opt_array_offset (void)
272+{
273+ basic_block bb;
274+ tree fndecl;
275+
276+ FOR_EACH_BB (bb)
277+ {
278+ gimple_stmt_iterator gsi;
279+
280+ for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi); gsi_next(&gsi))
281+ {
282+ gimple stmt = gsi_stmt (gsi);
283+ tree lhs,rhs1,rhs2,rhs3;
284+ enum tree_code code;
285+
286+ /* only interested in assign statement */
287+ if (is_gimple_assign (stmt))
288+ {
289+ /* find stmts calculating array offset */
290+ if (is_candidate (stmt))
291+ /* convert stmt */
292+ expand_plusminus_mult(stmt);
293+
294+ }
295+ }
296+ }
297+
298+ return 0;
299+}
300+
301+static bool
302+gate_opt_array_offset (void)
303+{
304+ return flag_opt_array_offset && optimize;
305+}
306+
307+struct gimple_opt_pass pass_opt_array_offset =
308+{
309+ {
310+ GIMPLE_PASS,
311+ "opt_array_offset", /* name */
312+ gate_opt_array_offset, /* gate */
313+ execute_opt_array_offset, /* execute */
314+ NULL, /* sub */
315+ NULL, /* next */
316+ 0, /* static_pass_number */
317+ TV_NONE, /* tv_id */
318+ PROP_ssa, /* properties_required */
319+ 0, /* properties_provided */
320+ 0, /* properties_destroyed */
321+ 0, /* todo_flags_start */
322+ TODO_verify_ssa
323+ | TODO_verify_stmts
324+ | TODO_update_ssa
325+ | TODO_dump_func /* todo_flags_finish */
326+ }
327+};
328+
329diff -ruN XLMe500mc/gcc/passes.c XLMe5500/gcc/passes.c
330--- XLMe500mc/gcc/passes.c 2011-10-18 14:49:23.029644000 -0500
331+++ XLMe5500/gcc/passes.c 2011-10-05 11:19:01.168644127 -0500
332@@ -937,6 +937,7 @@
333 NEXT_PASS (pass_phiopt);
334 NEXT_PASS (pass_fold_builtins);
335 NEXT_PASS (pass_optimize_widening_mul);
336+ NEXT_PASS (pass_opt_array_offset);
337 NEXT_PASS (pass_tail_calls);
338 NEXT_PASS (pass_rename_ssa_copies);
339 NEXT_PASS (pass_uncprop);
340diff -ruN XLMe500mc/gcc/tree-pass.h XLMe5500/gcc/tree-pass.h
341--- XLMe500mc/gcc/tree-pass.h 2011-10-18 14:49:23.029644000 -0500
342+++ XLMe5500/gcc/tree-pass.h 2011-10-05 11:19:59.665643705 -0500
343@@ -421,6 +421,7 @@
344 extern struct gimple_opt_pass pass_cse_sincos;
345 extern struct gimple_opt_pass pass_optimize_bswap;
346 extern struct gimple_opt_pass pass_optimize_widening_mul;
347+extern struct gimple_opt_pass pass_opt_array_offset;
348 extern struct gimple_opt_pass pass_warn_function_return;
349 extern struct gimple_opt_pass pass_warn_function_noreturn;
350 extern struct gimple_opt_pass pass_cselim;
diff --git a/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch b/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch
deleted file mode 100644
index 03e3ce9..0000000
--- a/recipes-devtools/gcc/files/gcc.remove_CCUNSmode_reference.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1--- gcc-4_6-branch/gcc/extelim.c.orig 2012-03-05 21:42:53.984215949 -0600
2+++ gcc-4_6-branch/gcc/extelim.c 2012-03-05 21:43:27.884394659 -0600
3@@ -922,8 +922,7 @@
4 && GET_MODE (exp) != HImode
5 && GET_MODE (exp) != SImode
6 && GET_MODE (exp) != DImode
7- && GET_MODE (exp) != CCmode
8- && GET_MODE (exp) != CCUNSmode)
9+ && GET_MODE (exp) != CCmode)
10 return false;
11
12 return true;
13@@ -1653,9 +1652,9 @@
14 For our targets, there is no 'cmph' insn, so we bail out
15 if we see a comparison of sizes less than a word (SI). */
16 if (REG_P (dest)
17- && (GET_MODE (dest) == CCmode || GET_MODE (dest) == CCUNSmode)
18+ && (GET_MODE (dest) == CCmode)
19 && GET_CODE (src) == COMPARE
20- && (GET_MODE (src) == CCmode || GET_MODE (src) == CCUNSmode))
21+ && (GET_MODE (src) == CCmode))
22 {
23 rtx compare_op0 = XEXP (src, 0);
24 rtx compare_op1 = XEXP (src, 1);
diff --git a/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch b/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch
deleted file mode 100644
index b02b755..0000000
--- a/recipes-devtools/gcc/files/gcc.rm_slow_tests.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1diff -urN gcc-4.6.0/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 gcc-4.6.0-fixed/gcc/testsuite/gfortran.dg/cray_pointers_8.f90
2--- gcc-4.6.0/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 2009-02-13 15:12:34.000000000 -0600
3+++ gcc-4.6.0-fixed/gcc/testsuite/gfortran.dg/cray_pointers_8.f90 1969-12-31 18:00:00.000000000 -0600
4@@ -1,63 +0,0 @@
5-! { dg-do run }
6-! { dg-options "-fcray-pointer" }
7-!
8-! Test the fix for PR36528 in which the Cray pointer was not passed
9-! correctly to 'euler' so that an undefined reference to fcn was
10-! generated by the linker.
11-!
12-! Reported by Tobias Burnus <burnus@gcc.gnu.org>
13-! from http://groups.google.com/group/comp.lang.fortran/msg/86b65bad78e6af78
14-!
15-real function p1(x)
16- real, intent(in) :: x
17- p1 = x
18-end
19-
20-real function euler(xp,xk,dx,f)
21- real, intent(in) :: xp, xk, dx
22- interface
23- real function f(x)
24- real, intent(in) :: x
25- end function
26- end interface
27- real x, y
28- y = 0.0
29- x = xp
30- do while (x .le. xk)
31- y = y + f(x)*dx
32- x = x + dx
33- end do
34- euler = y
35-end
36-program main
37- interface
38- real function p1 (x)
39- real, intent(in) :: x
40- end function
41- real function fcn (x)
42- real, intent(in) :: x
43- end function
44- real function euler (xp,xk,dx,f)
45- real, intent(in) :: xp, xk ,dx
46- interface
47- real function f(x)
48- real, intent(in) :: x
49- end function
50- end interface
51- end function
52- end interface
53- real x, xp, xk, dx, y, z
54- pointer (pfcn, fcn)
55- pfcn = loc(p1)
56- xp = 0.0
57- xk = 1.0
58- dx = 0.0005
59- y = 0.0
60- x = xp
61- do while (x .le. xk)
62- y = y + fcn(x)*dx
63- x = x + dx
64- end do
65- z = euler(0.0,1.0,0.0005,fcn)
66- if (abs (y - z) .gt. 1e-6) call abort
67-end
diff --git a/recipes-devtools/gcc/files/gcc.soft_float-460.patch b/recipes-devtools/gcc/files/gcc.soft_float-460.patch
deleted file mode 100644
index eafa6ab..0000000
--- a/recipes-devtools/gcc/files/gcc.soft_float-460.patch
+++ /dev/null
@@ -1,190 +0,0 @@
1diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc
2--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
3+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc 2011-05-11 20:03:39.000000000 -0500
4@@ -46,17 +46,17 @@
5
6 #ifndef ITERATIONS
7 # ifdef _GLIBCXX_DEBUG
8-# define ITERATIONS 100
9+# define ITERATIONS 2
10 # else
11-# define ITERATIONS 5000
12+# define ITERATIONS 2
13 #endif
14 #endif
15
16 #ifndef KEYS
17 # ifdef _GLIBCXX_DEBUG
18-# define KEYS 200
19+# define KEYS 5
20 # else
21-# define KEYS 10000
22+# define KEYS 5
23 # endif
24 #endif
25
26diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc
27--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
28+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc 2011-05-11 20:04:00.000000000 -0500
29@@ -46,17 +46,17 @@
30
31 #ifndef ITERATIONS
32 # ifdef _GLIBCXX_DEBUG
33-# define ITERATIONS 100
34+# define ITERATIONS 2
35 # else
36-# define ITERATIONS 5000
37+# define ITERATIONS 2
38 #endif
39 #endif
40
41 #ifndef KEYS
42 # ifdef _GLIBCXX_DEBUG
43-# define KEYS 200
44+# define KEYS 5
45 # else
46-# define KEYS 10000
47+# define KEYS 5
48 # endif
49 #endif
50
51diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc
52--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
53+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc 2011-05-11 20:02:23.000000000 -0500
54@@ -47,7 +47,7 @@
55 using namespace __gnu_pbds::test;
56 typedef lu_map_tl_t map_tl_t;
57
58- return rand_regression_test(50, 10,
59+ return rand_regression_test(2, 5,
60 "lu_data_map_rand_regression_test",
61 map_tl_t());
62 }
63diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc
64--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
65+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc 2011-05-11 20:02:23.000000000 -0500
66@@ -47,7 +47,7 @@
67 using namespace __gnu_pbds::test;
68 typedef lu_set_tl_t map_tl_t;
69
70- return rand_regression_test(50, 10,
71+ return rand_regression_test(2, 5,
72 "lu_no_data_map_rand_regression_test",
73 map_tl_t());
74 }
75diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc
76--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc 2011-05-11 20:01:58.000000000 -0500
77+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc 2011-05-11 20:02:23.000000000 -0500
78@@ -45,10 +45,10 @@
79 #include <regression/common_type.hpp>
80
81 #ifndef ITERATIONS
82-#define ITERATIONS 5000
83+#define ITERATIONS 2
84 #endif
85 #ifndef KEYS
86-#define KEYS 10000
87+#define KEYS 5
88 #endif
89 int
90 main(int argc, char* a_p_argv[])
91diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc
92--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
93+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc 2011-05-11 20:04:21.000000000 -0500
94@@ -46,17 +46,17 @@
95
96 #ifndef ITERATIONS
97 # ifdef _GLIBCXX_DEBUG
98-# define ITERATIONS 100
99+# define ITERATIONS 2
100 # else
101-# define ITERATIONS 5000
102+# define ITERATIONS 2
103 #endif
104 #endif
105
106 #ifndef KEYS
107 # ifdef _GLIBCXX_DEBUG
108-# define KEYS 200
109+# define KEYS 5
110 # else
111-# define KEYS 10000
112+# define KEYS 5
113 # endif
114 #endif
115
116diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc
117--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
118+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc 2011-05-11 20:04:41.000000000 -0500
119@@ -47,17 +47,17 @@
120
121 #ifndef ITERATIONS
122 # ifdef _GLIBCXX_DEBUG
123-# define ITERATIONS 100
124+# define ITERATIONS 2
125 # else
126-# define ITERATIONS 5000
127+# define ITERATIONS 2
128 #endif
129 #endif
130
131 #ifndef KEYS
132 # ifdef _GLIBCXX_DEBUG
133-# define KEYS 200
134+# define KEYS 5
135 # else
136-# define KEYS 10000
137+# define KEYS 5
138 # endif
139 #endif
140
141diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc
142--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
143+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc 2011-05-11 20:05:34.000000000 -0500
144@@ -46,17 +46,17 @@
145
146 #ifndef ITERATIONS
147 # ifdef _GLIBCXX_DEBUG
148-# define ITERATIONS 100
149+# define ITERATIONS 2
150 # else
151-# define ITERATIONS 5000
152+# define ITERATIONS 2
153 #endif
154 #endif
155
156 #ifndef KEYS
157 # ifdef _GLIBCXX_DEBUG
158-# define KEYS 200
159+# define KEYS 5
160 # else
161-# define KEYS 10000
162+# define KEYS 5
163 # endif
164 #endif
165
166diff -u gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc
167--- gcc-4.6.0-orig/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc 2011-05-11 20:01:58.000000000 -0500
168+++ gcc-4.6.0/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc 2011-05-11 20:05:50.000000000 -0500
169@@ -46,17 +46,17 @@
170
171 #ifndef ITERATIONS
172 # ifdef _GLIBCXX_DEBUG
173-# define ITERATIONS 100
174+# define ITERATIONS 2
175 # else
176-# define ITERATIONS 5000
177+# define ITERATIONS 2
178 #endif
179 #endif
180
181 #ifndef KEYS
182 # ifdef _GLIBCXX_DEBUG
183-# define KEYS 200
184+# define KEYS 5
185 # else
186-# define KEYS 10000
187+# define KEYS 5
188 # endif
189 #endif
190
diff --git a/recipes-devtools/gcc/files/gcc.widen_types-46.patch b/recipes-devtools/gcc/files/gcc.widen_types-46.patch
deleted file mode 100644
index 0590560..0000000
--- a/recipes-devtools/gcc/files/gcc.widen_types-46.patch
+++ /dev/null
@@ -1,1534 +0,0 @@
1diff -ruN gcc-4.6.0-orig/gcc/common.opt gcc-4.6.0-new/gcc/common.opt
2--- gcc-4.6.0-orig/gcc/common.opt 2011-03-05 18:38:13.000000000 -0600
3+++ gcc-4.6.0-new/gcc/common.opt 2011-08-25 13:16:36.408937475 -0500
4@@ -1797,6 +1797,10 @@
5 Common Report Var(flag_strict_overflow)
6 Treat signed overflow as undefined
7
8+fwiden-types
9+Common Report Var(flag_widen_types)
10+Widen signed integral variables (local, whose address has not been taken, non-volatile and having precision less than that of long) to long (retaining original qualifiers)
11+
12 fsyntax-only
13 Common Report Var(flag_syntax_only)
14 Check for syntax errors, then stop
15diff -ruN gcc-4.6.0-orig/gcc/Makefile.in gcc-4.6.0-new/gcc/Makefile.in
16--- gcc-4.6.0-orig/gcc/Makefile.in 2011-01-25 22:19:58.000000000 -0600
17+++ gcc-4.6.0-new/gcc/Makefile.in 2011-08-25 13:16:36.411937390 -0500
18@@ -1245,6 +1245,7 @@
19 gimple-fold.o \
20 gimple-low.o \
21 gimple-pretty-print.o \
22+ widen-types.o \
23 gimplify.o \
24 godump.o \
25 graph.o \
26@@ -2628,6 +2629,12 @@
27 $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) \
28 $(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H) $(REGSET_H)
29
30+widen-types.o : widen-types.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
31+ $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \
32+ $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \
33+ coretypes.h $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \
34+ $(GGC_H) gt-gimplify.h $(HASHTAB_H) $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(OPTABS_H) \
35+ $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h tree-pass.h tree-pretty-print.h
36 gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
37 $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \
38 $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \
39@@ -3733,6 +3740,7 @@
40 $(srcdir)/tree-cfg.c \
41 $(srcdir)/tree-dfa.c \
42 $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
43+ $(srcdir)/widen-types.c \
44 $(srcdir)/tree-chrec.h \
45 $(srcdir)/tree-scalar-evolution.c \
46 $(srcdir)/tree-ssa-operands.h \
47diff -ruN gcc-4.6.0-orig/gcc/passes.c gcc-4.6.0-new/gcc/passes.c
48--- gcc-4.6.0-orig/gcc/passes.c 2011-02-17 10:18:24.000000000 -0600
49+++ gcc-4.6.0-new/gcc/passes.c 2011-08-25 13:16:36.413937342 -0500
50@@ -719,6 +719,7 @@
51 backend might produce already lowered functions that are not processed
52 by these passes. */
53 p = &all_lowering_passes;
54+ NEXT_PASS (pass_widen_types_stmts);
55 NEXT_PASS (pass_warn_unused_result);
56 NEXT_PASS (pass_diagnose_omp_blocks);
57 NEXT_PASS (pass_mudflap_1);
58@@ -741,6 +742,7 @@
59 NEXT_PASS (pass_fixup_cfg);
60 NEXT_PASS (pass_init_datastructures);
61 NEXT_PASS (pass_expand_omp);
62+ NEXT_PASS (pass_widen_types_bbs);
63
64 NEXT_PASS (pass_referenced_vars);
65 NEXT_PASS (pass_build_ssa);
66diff -ruN gcc-4.6.0-orig/gcc/tree-pass.h gcc-4.6.0-new/gcc/tree-pass.h
67--- gcc-4.6.0-orig/gcc/tree-pass.h 2011-02-01 09:12:26.000000000 -0600
68+++ gcc-4.6.0-new/gcc/tree-pass.h 2011-08-25 13:16:36.406937543 -0500
69@@ -349,6 +349,7 @@
70
71 extern void tree_lowering_passes (tree decl);
72
73+extern struct gimple_opt_pass pass_widen_types_stmts;
74 extern struct gimple_opt_pass pass_mudflap_1;
75 extern struct gimple_opt_pass pass_mudflap_2;
76 extern struct gimple_opt_pass pass_lower_cf;
77@@ -409,6 +410,7 @@
78 extern struct gimple_opt_pass pass_lower_omp;
79 extern struct gimple_opt_pass pass_diagnose_omp_blocks;
80 extern struct gimple_opt_pass pass_expand_omp;
81+extern struct gimple_opt_pass pass_widen_types_bbs;
82 extern struct gimple_opt_pass pass_expand_omp_ssa;
83 extern struct gimple_opt_pass pass_object_sizes;
84 extern struct gimple_opt_pass pass_fold_builtins;
85diff -ruN gcc-4.6.0-orig/gcc/widen-types.c gcc-4.6.0-new/gcc/widen-types.c
86--- gcc-4.6.0-orig/gcc/widen-types.c 1969-12-31 18:00:00.000000000 -0600
87+++ gcc-4.6.0-new/gcc/widen-types.c 2011-08-25 17:27:31.372937392 -0500
88@@ -0,0 +1,1446 @@
89+/*
90+ Type Widening:
91+
92+ Locals and temporaries having signed integral types, whose address has
93+ not been taken, are not volatile qualified, and having type precision
94+ less than that of type long are widened to type long (with any other
95+ qualifiers retained).
96+
97+ Copyright (C) 2011
98+ Free Software Foundation, Inc.
99+
100+This file is part of GCC.
101+
102+GCC is free software; you can redistribute it and/or modify it under
103+the terms of the GNU General Public License as published by the Free
104+Software Foundation; either version 3, or (at your option) any later
105+version.
106+
107+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
108+WARRANTY; without even the implied warranty of MERCHANTABILITY or
109+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
110+for more details.
111+
112+You should have received a copy of the GNU General Public License
113+along with GCC; see the file COPYING3. If not see
114+<http://www.gnu.org/licenses/>. */
115+
116+#include "config.h"
117+#include "system.h"
118+#include "coretypes.h"
119+#include "tm.h"
120+#include "tree.h"
121+#include "tm_p.h"
122+#include "gimple.h"
123+#include "basic-block.h"
124+#include "tree-iterator.h"
125+#include "tree-inline.h"
126+#include "langhooks.h"
127+#include "tree-pretty-print.h"
128+#include "gimple-pretty-print.h"
129+#include "langhooks.h"
130+#include "tree-flow.h"
131+#include "cgraph.h"
132+#include "timevar.h"
133+#include "hashtab.h"
134+#include "flags.h"
135+#include "function.h"
136+#include "output.h"
137+#include "ggc.h"
138+#include "tree-dump.h"
139+#include "tree-pass.h"
140+#include "diagnostic-core.h"
141+#include "target.h"
142+#include "pointer-set.h"
143+#include "splay-tree.h"
144+#include "vec.h"
145+#include "gimple.h"
146+#include "tree-pass.h"
147+
148+#include "langhooks-def.h"
149+#include "expr.h"
150+
151+#include "except.h"
152+#include "value-prof.h"
153+#include "pointer-set.h"
154+
155+/* define TW_FINALIZE_STMTS to 1, if you want to run the widening
156+ * pass just after gimplification - over the sequence of statements.
157+ */
158+#define TW_FINALIZE_STMTS 1
159+
160+#define TW_DEBUG 0
161+#if TW_DEBUG
162+
163+#define TWDBG_STMT(stmt) fprintf (stderr, "%s: ", __FUNCTION__); \
164+ debug_gimple_stmt (stmt);
165+
166+#define TWDBG_TREE(tree) \
167+{ \
168+ fprintf (stderr, "%s:\n", #tree); \
169+ debug_tree (tree); \
170+ fprintf (stderr, "\n"); \
171+}
172+
173+#define TWDBG_MSG(fmt) \
174+fprintf (stderr, "%s: ", __FUNCTION__); \
175+fprintf (stderr, fmt)
176+
177+#define TWDBG_MSG1(fmt, msg) \
178+fprintf (stderr, "%s: ", __FUNCTION__); \
179+fprintf (stderr, fmt, msg)
180+
181+#else
182+#define TWDBG_STMT(stmt)
183+#define TWDBG_TREE(tree)
184+#define TWDBG_MSG(fmt)
185+#define TWDBG_MSG1(fmt, msg)
186+#endif
187+
188+#if TW_DEBUG
189+static void tw_dump_candidate_list (void);
190+static bool tw_debug_candidate (const void *t, void **candidacy, void *data);
191+#endif
192+static void tw_init (void);
193+static void tw_reset (void);
194+static long tw_candidate (tree node);
195+static long tw_candidate_const (tree node);
196+static long *tw_log_candidate (tree node);
197+static long tw_candidacy_valid (tree node);
198+static void tw_candidacy (tree node, long value);
199+static long tw_in_candidate_list (tree node);
200+static tree tw_widen_constant (tree node);
201+static tree tw_widen_variable (tree node);
202+#ifdef TW_FINALIZE_STMTS
203+static long tw_fn_has_openmp (gimple_seq stmts);
204+#endif
205+static void tw_log_parms (tree fndecl);
206+#ifdef TW_FINALIZE_STMTS
207+static void tw_log_vars (gimple_seq stmts);
208+#endif
209+static void tw_log_local_decls (void);
210+#ifdef TW_FINALIZE_STMTS
211+static unsigned int tw_finalize_stmts (void);
212+#endif
213+static unsigned int tw_finalize_bbs (void);
214+static long tw_gimple_in_seq (gimple_seq stmts, long widen);
215+static long tw_gimple_in_bb (basic_block bb, long widen);
216+static long tw_switch (gimple stmt, long widen);
217+static long tw_gimple_stmt (gimple stmt, long widen);
218+static long tw_gimple_assign (gimple stmt, long widen);
219+static long tw_gimple_assign_single (gimple stmt, long widen);
220+static long tw_gimple_assign_unary (gimple stmt, long widen);
221+static long tw_gimple_assign_binary (gimple stmt, long widen);
222+static long tw_gimple_assign_ternary (gimple stmt, long widen);
223+static bool is_formatted_IO_fn (tree decl);
224+static long tw_gimple_call (gimple stmt, long widen);
225+static long tw_gimple_comparison (gimple stmt, long widen);
226+static long tw_gimple_switch (gimple stmt, long widen);
227+static long tw_gimple_return (gimple stmt, long widen);
228+static long tw_gimple_asm (gimple stmt, long widen);
229+static long tw_gimple_debug (gimple stmt, long widen);
230+
231+static struct pointer_map_t *tw_candidate_list;
232+
233+#if TW_DEBUG
234+static void
235+tw_dump_candidate_list (void)
236+{
237+ TWDBG_MSG ("Dumping candidate list:\n");
238+ pointer_map_traverse (tw_candidate_list, tw_debug_candidate, NULL);
239+ TWDBG_MSG ("Done dumping candidate list\n");
240+}
241+
242+static
243+bool tw_debug_candidate (const void *t, void **candidacy, void *data)
244+{
245+ debug_tree (t);
246+ fprintf(stderr, "candidacy: %ld\n data (ignore): %p", *((long *) candidacy), data);
247+ return true;
248+}
249+#endif
250+
251+static void
252+tw_init (void)
253+{
254+ gcc_assert (tw_candidate_list == NULL);
255+ tw_candidate_list = pointer_map_create ();
256+}
257+
258+static void
259+tw_reset (void)
260+{
261+ if (tw_candidate_list)
262+ {
263+ pointer_map_destroy (tw_candidate_list);
264+ tw_candidate_list = NULL;
265+ }
266+}
267+
268+/* gcc.dg/torture/pr43879_[12].c
269+ * Initialized statics should not be widened:
270+ *
271+ * void bar(int c)
272+ * {
273+ * static int x = 1; // if widened, x gets initialized to (2^32)
274+ * if (c != x) __builtin_abort();
275+ * x--;
276+ * }
277+ *
278+ * int main()
279+ * {
280+ * int c = 1;
281+ * bar (1);
282+ * return 0;
283+ * }
284+ *
285+ * Likely, the initial value is laid out/translated to RTL way before
286+ * the rest of the code is translated to GIMPLE; so when we widen the
287+ * type, it's already too late.
288+ */
289+
290+/* tw_candidate() has no way to tell if it was passed a local variable
291+ * (or not) - so make sure it is passed local variables or parameters only.
292+ */
293+static long
294+tw_candidate (tree node)
295+{
296+ long rv = 0;
297+
298+ if (!node || TREE_TYPE (node) == error_mark_node)
299+ return 0;
300+
301+ if (node && TREE_TYPE (node) != error_mark_node &&
302+ ((TREE_CODE (node) == VAR_DECL &&
303+ /* See note: Initialized statics should not be widened. */
304+ (!TREE_STATIC (node) || !DECL_INITIAL (node))) ||
305+ TREE_CODE (node) == PARM_DECL ||
306+ TREE_CODE (node) == DEBUG_EXPR_DECL) &&
307+ !TYPE_VOLATILE (TREE_TYPE (node)) &&
308+ !TREE_ADDRESSABLE (node) &&
309+ !POINTER_TYPE_P (TREE_TYPE (node)) &&
310+ INTEGRAL_TYPE_P (TREE_TYPE (node)) &&
311+ !TYPE_UNSIGNED (TREE_TYPE (node)) &&
312+ (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (long_integer_type_node)))
313+ rv = 1;
314+ return rv;
315+}
316+
317+static long
318+tw_candidate_const (tree node)
319+{
320+ long rv = 0;
321+
322+ if (node && TREE_TYPE (node) != error_mark_node &&
323+ INTEGRAL_TYPE_P (TREE_TYPE (node)) &&
324+ TREE_CONSTANT (node) &&
325+ (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (long_integer_type_node)))
326+ rv = 1;
327+ return rv;
328+}
329+
330+static long *
331+tw_log_candidate (tree node)
332+{
333+ long *pval = NULL;
334+
335+ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node)
336+ {
337+ pval = (long *) pointer_map_contains (tw_candidate_list, node);
338+ if (!pval)
339+ {
340+ pval = (long *) pointer_map_insert (tw_candidate_list, node);
341+ *pval = 1;
342+ TWDBG_MSG ("Logged variable:\n");
343+ TWDBG_TREE (node);
344+ }
345+ }
346+ return pval;
347+}
348+
349+static long
350+tw_candidacy_valid (tree node)
351+{
352+ long rval = 0;
353+ long *pval = NULL;
354+
355+ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node)
356+ pval = (long *) pointer_map_contains (tw_candidate_list, node);
357+ if (pval)
358+ rval = *pval ? 1 : 0;
359+ return rval;
360+}
361+
362+static void
363+tw_candidacy (tree node, long value)
364+{
365+ long *pval;
366+
367+ if (tw_candidate_list && node)
368+ {
369+ pval = (long *) pointer_map_contains (tw_candidate_list, node);
370+ if (pval)
371+ {
372+ *pval = value;
373+#if TW_DEBUG
374+ fprintf (stderr, "Setting candidacy of node:\n");
375+ TWDBG_TREE (node);
376+ fprintf (stderr, "to: %ld\n", value);
377+#endif
378+ }
379+ }
380+}
381+
382+static long
383+tw_in_candidate_list (tree node)
384+{
385+ long *pval;
386+ long rval = 0;
387+
388+ if (tw_candidate_list && node && TREE_TYPE (node) != error_mark_node)
389+ {
390+ pval = (long *) pointer_map_contains (tw_candidate_list, node);
391+ rval = pval ? 1 : 0;
392+ }
393+ return rval;
394+}
395+
396+static tree
397+tw_widen_constant (tree node)
398+{
399+ if (node && tw_candidate_const (node))
400+ node = build_int_cst (long_integer_type_node, TREE_INT_CST_LOW (node));
401+
402+ return node;
403+}
404+
405+static tree
406+tw_widen_variable (tree node)
407+{
408+ if (node && tw_candidacy_valid (node))
409+ {
410+ TWDBG_MSG ("Widening:\n");
411+ TWDBG_TREE(node);
412+
413+ TREE_TYPE (node) = build_qualified_type (long_integer_type_node,
414+ TYPE_QUALS (TREE_TYPE (node)));
415+
416+ if (TREE_CODE (node) != DEBUG_EXPR_DECL)
417+ relayout_decl (node);
418+ }
419+ return node;
420+}
421+
422+#ifdef TW_FINALIZE_STMTS
423+static long
424+tw_fn_has_openmp (gimple_seq stmts)
425+{
426+ gimple_stmt_iterator ittr;
427+ long found_openmp = 0;
428+
429+ for (ittr = gsi_start (stmts); !gsi_end_p (ittr) && !found_openmp; gsi_next (&ittr))
430+ {
431+ gimple stmt = gsi_stmt (ittr);
432+
433+ switch (gimple_code (stmt))
434+ {
435+ case GIMPLE_BIND:
436+ found_openmp = tw_fn_has_openmp (gimple_bind_body (stmt));
437+ break;
438+
439+ case GIMPLE_TRY:
440+ found_openmp = tw_fn_has_openmp (gimple_try_eval (stmt));
441+ found_openmp = tw_fn_has_openmp (gimple_try_cleanup (stmt));
442+ break;
443+
444+ case GIMPLE_EH_FILTER:
445+ found_openmp = tw_fn_has_openmp (gimple_eh_filter_failure (stmt));
446+ break;
447+
448+ case GIMPLE_CATCH:
449+ found_openmp = tw_fn_has_openmp (gimple_catch_handler (stmt));
450+ break;
451+
452+ default:
453+ switch (gimple_code (stmt))
454+ {
455+ CASE_GIMPLE_OMP:
456+ found_openmp = 1;
457+ break;
458+ default:
459+ break;
460+ }
461+ }
462+ }
463+ return found_openmp;
464+}
465+#endif
466+
467+/* Originally, we implemented type widening over the emitted GIMPLE
468+ * sequence. Later on, we discovered that we needed to wait till
469+ * after OpenMP expansion, so we implemented type widening over the
470+ * CFG-BB form.
471+ */
472+#ifdef TW_FINALIZE_STMTS
473+struct gimple_opt_pass pass_widen_types_stmts =
474+{
475+ {
476+ GIMPLE_PASS,
477+ "tw-stmts", /* name */
478+ NULL, /* gate */
479+ tw_finalize_stmts, /* execute */
480+ NULL, /* sub */
481+ NULL, /* next */
482+ 0, /* static_pass_number */
483+ TV_NONE, /* tv_id */
484+ PROP_gimple_any, /* properties_required */
485+ 0, /* properties_provided */
486+ 0, /* properties_destroyed */
487+ 0, /* todo_flags_start */
488+ TODO_dump_func /* todo_flags_finish */
489+ }
490+};
491+#endif
492+
493+struct gimple_opt_pass pass_widen_types_bbs =
494+{
495+ {
496+ GIMPLE_PASS,
497+ "tw-bbs", /* name */
498+ NULL, /* gate */
499+ tw_finalize_bbs, /* execute */
500+ NULL, /* sub */
501+ NULL, /* next */
502+ 0, /* static_pass_number */
503+ TV_NONE, /* tv_id */
504+ PROP_gimple_any, /* properties_required */
505+ 0, /* properties_provided */
506+ 0, /* properties_destroyed */
507+ 0, /* todo_flags_start */
508+ TODO_dump_func /* todo_flags_finish */
509+ }
510+};
511+
512+static
513+void
514+tw_log_parms (tree fndecl)
515+{
516+ tree parm;
517+
518+ if (!fndecl)
519+ return;
520+ for (parm = DECL_ARGUMENTS (fndecl); parm; parm = DECL_CHAIN (parm))
521+ if (tw_candidate (parm))
522+ tw_log_candidate (parm);
523+ return;
524+}
525+
526+#ifdef TW_FINALIZE_STMTS
527+static
528+void
529+tw_log_vars (gimple_seq stmts)
530+{
531+ gimple_stmt_iterator ittr;
532+ tree vars, vindex;
533+
534+ if (!stmts)
535+ return;
536+
537+ gcc_assert (tw_candidate_list != NULL);
538+
539+ for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (&ittr))
540+ {
541+ gimple stmt = gsi_stmt (ittr);
542+
543+ switch (gimple_code (stmt))
544+ {
545+ case GIMPLE_BIND:
546+ vars = gimple_bind_vars (stmt);
547+ for (vindex = vars; vindex; vindex = DECL_CHAIN (vindex))
548+ if (tw_candidate (vindex))
549+ tw_log_candidate (vindex);
550+ tw_log_vars (gimple_bind_body (stmt));
551+ break;
552+
553+ case GIMPLE_TRY:
554+ tw_log_vars (gimple_try_eval (stmt));
555+ tw_log_vars (gimple_try_cleanup (stmt));
556+ break;
557+
558+ case GIMPLE_EH_FILTER:
559+ tw_log_vars (gimple_eh_filter_failure (stmt));
560+ break;
561+
562+ case GIMPLE_CATCH:
563+ tw_log_vars (gimple_catch_handler (stmt));
564+ break;
565+
566+ default:
567+ break;
568+ }
569+ }
570+
571+ return;
572+}
573+#endif
574+
575+static
576+void
577+tw_log_local_decls (void)
578+{
579+ tree decl;
580+ unsigned ix;
581+
582+ FOR_EACH_LOCAL_DECL (cfun, ix, decl)
583+ {
584+ TWDBG_MSG ("Testing decl:\n");
585+ TWDBG_TREE (decl);
586+ if (tw_candidate (decl))
587+ tw_log_candidate (decl);
588+ }
589+}
590+
591+/* Widen types. tw_finalize_stmts () can be run anytime immediately after
592+ * gimplification but before the CFG pass (see comment * accompanying
593+ * gimple_body ()).
594+ *
595+ * After gimplification has occurred, the emitted GIMPLE is
596+ * scanned to check if these variables are only used among
597+ * themselves (with the exception of being cast to unsigned long);
598+ * invalidating the candidacy of any variable that is used with
599+ * another outside this set (and so on recursively). The variables
600+ * that remain after this process all occur in operations with other
601+ * such candidate variables, (or with constants) - the type of all
602+ * such residual candidate variables (and of constants that appear
603+ * with these in operations) is changed to long (along with the
604+ * original accompannying qualifiers on the type).
605+ *
606+ * void
607+ * init_optimization_passes (void)
608+ *
609+ * p = &all_lowering_passes;
610+ * NEXT_PASS (pass_widen_types_stmts);
611+ * NEXT_PASS (pass_warn_unused_result);
612+ */
613+#ifdef TW_FINALIZE_STMTS
614+static
615+unsigned int
616+tw_finalize_stmts (void)
617+{
618+ long iv = 0;
619+ gimple_seq stmts;
620+ tree fndecl = current_function_decl;
621+
622+ if (strcmp (lang_hooks.name, "GNU C") != 0 ||
623+ seen_error () ||
624+ !flag_strict_overflow ||
625+ !flag_widen_types)
626+ {
627+ TWDBG_MSG ("Skipping: Language not C or seen error or -fno-strict-overflow or -fno-widen-types\n");
628+ return 0;
629+ }
630+
631+ /* gcc.dg/pr23518.c execution test */
632+ if (flag_wrapv)
633+ {
634+ TWDBG_MSG ("Skipping: -fwrapv specified.\n");
635+ return 0;
636+ }
637+
638+ if (debug_info_level == DINFO_LEVEL_NONE)
639+ {
640+ /* PS: That we cannot call relayout_decl () on DEBUG_EXPR_DECL is an
641+ * issue: Debug information is generated after lowering from tree to
642+ * GIMPLE; unless we widen before debug information is generated, the
643+ * debug information will record pre-widening information - and that
644+ * cannot be changed because relayout_decl () cannot be invoked on
645+ * DEBUG_EXPR_DECL. expand_debug_locations () during cfgexpand will
646+ * fail gcc_assert ()'s on the DEBUG_INSN's since e.g. the modes will
647+ * not agree, etc. So if we are compiling -g, we ought to run the
648+ * pass_widen_types_stmts.
649+ *
650+ * In short: pass_widen_types_stmts runs iff we're generating debug
651+ * information.
652+ */
653+ TWDBG_MSG ("Skipping: Debug level none.\n");
654+ return 0;
655+ }
656+ gcc_assert (debug_info_level != DINFO_LEVEL_NONE);
657+
658+ if (!fndecl)
659+ {
660+ TWDBG_MSG ("Skipping: !fndecl.\n");
661+ return 0;
662+ }
663+
664+ TWDBG_MSG ("Widening function:\n");
665+ TWDBG_TREE (fndecl);
666+
667+ stmts = gimple_body (fndecl);
668+
669+ if (!stmts)
670+ {
671+ TWDBG_MSG ("Skipping: !stmts.\n");
672+ return 0;
673+ }
674+
675+ if (tw_fn_has_openmp (stmts))
676+ {
677+ TWDBG_MSG ("Skipping: OpenMP stmts found.\n");
678+ return 0;
679+ }
680+
681+ /* Assume for now that we do not need to check for nested functions:
682+ * (cgraph_get_node (fndecl) && cgraph_get_node (fndecl)->nested != NULL) ||
683+ * TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL ||
684+ * Well, turns out that a nested function is processed only if it is
685+ * actually invoked from within the function, so we are in good shape.
686+ */
687+
688+ tw_init ();
689+ tw_log_parms (fndecl);
690+ tw_log_vars (stmts);
691+#if TW_DEBUG
692+ tw_dump_candidate_list ();
693+#endif
694+
695+ do
696+ {
697+ iv = tw_gimple_in_seq (stmts, 0);
698+ } while (iv);
699+ tw_gimple_in_seq (stmts, 1);
700+ verify_types_in_gimple_seq (stmts);
701+
702+ tw_reset ();
703+
704+ return 0;
705+}
706+#endif
707+
708+static
709+unsigned int
710+tw_finalize_bbs (void)
711+{
712+ long iv = 0;
713+ basic_block bb;
714+ tree fndecl;
715+
716+ if (strcmp (lang_hooks.name, "GNU C") != 0 ||
717+ seen_error () ||
718+ !flag_strict_overflow ||
719+ !flag_widen_types)
720+ {
721+ TWDBG_MSG ("Skipping: Language not C or seen error or -fno-strict-overflow or -fno-widen-types\n");
722+ return 0;
723+ }
724+
725+ /* gcc.dg/pr23518.c execution test */
726+ if (flag_wrapv)
727+ {
728+ TWDBG_MSG ("Skipping: -fwrapv specified.\n");
729+ return 0;
730+ }
731+
732+ if (debug_info_level != DINFO_LEVEL_NONE && flag_openmp)
733+ {
734+ /* Cannot run this pass as the debug information has already
735+ * been recorded; If we type widen now, it'll lead to assert
736+ * failures during RTL expansion in expandcfg.c since the
737+ * debug information would all be prewidening and would
738+ * mismatch with the postwidening information for the variables
739+ * that got widened (but whoose debug information was already
740+ * generated). This is all because we cannot call relayout_decl ()
741+ * on DEBUG_EXPR_DECL's - see note elsewhere.
742+ */
743+ TWDBG_MSG ("Skipping: Non-zero debug level and -fopenmp specified.\n");
744+ return 0;
745+ }
746+
747+ if (!cfun || !(fndecl = cfun->decl) || !(cfun->cfg))
748+ {
749+ TWDBG_MSG ("Skipping: !cfun or !fndecl or !(cfun->cfg).\n");
750+ return 0;
751+ }
752+
753+ TWDBG_MSG ("Widening function:\n");
754+ TWDBG_TREE (fndecl);
755+
756+ /* Assume for now that we do not need to check for nested functions:
757+ * (cgraph_get_node (fndecl) && cgraph_get_node (fndecl)->nested != NULL) ||
758+ * TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL ||
759+ * Well, turns out that a nested function is processed only if it is
760+ * actually invoked from within the function, so we are in good shape.
761+ */
762+
763+ tw_init ();
764+ tw_log_parms (fndecl);
765+ tw_log_local_decls ();
766+#if TW_DEBUG
767+ tw_dump_candidate_list ();
768+#endif
769+
770+ do
771+ {
772+ iv = 0;
773+ FOR_EACH_BB (bb)
774+ iv += tw_gimple_in_bb (bb, 0);
775+ } while (iv);
776+ FOR_EACH_BB (bb)
777+ tw_gimple_in_bb (bb, 1);
778+ FOR_EACH_BB (bb)
779+ verify_types_in_gimple_seq (bb_seq (bb));
780+
781+ tw_reset ();
782+
783+ return 0;
784+}
785+
786+/* Assumes that we have run verify_gimple_in_seq (stmts)
787+ * i.e. that we have valid gimple.
788+ */
789+static long
790+tw_gimple_in_seq (gimple_seq stmts, long widen)
791+{
792+ gimple_stmt_iterator ittr;
793+ long iv = 0;
794+
795+ for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (&ittr))
796+ {
797+ gimple stmt = gsi_stmt (ittr);
798+ iv += tw_switch (stmt, widen);
799+ }
800+ return iv;
801+}
802+
803+static long
804+tw_gimple_in_bb (basic_block bb, long widen)
805+{
806+ gimple_stmt_iterator ittr;
807+ long iv = 0;
808+
809+#if TW_DEBUG
810+ fprintf (stderr, "Dumping basic block (widen = %ld):\n", widen);
811+ debug_bb (bb);
812+ fprintf (stderr, "Done dumping basic block (widen = %ld)\n", widen);
813+#endif
814+ for (ittr = gsi_start_bb (bb); !gsi_end_p (ittr); gsi_next (&ittr))
815+ {
816+ gimple stmt = gsi_stmt (ittr);
817+ iv += tw_switch (stmt, widen);
818+ }
819+ return iv;
820+}
821+
822+static long
823+tw_switch (gimple stmt, long widen)
824+{
825+ long iv = 0;
826+
827+ switch (gimple_code (stmt))
828+ {
829+ case GIMPLE_BIND:
830+ iv += tw_gimple_in_seq (gimple_bind_body (stmt), widen);
831+ break;
832+
833+ case GIMPLE_TRY:
834+ iv += tw_gimple_in_seq (gimple_try_eval (stmt), widen);
835+ iv += tw_gimple_in_seq (gimple_try_cleanup (stmt), widen);
836+ break;
837+
838+ case GIMPLE_EH_FILTER:
839+ iv += tw_gimple_in_seq (gimple_eh_filter_failure (stmt), widen);
840+ break;
841+
842+ case GIMPLE_CATCH:
843+ iv += tw_gimple_in_seq (gimple_catch_handler (stmt), widen);
844+ break;
845+
846+ default:
847+ iv += tw_gimple_stmt (stmt, widen);
848+ break;
849+ }
850+ return iv;
851+}
852+
853+/* tw_gimple_stmt () mimics verify_gimple_stmt ()
854+ */
855+static long
856+tw_gimple_stmt (gimple stmt, long widen)
857+{
858+ long iv = 0;
859+
860+ switch (gimple_code (stmt))
861+ {
862+ case GIMPLE_ASSIGN:
863+ iv = tw_gimple_assign (stmt, widen);
864+ break;
865+
866+ case GIMPLE_CALL:
867+ iv = tw_gimple_call (stmt, widen);
868+ break;
869+
870+ case GIMPLE_COND:
871+ iv = tw_gimple_comparison (stmt, widen);
872+ break;
873+
874+ case GIMPLE_SWITCH:
875+ iv = tw_gimple_switch (stmt, widen);
876+ break;
877+
878+ case GIMPLE_RETURN:
879+ iv = tw_gimple_return (stmt, widen);
880+ break;
881+
882+ case GIMPLE_LABEL:
883+ TWDBG_STMT(stmt);
884+ break;
885+
886+ case GIMPLE_GOTO:
887+ TWDBG_STMT(stmt);
888+ break;
889+
890+ case GIMPLE_ASM:
891+ iv = tw_gimple_asm (stmt, widen);
892+ break;
893+
894+ /* Tuples that do not have tree operands. */
895+ case GIMPLE_NOP:
896+ case GIMPLE_PREDICT:
897+ case GIMPLE_RESX:
898+ case GIMPLE_EH_DISPATCH:
899+ case GIMPLE_EH_MUST_NOT_THROW:
900+ TWDBG_STMT(stmt);
901+ break;
902+
903+ CASE_GIMPLE_OMP:
904+ TWDBG_STMT(stmt);
905+ break;
906+
907+ case GIMPLE_DEBUG:
908+ iv = tw_gimple_debug (stmt, widen);
909+ break;
910+
911+ default:
912+ gcc_unreachable ();
913+ }
914+ return iv;
915+}
916+
917+static long
918+tw_gimple_assign (gimple stmt, long widen)
919+{
920+ long iv = 0;
921+
922+ switch (gimple_assign_rhs_class (stmt))
923+ {
924+ case GIMPLE_SINGLE_RHS:
925+ iv = tw_gimple_assign_single (stmt, widen);
926+ break;
927+
928+ case GIMPLE_UNARY_RHS:
929+ iv = tw_gimple_assign_unary (stmt, widen);
930+ break;
931+
932+ case GIMPLE_BINARY_RHS:
933+ iv = tw_gimple_assign_binary (stmt, widen);
934+ break;
935+
936+ case GIMPLE_TERNARY_RHS:
937+ iv = tw_gimple_assign_ternary (stmt, widen);
938+ break;
939+
940+ default:
941+ gcc_unreachable ();
942+ }
943+ return iv;
944+}
945+
946+static long
947+tw_gimple_assign_single (gimple stmt, long widen)
948+{
949+ tree lhs = gimple_assign_lhs (stmt);
950+ tree rhs1 = gimple_assign_rhs1 (stmt);
951+ tree value;
952+ long iv = 0;
953+ unsigned int idx;
954+
955+ TWDBG_STMT(stmt);
956+ TWDBG_TREE(lhs);
957+ TWDBG_TREE(rhs1);
958+
959+ if (widen)
960+ {
961+ TWDBG_MSG ("Widening run.\n");
962+ if (TREE_CODE (rhs1) == ARRAY_REF &&
963+ tw_candidacy_valid (TREE_OPERAND (rhs1, 1)))
964+ {
965+ /* Note that we are widening the array index, hence no
966+ * gimple_assign_set_rhs1 () */
967+ tw_widen_variable (TREE_OPERAND (rhs1, 1));
968+ }
969+ else if (TREE_CODE (lhs) == ARRAY_REF &&
970+ tw_candidacy_valid (TREE_OPERAND (lhs, 1)))
971+ {
972+ /* Note that we are widening the array index, hence no
973+ * gimple_assign_set_lhs () */
974+ tw_widen_variable (TREE_OPERAND (lhs, 1));
975+ }
976+ else if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs1))
977+ {
978+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs));
979+ gimple_assign_set_rhs1 (stmt, tw_widen_constant (rhs1));
980+ }
981+ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1))
982+ {
983+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs));
984+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1));
985+ }
986+ }
987+ else
988+ {
989+ TWDBG_MSG ("Validating run.\n");
990+ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs1))
991+ return iv;
992+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1))
993+ return iv;
994+ if (TREE_CODE (lhs) == VAR_DECL && TREE_CODE (TREE_TYPE (lhs)) == VECTOR_TYPE &&
995+ TREE_CODE (rhs1) == CONSTRUCTOR && TREE_CODE (TREE_TYPE (rhs1)) == VECTOR_TYPE)
996+ {
997+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (rhs1), idx, value)
998+ {
999+ if (tw_candidacy_valid (value))
1000+ {
1001+ TWDBG_MSG ("Invalidating candidacy of constructor element:\n");
1002+ TWDBG_TREE (value);
1003+ tw_candidacy (value, 0);
1004+ iv++;
1005+ }
1006+ }
1007+ }
1008+ if (tw_candidacy_valid (lhs))
1009+ {
1010+ tw_candidacy (lhs, 0);
1011+ iv++;
1012+ }
1013+ if (tw_candidacy_valid (rhs1))
1014+ {
1015+ tw_candidacy (rhs1, 0);
1016+ iv++;
1017+ }
1018+ }
1019+ return iv;
1020+}
1021+
1022+static long
1023+tw_gimple_assign_unary (gimple stmt, long widen)
1024+{
1025+ tree lhs = gimple_assign_lhs (stmt);
1026+ tree rhs1 = gimple_assign_rhs1 (stmt);
1027+ long iv = 0;
1028+
1029+ TWDBG_STMT(stmt);
1030+ TWDBG_TREE(lhs);
1031+ TWDBG_TREE(rhs1);
1032+
1033+ if (widen)
1034+ {
1035+ TWDBG_MSG ("Widening run.\n");
1036+ if (gimple_assign_rhs_code (stmt) == NOP_EXPR &&
1037+ tw_candidacy_valid (rhs1) &&
1038+ (TREE_TYPE (lhs) == long_unsigned_type_node ||
1039+ TREE_TYPE (lhs) == long_integer_type_node))
1040+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1));
1041+ }
1042+ else
1043+ {
1044+ TWDBG_MSG ("Validating run.\n");
1045+ if (gimple_assign_rhs_code (stmt) == NOP_EXPR &&
1046+ tw_candidacy_valid (rhs1) &&
1047+ (TREE_TYPE (lhs) == long_unsigned_type_node ||
1048+ TREE_TYPE (lhs) == long_integer_type_node))
1049+ return iv;
1050+ if (tw_candidacy_valid (lhs))
1051+ {
1052+ tw_candidacy (lhs, 0);
1053+ iv++;
1054+ }
1055+ if (tw_candidacy_valid (rhs1))
1056+ {
1057+ tw_candidacy (rhs1, 0);
1058+ iv++;
1059+ }
1060+ }
1061+ return iv;
1062+}
1063+
1064+static long
1065+tw_gimple_assign_binary (gimple stmt, long widen)
1066+{
1067+ tree lhs = gimple_assign_lhs (stmt);
1068+ tree rhs1 = gimple_assign_rhs1 (stmt);
1069+ tree rhs2 = gimple_assign_rhs2 (stmt);
1070+ long iv = 0;
1071+
1072+ TWDBG_STMT(stmt);
1073+ TWDBG_TREE(lhs);
1074+ TWDBG_TREE(rhs1);
1075+ TWDBG_TREE(rhs2);
1076+
1077+ if (widen)
1078+ {
1079+ TWDBG_MSG ("Widening run.\n");
1080+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidate_const (rhs2))
1081+ {
1082+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs));
1083+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1));
1084+ gimple_assign_set_rhs2 (stmt, tw_widen_constant (rhs2));
1085+ }
1086+ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidacy_valid (rhs2))
1087+ {
1088+ gimple_assign_set_lhs (stmt, tw_widen_variable (lhs));
1089+ gimple_assign_set_rhs1 (stmt, tw_widen_variable (rhs1));
1090+ gimple_assign_set_rhs2 (stmt, tw_widen_variable (rhs2));
1091+ }
1092+ }
1093+ else
1094+ {
1095+ TWDBG_MSG ("Validating run.\n");
1096+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidate_const (rhs2))
1097+ return iv;
1098+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs1) && tw_candidacy_valid (rhs2))
1099+ return iv;
1100+ if (tw_candidacy_valid (lhs))
1101+ {
1102+ tw_candidacy (lhs, 0);
1103+ iv++;
1104+ }
1105+ if (tw_candidacy_valid (rhs1))
1106+ {
1107+ tw_candidacy (rhs1, 0);
1108+ iv++;
1109+ }
1110+ if (tw_candidacy_valid (rhs2))
1111+ {
1112+ tw_candidacy (rhs2, 0);
1113+ iv++;
1114+ }
1115+ }
1116+ return iv;
1117+}
1118+
1119+static long
1120+tw_gimple_assign_ternary (gimple stmt, long widen)
1121+{
1122+ tree lhs = gimple_assign_lhs (stmt);
1123+ tree rhs1 = gimple_assign_rhs1 (stmt);
1124+ tree rhs2 = gimple_assign_rhs2 (stmt);
1125+ tree rhs3 = gimple_assign_rhs3 (stmt);
1126+ long iv = 0;
1127+
1128+ TWDBG_STMT(stmt);
1129+ TWDBG_TREE(lhs);
1130+ TWDBG_TREE(rhs1);
1131+ TWDBG_TREE(rhs2);
1132+ TWDBG_TREE(rhs3);
1133+
1134+ if (widen)
1135+ {
1136+ TWDBG_MSG ("Widening run.\n");
1137+ return iv;
1138+ }
1139+
1140+ TWDBG_MSG ("Validating run.\n");
1141+ if (tw_candidacy_valid (lhs))
1142+ {
1143+ tw_candidacy (lhs, 0);
1144+ iv++;
1145+ }
1146+ if (tw_candidacy_valid (rhs1))
1147+ {
1148+ tw_candidacy (rhs1, 0);
1149+ iv++;
1150+ }
1151+ if (tw_candidacy_valid (rhs2))
1152+ {
1153+ tw_candidacy (rhs2, 0);
1154+ iv++;
1155+ }
1156+ if (tw_candidacy_valid (rhs3))
1157+ {
1158+ tw_candidacy (rhs3, 0);
1159+ iv++;
1160+ }
1161+ return iv;
1162+}
1163+
1164+/* Ref. WG14/N1256 Committee Draft - September 7, 2007 ISO/IEC 9899:TC3
1165+ * 7.19.6 Formatted input/output functions
1166+ * Sec. 17.19.6.[1 ... 14]
1167+ */
1168+#define IO_FN_COUNT 14
1169+static const char *IO_fn_names[IO_FN_COUNT] =
1170+{
1171+ "fprintf", "fscanf",
1172+ "printf", "scanf",
1173+ "snprintf",
1174+ "sprintf", "sscanf",
1175+ "vfprintf", "vfscanf",
1176+ "vprintf", "vscanf",
1177+ "vsnprintf",
1178+ "vsprintf", "vsscanf",
1179+};
1180+
1181+static bool
1182+is_formatted_IO_fn (tree decl)
1183+{
1184+ const char *fn_name;
1185+ long i;
1186+
1187+ if (decl && TREE_CODE (decl) == FUNCTION_DECL &&
1188+ DECL_NAME (decl) /* TREE_CODE (decl) == IDENTIFIER_NODE */ &&
1189+ (fn_name = IDENTIFIER_POINTER (DECL_NAME (decl))))
1190+ {
1191+ for (i = 0; i < IO_FN_COUNT; i++)
1192+ if (strcmp (IO_fn_names[i], fn_name) == 0)
1193+ return true;
1194+ }
1195+ return false;
1196+}
1197+
1198+/* TODO: If you have:
1199+ *
1200+ * int i, n, f();
1201+ *
1202+ * n = f();
1203+ *
1204+ * for (i = 0; i < n; i++)
1205+ * // stuff
1206+ *
1207+ * then (after the candidate set stabilizes) do:
1208+ *
1209+ * int n, f();
1210+ * long twl.n;
1211+ *
1212+ * n = f();
1213+ * twl.n = (long) n;
1214+ *
1215+ * for (i = 0; i < twl.n; i++)
1216+ * // stuff
1217+ *
1218+ * only if adding twl.n does not decrease the size of the stabilized
1219+ * candidate set or "cause any other damage".
1220+ *
1221+ * This should help in benchmarks where parameters are set via function
1222+ * calls to prevent them from being optimized away.
1223+ *
1224+ */
1225+static long
1226+tw_gimple_call (gimple stmt, long widen)
1227+{
1228+#if TW_DEBUG
1229+ tree fn = gimple_call_fn (stmt);
1230+#endif
1231+ long iv = 0;
1232+ unsigned i;
1233+ tree arg;
1234+
1235+ TWDBG_STMT(stmt);
1236+ TWDBG_TREE(fn);
1237+ TWDBG_TREE(gimple_call_fndecl (stmt));
1238+
1239+ if (widen)
1240+ {
1241+ TWDBG_MSG ("Widening run.\n");
1242+ for (i = 0; i < gimple_call_num_args (stmt); i++)
1243+ {
1244+ arg = gimple_call_arg (stmt, i);
1245+ if (arg && tw_candidacy_valid (arg))
1246+ gimple_call_set_arg (stmt, i, tw_widen_variable (arg));
1247+ }
1248+ return iv;
1249+ }
1250+
1251+ TWDBG_MSG ("Validating run.\n");
1252+ if (gimple_call_lhs (stmt) && tw_candidacy_valid (gimple_call_lhs (stmt)))
1253+ {
1254+ tw_candidacy (gimple_call_lhs (stmt), 0);
1255+ iv++;
1256+ }
1257+ if (gimple_call_fndecl (stmt) &&
1258+ (is_builtin_fn (gimple_call_fndecl (stmt)) ||
1259+ is_formatted_IO_fn (gimple_call_fndecl (stmt))))
1260+ {
1261+ /* Certain types of function (printf-scanf family,
1262+ * formatted IO functions, builtin functions) ought
1263+ * not to have their args widened.
1264+ *
1265+ * e.g. A call to printf () such as:
1266+ * int x;
1267+ * printf ("%d", x);
1268+ * because, we cannot change the %d to a %ld.
1269+ *
1270+ * or e.g. in:
1271+ *
1272+ * int D.2852;
1273+ * int si;
1274+ *
1275+ * si = 2;
1276+ * __builtin_altivec_dst (&vi, si, 0);
1277+ * D.2852 = 0;
1278+ *
1279+ * si should not be widened.
1280+ *
1281+ * PS: We could generate code for casts to their original types in the
1282+ * call, but that would slow-down performance and we do not expect
1283+ * a loop index to be used in a call to a formatted IO function.
1284+ */
1285+ for (i = 0; i < gimple_call_num_args (stmt); i++)
1286+ {
1287+ arg = gimple_call_arg (stmt, i);
1288+ if (arg && tw_candidacy_valid (arg))
1289+ {
1290+ tw_candidacy (arg, 0);
1291+ iv++;
1292+ }
1293+ }
1294+ }
1295+ return iv;
1296+}
1297+
1298+static long
1299+tw_gimple_comparison (gimple stmt, long widen)
1300+{
1301+ tree lhs = gimple_cond_lhs (stmt);
1302+ tree rhs = gimple_cond_rhs (stmt);
1303+ long iv = 0;
1304+
1305+ TWDBG_STMT(stmt);
1306+ TWDBG_TREE(lhs);
1307+ TWDBG_TREE(rhs);
1308+
1309+ if (widen)
1310+ {
1311+ TWDBG_MSG ("Widening run.\n");
1312+ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs))
1313+ {
1314+ gimple_cond_set_lhs (stmt, tw_widen_variable (lhs));
1315+ gimple_cond_set_rhs (stmt, tw_widen_constant (rhs));
1316+ }
1317+ else if (tw_candidate_const (lhs) && tw_candidacy_valid (rhs))
1318+ {
1319+ gimple_cond_set_lhs (stmt, tw_widen_constant (lhs));
1320+ gimple_cond_set_rhs (stmt, tw_widen_variable (rhs));
1321+ }
1322+ else if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs))
1323+ {
1324+ gimple_cond_set_lhs (stmt, tw_widen_variable (lhs));
1325+ gimple_cond_set_rhs (stmt, tw_widen_variable (rhs));
1326+ }
1327+ }
1328+ else
1329+ {
1330+ TWDBG_MSG ("Validating run.\n");
1331+ if (tw_candidacy_valid (lhs) && tw_candidate_const (rhs))
1332+ return iv;
1333+ if (tw_candidate_const (lhs) && tw_candidacy_valid (rhs))
1334+ return iv;
1335+ if (tw_candidacy_valid (lhs) && tw_candidacy_valid (rhs))
1336+ return iv;
1337+ if (tw_candidacy_valid (lhs))
1338+ {
1339+ tw_candidacy (lhs, 0);
1340+ iv++;
1341+ }
1342+ if (tw_candidacy_valid (rhs))
1343+ {
1344+ tw_candidacy (rhs, 0);
1345+ iv++;
1346+ }
1347+ }
1348+ return iv;
1349+}
1350+
1351+static long
1352+tw_gimple_switch (gimple stmt, long widen)
1353+{
1354+ tree index = gimple_switch_index (stmt);
1355+ long iv = 0;
1356+
1357+ TWDBG_STMT(stmt);
1358+ TWDBG_TREE(index);
1359+
1360+ if (widen && tw_candidacy_valid (index))
1361+ {
1362+ TWDBG_MSG ("Widening run.\n");
1363+ gimple_switch_set_index (stmt, tw_widen_variable (index));
1364+ return iv;
1365+ }
1366+
1367+ TWDBG_MSG ("Validating run.\n");
1368+ return iv;
1369+}
1370+
1371+static long
1372+tw_gimple_return (gimple stmt, long widen)
1373+{
1374+ tree op = gimple_return_retval (stmt);
1375+ long iv = 0;
1376+
1377+ TWDBG_STMT(stmt);
1378+ TWDBG_TREE(op);
1379+
1380+ if (widen)
1381+ {
1382+ TWDBG_MSG ("Widening run.\n");
1383+ return iv;
1384+ }
1385+
1386+ TWDBG_MSG ("Validating run.\n");
1387+ if (tw_candidacy_valid (op))
1388+ {
1389+ tw_candidacy (op, 0);
1390+ iv++;
1391+ }
1392+ return iv;
1393+}
1394+
1395+static long
1396+tw_gimple_asm (gimple stmt, long widen)
1397+{
1398+ long iv = 0;
1399+ unsigned int ninputs = gimple_asm_ninputs (stmt);
1400+ unsigned int noutputs = gimple_asm_noutputs (stmt);
1401+ unsigned int nclobbers = gimple_asm_nclobbers (stmt);
1402+ unsigned int i;
1403+
1404+ TWDBG_STMT(stmt);
1405+ TWDBG_MSG("Inputs:\n");
1406+ for (i = 0; i < ninputs; i++)
1407+ {
1408+ TWDBG_MSG1 ("input %d\n", i);
1409+ TWDBG_TREE (gimple_asm_input_op (stmt, i));
1410+ }
1411+ TWDBG_MSG("Outputs:\n");
1412+ for (i = 0; i < noutputs; i++)
1413+ {
1414+ TWDBG_MSG1 ("output %d\n", i);
1415+ TWDBG_TREE (gimple_asm_output_op (stmt, i));
1416+ }
1417+ TWDBG_MSG("Clobbers:\n");
1418+ for (i = 0; i < nclobbers; i++)
1419+ {
1420+ TWDBG_MSG1 ("clobber %d\n", i);
1421+ TWDBG_TREE (gimple_asm_clobber_op (stmt, i));
1422+ }
1423+ if (widen)
1424+ {
1425+ TWDBG_MSG ("Widening run.\n");
1426+ return iv;
1427+ }
1428+ TWDBG_MSG ("Validating run.\n");
1429+ for (i = 0; i < ninputs; i++)
1430+ {
1431+ if (tw_candidacy_valid (gimple_asm_input_op (stmt, i)))
1432+ {
1433+ tw_candidacy (gimple_asm_input_op (stmt, i), 0);
1434+ iv++;
1435+ }
1436+ }
1437+ for (i = 0; i < noutputs; i++)
1438+ {
1439+ if (tw_candidacy_valid (gimple_asm_output_op (stmt, i)))
1440+ {
1441+ tw_candidacy (gimple_asm_output_op (stmt, i), 0);
1442+ iv++;
1443+ }
1444+ }
1445+ for (i = 0; i < nclobbers; i++)
1446+ {
1447+ if (tw_candidacy_valid (gimple_asm_clobber_op (stmt, i)))
1448+ {
1449+ tw_candidacy (gimple_asm_clobber_op (stmt, i), 0);
1450+ iv++;
1451+ }
1452+ }
1453+ return iv;
1454+}
1455+
1456+static long
1457+tw_gimple_debug (gimple stmt, long widen)
1458+{
1459+ long iv = 0;
1460+ tree var, value;
1461+
1462+ var = gimple_debug_bind_get_var (stmt);
1463+ value = gimple_debug_bind_get_value (stmt);
1464+
1465+ TWDBG_STMT(stmt);
1466+ TWDBG_TREE(var);
1467+ TWDBG_TREE(value);
1468+
1469+ /* TODO: What if the value is a constant? */
1470+
1471+ if (widen)
1472+ {
1473+ TWDBG_MSG ("Widening run.\n");
1474+ if (tw_candidacy_valid (var) && tw_candidacy_valid (value))
1475+ {
1476+ gimple_debug_bind_set_var (stmt, tw_widen_variable (var));
1477+ gimple_debug_bind_set_value (stmt, tw_widen_variable (value));
1478+ }
1479+ else if (tw_candidacy_valid (var) && tw_candidate_const (value))
1480+ {
1481+ gimple_debug_bind_set_var (stmt, tw_widen_variable (var));
1482+ gimple_debug_bind_set_value (stmt, tw_widen_constant (value));
1483+ }
1484+ }
1485+ else
1486+ {
1487+ TWDBG_MSG ("Validating run.\n");
1488+
1489+ if (var && !tw_in_candidate_list (var) && tw_candidate (var))
1490+ tw_log_candidate (var);
1491+ if (value && !tw_in_candidate_list (value) && tw_candidate (value))
1492+ tw_log_candidate (value);
1493+ if (tw_candidacy_valid (var) && tw_candidacy_valid (value))
1494+ return iv;
1495+ if (tw_candidacy_valid (var))
1496+ {
1497+ tw_candidacy (var, 0);
1498+ iv++;
1499+ }
1500+ if (tw_candidacy_valid (value))
1501+ {
1502+ tw_candidacy (value, 0);
1503+ iv++;
1504+ }
1505+ }
1506+
1507+ return iv;
1508+}
1509+
1510+/* Notes:
1511+ * ------
1512+ *
1513+ * Limitations to be documented:
1514+ * 0. -g -fopenmp not supported.
1515+ *
1516+ * Known DejaGNU failures:
1517+ * 0. FAIL: gcc.dg/pr38245-2.c scan-tree-dump-not optimized "link_error"
1518+ * This failure is because the optimization is dependent on the type of the variable;
1519+ * once the type of the variable has changed from int to long, the inequalities in
1520+ * this test case no longer hold and the code cannot be optimized anymore, consequently,
1521+ * the test fails.
1522+ *
1523+ * DejaGNU failures that are not due to type-widening:
1524+ * 0. gcc.dg/vect/vect-120.c scan-tree-dump-times vect "vectorized 1 loops" 1
1525+ * 1.gcc.dg/vect/vect-120.c -flto scan-tree-dump-times vect "vectorized 1 loops" 1
1526+ *
1527+ * DejaGNU PASS'es with -fwiden-types (but FAIL's in the baseline - the baseline needs
1528+ * to be fixed - it just so happens that the debug information happens to be better in
1529+ * the type-converted case. We have verified that the generated assembly is the same in
1530+ * either case (or has extsw eliminated)):
1531+ * gcc.dg/guality/pr45882.c
1532+ * gcc.dg/guality/pr43177.c
1533+ *
1534+ */
diff --git a/recipes-devtools/gcc/files/optional_libstdc.patch b/recipes-devtools/gcc/files/optional_libstdc.patch
deleted file mode 100644
index fe157a8..0000000
--- a/recipes-devtools/gcc/files/optional_libstdc.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
4will not run correctly since by default the linker will try to link against libstdc++
5which shouldn't exist yet. We need an option to disable -lstdc++
6option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
7driver. This patch adds such an option which only disables the -lstdc++.
8
9A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
10do this officially, the likely answer is don't build libstdc++ separately.
11
12RP 29/6/10
13
14Index: gcc-4.6.0/gcc/cp/g++spec.c
15===================================================================
16--- gcc-4.6.0.orig/gcc/cp/g++spec.c
17+++ gcc-4.6.0/gcc/cp/g++spec.c
18@@ -127,6 +127,7 @@ lang_specific_driver (struct cl_decoded_
19 switch (decoded_options[i].opt_index)
20 {
21 case OPT_nostdlib:
22+ case OPT_nostdlib__:
23 case OPT_nodefaultlibs:
24 library = -1;
25 break;
26Index: gcc-4.6.0/gcc/doc/invoke.texi
27===================================================================
28--- gcc-4.6.0.orig/gcc/doc/invoke.texi
29+++ gcc-4.6.0/gcc/doc/invoke.texi
30@@ -193,7 +193,7 @@ in the following sections.
31 -fno-pretty-templates @gol
32 -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol
33 -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
34--fno-default-inline -fvisibility-inlines-hidden @gol
35+-nostdlib++ -fno-default-inline -fvisibility-inlines-hidden @gol
36 -fvisibility-ms-compat @gol
37 -Wabi -Wconversion-null -Wctor-dtor-privacy @gol
38 -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol
39@@ -431,7 +431,7 @@ Objective-C and Objective-C++ Dialects}.
40 @gccoptlist{@var{object-file-name} -l@var{library} @gol
41 -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
42 -s -static -static-libgcc -static-libstdc++ -shared @gol
43--shared-libgcc -symbolic @gol
44+-shared-libgcc -symbolic -nostdlib++ @gol
45 -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
46 -u @var{symbol}}
47
48@@ -9069,6 +9069,11 @@ These entries are usually resolved by en
49 libc. These entry points should be supplied through some other
50 mechanism when this option is specified.
51
52+@item -nostdlib++
53+@opindex nostdlib++
54+Do not use the standard system C++ runtime libraries when linking.
55+Only the libraries you specify will be passed to the linker.
56+
57 @cindex @option{-lgcc}, use with @option{-nostdlib}
58 @cindex @option{-nostdlib} and unresolved references
59 @cindex unresolved references and @option{-nostdlib}
60Index: gcc-4.6.0/gcc/c-family/c.opt
61===================================================================
62--- gcc-4.6.0.orig/gcc/c-family/c.opt
63+++ gcc-4.6.0/gcc/c-family/c.opt
64@@ -1111,6 +1111,10 @@ nostdinc++
65 C++ ObjC++
66 Do not search standard system include directories for C++
67
68+nostdlib++
69+Driver
70+Do not link standard C++ runtime library
71+
72 o
73 C ObjC C++ ObjC++ Joined Separate
74 ; Documented in common.opt
75Index: gcc-4.6.0/gcc/gcc.c
76===================================================================
77--- gcc-4.6.0.orig/gcc/gcc.c
78+++ gcc-4.6.0/gcc/gcc.c
79@@ -666,6 +666,7 @@ proper position among the other output f
80 %(mflib) " STACK_SPLIT_SPEC "\
81 %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
82 %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
83+ %{!nostdlib++:}\
84 %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
85 #endif
86
diff --git a/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend b/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/gcc-cross-canadian_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc
diff --git a/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend b/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/gcc-cross-initial_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc
diff --git a/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend b/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc
diff --git a/recipes-devtools/gcc/gcc-cross_4.6.bbappend b/recipes-devtools/gcc/gcc-cross_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/gcc-cross_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc
diff --git a/recipes-devtools/gcc/gcc-fsl.inc b/recipes-devtools/gcc/gcc-fsl.inc
deleted file mode 100644
index b5ad200..0000000
--- a/recipes-devtools/gcc/gcc-fsl.inc
+++ /dev/null
@@ -1,46 +0,0 @@
1#LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
2# file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
3# file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
4# file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
5# file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8"
6
7BINV_fsl = "4.6.2"
8
9SRCREV_fsl = "180516"
10# ignore linaro backports since we are changing the SRCREV
11GCC-4_6-BRANCH-LINARO-BACKPORTS_fsl = ""
12
13SRC_URI_fsl = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
14 file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
15 file://gcc.fix_longversionstring.patch \
16 file://gcc.rm_slow_tests.patch \
17 file://gcc.fix_mingw32.patch \
18 file://gcc.fix_cloogstatic2.patch \
19 file://gcc.fix_build-with-cxx.patch \
20 file://gcc.e6500-FSF46.patch \
21 file://gcc.ld_unaligned-460.patch \
22 file://gcc.local_unaligned_altivec.patch \
23 file://gcc.soft_float-460.patch \
24 file://gcc.case_values.patch \
25 file://gcc.builtin_isel.patch \
26 file://gcc.experimental_move.patch \
27 file://gcc.widen_types-46.patch \
28 file://gcc.extelim-v3.patch \
29 file://gcc.e5500_mfocr.patch \
30 file://gcc.opt-array-offset.patch \
31 file://gcc.load_on_store_bypass-462.patch \
32 file://gcc.fix_constvector.patch \
33 file://gcc.fix_MTWX51204-dwarf-vector-reg.patch \
34 file://gcc.fix_ira-loop-pressure.patch \
35 file://optional_libstdc.patch \
36 file://gcc.remove_CCUNSmode_reference.patch \
37 file://gcc.check_path_validity.patch \
38 file://gcc.fix_header_issue.patch \
39 file://gcc.fix_SSIZE_MAX_undefine_issue.patch \
40 file://GPLUSPLUS_INCLUDE_DIR_with_sysroot_fsl.patch \
41 file://gcc.fix_min_max.patch \
42"
43
44FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
45
46PR_append_fsl = "+${DISTRO}.4"
diff --git a/recipes-devtools/gcc/gcc-runtime_4.6.bbappend b/recipes-devtools/gcc/gcc-runtime_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/gcc-runtime_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc
diff --git a/recipes-devtools/gcc/gcc_4.6.bbappend b/recipes-devtools/gcc/gcc_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/gcc_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc
diff --git a/recipes-devtools/gcc/libgcc_4.6.bbappend b/recipes-devtools/gcc/libgcc_4.6.bbappend
deleted file mode 100644
index 1c725f2..0000000
--- a/recipes-devtools/gcc/libgcc_4.6.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require gcc-fsl.inc