diff options
Diffstat (limited to 'meta-linaro-toolchain/recipes-devtools')
165 files changed, 35161 insertions, 0 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-cross-canadian_linaro-2.24.bb b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-cross-canadian_linaro-2.24.bb new file mode 100644 index 0000000..76b6277 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-cross-canadian_linaro-2.24.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require recipes-devtools/binutils/binutils.inc | ||
2 | require recipes-devtools/binutils/binutils-${PV}.inc | ||
3 | require recipes-devtools/binutils/binutils-cross-canadian.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-cross_linaro-2.24.bb b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-cross_linaro-2.24.bb new file mode 100644 index 0000000..a8b918e --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-cross_linaro-2.24.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require recipes-devtools/binutils/binutils.inc | ||
2 | require recipes-devtools/binutils/binutils-${PV}.inc | ||
3 | require recipes-devtools/binutils/binutils-cross.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-crosssdk_linaro-2.24.bb b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-crosssdk_linaro-2.24.bb new file mode 100644 index 0000000..1c62ed4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-crosssdk_linaro-2.24.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require recipes-devtools/binutils/binutils-cross_${PV}.bb | ||
2 | |||
3 | inherit crosssdk | ||
4 | |||
5 | PN = "binutils-crosssdk-${TARGET_ARCH}" | ||
6 | |||
7 | PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" | ||
8 | |||
9 | SRC_URI += "file://relocatable_sdk.patch" | ||
10 | |||
11 | do_configure_prepend () { | ||
12 | sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt | ||
13 | } | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc new file mode 100644 index 0000000..888e0e9 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc | |||
@@ -0,0 +1,47 @@ | |||
1 | BPV = "2.24.0" | ||
2 | MMYY = "14.11" | ||
3 | RELEASE = "20${MMYY}" | ||
4 | LINARORELEASE = "20${MMYY}-2" | ||
5 | PR = "r${RELEASE}" | ||
6 | |||
7 | LIC_FILES_CHKSUM="\ | ||
8 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ | ||
9 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ | ||
10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ | ||
11 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ | ||
12 | file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
13 | file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ | ||
14 | file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ | ||
15 | file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ | ||
16 | file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
17 | " | ||
18 | |||
19 | SRC_URI = "\ | ||
20 | http://releases.linaro.org/${MMYY}/components/toolchain/binutils-linaro/binutils-linaro-${BPV}-${LINARORELEASE}.tar.xz \ | ||
21 | file://binutils-uclibc-100-uclibc-conf.patch \ | ||
22 | file://binutils-uclibc-300-001_ld_makefile_patch.patch \ | ||
23 | file://binutils-uclibc-300-006_better_file_error.patch \ | ||
24 | file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ | ||
25 | file://binutils-uclibc-gas-needs-libm.patch \ | ||
26 | file://libtool-2.4-update.patch \ | ||
27 | file://libiberty_path_fix.patch \ | ||
28 | file://binutils-poison.patch \ | ||
29 | file://libtool-rpath-fix.patch \ | ||
30 | file://binutils-armv5e.patch \ | ||
31 | file://mips64-default-ld-emulation.patch \ | ||
32 | file://binutils-xlp-support.patch \ | ||
33 | file://fix-pr15815.patch;apply=no \ | ||
34 | file://fix-pr2404.patch \ | ||
35 | file://fix-pr16476.patch \ | ||
36 | file://fix-pr16428.patch \ | ||
37 | file://replace_macros_with_static_inline.patch;apply=no \ | ||
38 | file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch;apply=no \ | ||
39 | file://binutils-uninitialised-warning.patch \ | ||
40 | file://0001-AArch64-Define-LP64-LE-loader-name.patch \ | ||
41 | file://0001-AArch64-Define-LP64-BE-linker-name.patch \ | ||
42 | " | ||
43 | |||
44 | SRC_URI[md5sum] = "05c1d4bc718ec05f6d53785eea10763f" | ||
45 | SRC_URI[sha256sum] = "9196bb6f53c6f113681f06fc396f615101e5f367a4ea48dbcbe45616d5eb1d06" | ||
46 | |||
47 | S = "${WORKDIR}/binutils-linaro-${BPV}-${LINARORELEASE}" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-AArch64-Define-LP64-BE-linker-name.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-AArch64-Define-LP64-BE-linker-name.patch new file mode 100644 index 0000000..7e4923c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-AArch64-Define-LP64-BE-linker-name.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | From 5a4f233680ecf1132591f8213ff1cc6a2535b1b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcus Shawcroft <marcus.shawcroft@arm.com> | ||
3 | Date: Mon, 20 Jan 2014 18:20:04 +0000 | ||
4 | Subject: [PATCH] [AArch64] Define LP64 BE linker name. | ||
5 | |||
6 | --- | ||
7 | ld/ChangeLog | 4 ++++ | ||
8 | ld/emulparams/aarch64linuxb.sh | 1 + | ||
9 | 2 files changed, 5 insertions(+) | ||
10 | |||
11 | Index: binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linuxb.sh | ||
12 | =================================================================== | ||
13 | --- binutils-linaro-2.24-2014.03.orig/ld/emulparams/aarch64linuxb.sh | ||
14 | +++ binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linuxb.sh | ||
15 | @@ -1,2 +1,3 @@ | ||
16 | . ${srcdir}/emulparams/aarch64linux.sh | ||
17 | OUTPUT_FORMAT="elf64-bigaarch64" | ||
18 | +ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64_be.so.1\" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-AArch64-Define-LP64-LE-loader-name.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-AArch64-Define-LP64-LE-loader-name.patch new file mode 100644 index 0000000..ea22461 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-AArch64-Define-LP64-LE-loader-name.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | From 30feb358161fe68402e0e42deebe71a0c432763b Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcus Shawcroft <marcus.shawcroft@arm.com> | ||
3 | Date: Mon, 20 Jan 2014 18:18:52 +0000 | ||
4 | Subject: [PATCH] [AArch64] Define LP64 LE loader name. | ||
5 | |||
6 | --- | ||
7 | ld/ChangeLog | 4 ++++ | ||
8 | ld/emulparams/aarch64linux.sh | 2 ++ | ||
9 | 2 files changed, 6 insertions(+) | ||
10 | |||
11 | Index: binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linux.sh | ||
12 | =================================================================== | ||
13 | --- binutils-linaro-2.24-2014.03.orig/ld/emulparams/aarch64linux.sh | ||
14 | +++ binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linux.sh | ||
15 | @@ -45,3 +45,5 @@ case "$target" in | ||
16 | esac | ||
17 | ;; | ||
18 | esac | ||
19 | + | ||
20 | +ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64.so.1\" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch new file mode 100644 index 0000000..f786b17 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001 | ||
4 | From: Hans-Peter Nilsson <hp@bitrange.com> | ||
5 | Date: Sat, 1 Feb 2014 01:11:28 +0100 | ||
6 | Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change. | ||
7 | |||
8 | * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in | ||
9 | call to bfd_set_section_vma exposed by recent bfd_set_section_vma | ||
10 | change. | ||
11 | --- | ||
12 | ld/ChangeLog | 6 ++++++ | ||
13 | ld/emultempl/mmix-elfnmmo.em | 2 +- | ||
14 | 2 files changed, 7 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em | ||
17 | index 0059792..5e9781a 100644 | ||
18 | --- a/ld/emultempl/mmix-elfnmmo.em | ||
19 | +++ b/ld/emultempl/mmix-elfnmmo.em | ||
20 | @@ -102,7 +102,7 @@ mmix_after_allocation (void) | ||
21 | This section is only present when there are register symbols. */ | ||
22 | sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME); | ||
23 | if (sec != NULL) | ||
24 | - bfd_set_section_vma (abfd, sec, 0); | ||
25 | + bfd_set_section_vma (sec->owner, sec, 0); | ||
26 | |||
27 | if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info)) | ||
28 | { | ||
29 | -- | ||
30 | 1.7.10.4 | ||
31 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-armv5e.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-armv5e.patch new file mode 100644 index 0000000..97ad6df --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-armv5e.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Add the armv5e architecture to binutils | ||
2 | |||
3 | Binutils has a comment that indicates it is supposed to match gcc for all of | ||
4 | the support "-march=" settings, but it was lacking the armv5e setting. This | ||
5 | was a simple way to add it, as thumb instructions shouldn't be generated by | ||
6 | the compiler anyway. | ||
7 | |||
8 | Upstream-Status: Denied | ||
9 | Upstream maintainer indicated that we should not be using armv5e, even though | ||
10 | it is a legal archicture defined by our gcc. | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
13 | |||
14 | Index: binutils-2.22.90/gas/config/tc-arm.c | ||
15 | =================================================================== | ||
16 | --- binutils-2.22.90.orig/gas/config/tc-arm.c 2012-07-24 09:38:32.000000000 -0700 | ||
17 | +++ binutils-2.22.90/gas/config/tc-arm.c 2012-08-07 23:41:59.822564075 -0700 | ||
18 | @@ -23162,6 +23162,7 @@ | ||
19 | ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA), | ||
20 | ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA), | ||
21 | ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP), | ||
22 | + ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP), | ||
23 | ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP), | ||
24 | ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP), | ||
25 | ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP), | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-poison.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-poison.patch new file mode 100644 index 0000000..996c023 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-poison.patch | |||
@@ -0,0 +1,259 @@ | |||
1 | Upstream-Status: Inappropriate [distribution: codesourcery] | ||
2 | |||
3 | Patch originally created by Mark Hatle, forward-ported to | ||
4 | binutils 2.21 by Scott Garman. | ||
5 | |||
6 | purpose: warn for uses of system directories when cross linking | ||
7 | |||
8 | Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 | ||
9 | |||
10 | 2008-07-02 Joseph Myers <joseph@codesourcery.com> | ||
11 | |||
12 | ld/ | ||
13 | * ld.h (args_type): Add error_poison_system_directories. | ||
14 | * ld.texinfo (--error-poison-system-directories): Document. | ||
15 | * ldfile.c (ldfile_add_library_path): Check | ||
16 | command_line.error_poison_system_directories. | ||
17 | * ldmain.c (main): Initialize | ||
18 | command_line.error_poison_system_directories. | ||
19 | * lexsup.c (enum option_values): Add | ||
20 | OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. | ||
21 | (ld_options): Add --error-poison-system-directories. | ||
22 | (parse_args): Handle new option. | ||
23 | |||
24 | 2007-06-13 Joseph Myers <joseph@codesourcery.com> | ||
25 | |||
26 | ld/ | ||
27 | * config.in: Regenerate. | ||
28 | * ld.h (args_type): Add poison_system_directories. | ||
29 | * ld.texinfo (--no-poison-system-directories): Document. | ||
30 | * ldfile.c (ldfile_add_library_path): Check | ||
31 | command_line.poison_system_directories. | ||
32 | * ldmain.c (main): Initialize | ||
33 | command_line.poison_system_directories. | ||
34 | * lexsup.c (enum option_values): Add | ||
35 | OPTION_NO_POISON_SYSTEM_DIRECTORIES. | ||
36 | (ld_options): Add --no-poison-system-directories. | ||
37 | (parse_args): Handle new option. | ||
38 | |||
39 | 2007-04-20 Joseph Myers <joseph@codesourcery.com> | ||
40 | |||
41 | Merge from Sourcery G++ binutils 2.17: | ||
42 | |||
43 | 2007-03-20 Joseph Myers <joseph@codesourcery.com> | ||
44 | Based on patch by Mark Hatle <mark.hatle@windriver.com>. | ||
45 | ld/ | ||
46 | * configure.in (--enable-poison-system-directories): New option. | ||
47 | * configure, config.in: Regenerate. | ||
48 | * ldfile.c (ldfile_add_library_path): If | ||
49 | ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, | ||
50 | /usr/lib, /usr/local/lib or /usr/X11R6/lib. | ||
51 | |||
52 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
53 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
54 | |||
55 | Index: binutils-2.24/ld/config.in | ||
56 | =================================================================== | ||
57 | --- binutils-2.24.orig/ld/config.in 2013-12-15 11:46:17.000000000 -0800 | ||
58 | +++ binutils-2.24/ld/config.in 2013-12-15 11:46:59.810435651 -0800 | ||
59 | @@ -11,6 +11,9 @@ | ||
60 | language is requested. */ | ||
61 | #undef ENABLE_NLS | ||
62 | |||
63 | +/* Define to warn for use of native system library directories */ | ||
64 | +#undef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
65 | + | ||
66 | /* Additional extension a shared object might have. */ | ||
67 | #undef EXTRA_SHLIB_EXTENSION | ||
68 | |||
69 | Index: binutils-2.24/ld/configure | ||
70 | =================================================================== | ||
71 | --- binutils-2.24.orig/ld/configure 2013-12-15 11:46:17.000000000 -0800 | ||
72 | +++ binutils-2.24/ld/configure 2013-12-15 11:46:59.810435651 -0800 | ||
73 | @@ -777,6 +777,7 @@ | ||
74 | enable_targets | ||
75 | enable_64_bit_bfd | ||
76 | with_sysroot | ||
77 | +enable_poison_system_directories | ||
78 | enable_gold | ||
79 | enable_got | ||
80 | enable_werror | ||
81 | @@ -1433,6 +1434,8 @@ | ||
82 | (and sometimes confusing) to the casual installer | ||
83 | --enable-targets alternative target configurations | ||
84 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) | ||
85 | + --enable-poison-system-directories | ||
86 | + warn for use of native system library directories | ||
87 | --enable-gold[=ARG] build gold [ARG={default,yes,no}] | ||
88 | --enable-got=<type> GOT handling scheme (target, single, negative, | ||
89 | multigot) | ||
90 | @@ -4345,7 +4348,18 @@ | ||
91 | fi | ||
92 | |||
93 | |||
94 | +# Check whether --enable-poison-system-directories was given. | ||
95 | +if test "${enable_poison_system_directories+set}" = set; then : | ||
96 | + enableval=$enable_poison_system_directories; | ||
97 | +else | ||
98 | + enable_poison_system_directories=no | ||
99 | +fi | ||
100 | + | ||
101 | +if test "x${enable_poison_system_directories}" = "xyes"; then | ||
102 | |||
103 | +$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h | ||
104 | + | ||
105 | +fi | ||
106 | |||
107 | # Check whether --enable-got was given. | ||
108 | if test "${enable_got+set}" = set; then : | ||
109 | Index: binutils-2.24/ld/configure.in | ||
110 | =================================================================== | ||
111 | --- binutils-2.24.orig/ld/configure.in 2013-12-15 11:46:17.000000000 -0800 | ||
112 | +++ binutils-2.24/ld/configure.in 2013-12-15 11:46:59.810435651 -0800 | ||
113 | @@ -87,6 +87,16 @@ | ||
114 | AC_SUBST(TARGET_SYSTEM_ROOT) | ||
115 | AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) | ||
116 | |||
117 | +AC_ARG_ENABLE([poison-system-directories], | ||
118 | + AS_HELP_STRING([--enable-poison-system-directories], | ||
119 | + [warn for use of native system library directories]),, | ||
120 | + [enable_poison_system_directories=no]) | ||
121 | +if test "x${enable_poison_system_directories}" = "xyes"; then | ||
122 | + AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], | ||
123 | + [1], | ||
124 | + [Define to warn for use of native system library directories]) | ||
125 | +fi | ||
126 | + | ||
127 | dnl Use --enable-gold to decide if this linker should be the default. | ||
128 | dnl "install_as_default" is set to false if gold is the default linker. | ||
129 | dnl "installed_linker" is the installed BFD linker name. | ||
130 | Index: binutils-2.24/ld/ldfile.c | ||
131 | =================================================================== | ||
132 | --- binutils-2.24.orig/ld/ldfile.c 2013-12-15 11:46:17.000000000 -0800 | ||
133 | +++ binutils-2.24/ld/ldfile.c 2013-12-15 11:46:59.813768989 -0800 | ||
134 | @@ -116,6 +116,23 @@ | ||
135 | new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); | ||
136 | else | ||
137 | new_dirs->name = xstrdup (name); | ||
138 | + | ||
139 | +#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
140 | + if (command_line.poison_system_directories | ||
141 | + && ((!strncmp (name, "/lib", 4)) | ||
142 | + || (!strncmp (name, "/usr/lib", 8)) | ||
143 | + || (!strncmp (name, "/usr/local/lib", 14)) | ||
144 | + || (!strncmp (name, "/usr/X11R6/lib", 14)))) | ||
145 | + { | ||
146 | + if (command_line.error_poison_system_directories) | ||
147 | + einfo (_("%X%P: error: library search path \"%s\" is unsafe for " | ||
148 | + "cross-compilation\n"), name); | ||
149 | + else | ||
150 | + einfo (_("%P: warning: library search path \"%s\" is unsafe for " | ||
151 | + "cross-compilation\n"), name); | ||
152 | + } | ||
153 | +#endif | ||
154 | + | ||
155 | } | ||
156 | |||
157 | /* Try to open a BFD for a lang_input_statement. */ | ||
158 | Index: binutils-2.24/ld/ld.h | ||
159 | =================================================================== | ||
160 | --- binutils-2.24.orig/ld/ld.h 2013-12-15 11:46:17.000000000 -0800 | ||
161 | +++ binutils-2.24/ld/ld.h 2013-12-15 11:46:59.813768989 -0800 | ||
162 | @@ -180,6 +180,14 @@ | ||
163 | /* If TRUE we'll just print the default output on stdout. */ | ||
164 | bfd_boolean print_output_format; | ||
165 | |||
166 | + /* If TRUE (the default) warn for uses of system directories when | ||
167 | + cross linking. */ | ||
168 | + bfd_boolean poison_system_directories; | ||
169 | + | ||
170 | + /* If TRUE (default FALSE) give an error for uses of system | ||
171 | + directories when cross linking instead of a warning. */ | ||
172 | + bfd_boolean error_poison_system_directories; | ||
173 | + | ||
174 | /* Big or little endian as set on command line. */ | ||
175 | enum endian_enum endian; | ||
176 | |||
177 | Index: binutils-2.24/ld/ldmain.c | ||
178 | =================================================================== | ||
179 | --- binutils-2.24.orig/ld/ldmain.c 2013-12-15 11:46:17.000000000 -0800 | ||
180 | +++ binutils-2.24/ld/ldmain.c 2013-12-15 11:48:12.087101740 -0800 | ||
181 | @@ -266,6 +266,8 @@ | ||
182 | command_line.warn_mismatch = TRUE; | ||
183 | command_line.warn_search_mismatch = TRUE; | ||
184 | command_line.check_section_addresses = -1; | ||
185 | + command_line.poison_system_directories = TRUE; | ||
186 | + command_line.error_poison_system_directories = FALSE; | ||
187 | |||
188 | /* We initialize DEMANGLING based on the environment variable | ||
189 | COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the | ||
190 | Index: binutils-2.24/ld/ld.texinfo | ||
191 | =================================================================== | ||
192 | --- binutils-2.24.orig/ld/ld.texinfo 2013-12-15 11:46:17.000000000 -0800 | ||
193 | +++ binutils-2.24/ld/ld.texinfo 2013-12-15 11:46:59.813768989 -0800 | ||
194 | @@ -2175,6 +2175,18 @@ | ||
195 | |||
196 | Passing @code{none} for @var{style} disables the setting from any | ||
197 | @code{--build-id} options earlier on the command line. | ||
198 | + | ||
199 | +@kindex --no-poison-system-directories | ||
200 | +@item --no-poison-system-directories | ||
201 | +Do not warn for @option{-L} options using system directories such as | ||
202 | +@file{/usr/lib} when cross linking. This option is intended for use | ||
203 | +in chroot environments when such directories contain the correct | ||
204 | +libraries for the target system rather than the host. | ||
205 | + | ||
206 | +@kindex --error-poison-system-directories | ||
207 | +@item --error-poison-system-directories | ||
208 | +Give an error instead of a warning for @option{-L} options using | ||
209 | +system directories when cross linking. | ||
210 | @end table | ||
211 | |||
212 | @c man end | ||
213 | Index: binutils-2.24/ld/lexsup.c | ||
214 | =================================================================== | ||
215 | --- binutils-2.24.orig/ld/lexsup.c 2013-12-15 11:46:17.000000000 -0800 | ||
216 | +++ binutils-2.24/ld/lexsup.c 2013-12-15 11:49:28.950434490 -0800 | ||
217 | @@ -507,6 +507,14 @@ | ||
218 | OPTION_IGNORE_UNRESOLVED_SYMBOL}, | ||
219 | '\0', N_("SYMBOL"), | ||
220 | N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES }, | ||
221 | + { {"no-poison-system-directories", no_argument, NULL, | ||
222 | + OPTION_NO_POISON_SYSTEM_DIRECTORIES}, | ||
223 | + '\0', NULL, N_("Do not warn for -L options using system directories"), | ||
224 | + TWO_DASHES }, | ||
225 | + { {"error-poison-system-directories", no_argument, NULL, | ||
226 | + + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, | ||
227 | + '\0', NULL, N_("Give an error for -L options using system directories"), | ||
228 | + TWO_DASHES }, | ||
229 | }; | ||
230 | |||
231 | #define OPTION_COUNT ARRAY_SIZE (ld_options) | ||
232 | @@ -1442,6 +1450,14 @@ | ||
233 | einfo (_("%P%X: --hash-size needs a numeric argument\n")); | ||
234 | } | ||
235 | break; | ||
236 | + | ||
237 | + case OPTION_NO_POISON_SYSTEM_DIRECTORIES: | ||
238 | + command_line.poison_system_directories = FALSE; | ||
239 | + break; | ||
240 | + | ||
241 | + case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: | ||
242 | + command_line.error_poison_system_directories = TRUE; | ||
243 | + break; | ||
244 | } | ||
245 | } | ||
246 | |||
247 | Index: binutils-2.24/ld/ldlex.h | ||
248 | =================================================================== | ||
249 | --- binutils-2.24.orig/ld/ldlex.h 2013-12-15 11:46:17.000000000 -0800 | ||
250 | +++ binutils-2.24/ld/ldlex.h 2013-12-15 11:47:43.230435299 -0800 | ||
251 | @@ -138,6 +138,8 @@ | ||
252 | OPTION_DEFAULT_SCRIPT, | ||
253 | OPTION_PRINT_OUTPUT_FORMAT, | ||
254 | OPTION_IGNORE_UNRESOLVED_SYMBOL, | ||
255 | + OPTION_NO_POISON_SYSTEM_DIRECTORIES, | ||
256 | + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, | ||
257 | }; | ||
258 | |||
259 | /* The initial parser states. */ | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-100-uclibc-conf.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-100-uclibc-conf.patch new file mode 100644 index 0000000..b5a25c2 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-100-uclibc-conf.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Index: binutils-2.22/configure | ||
4 | =================================================================== | ||
5 | --- binutils-2.22.orig/configure | ||
6 | +++ binutils-2.22/configure | ||
7 | @@ -3130,7 +3130,7 @@ case "${target}" in | ||
8 | ;; | ||
9 | s390-*-* | s390x-*-*) | ||
10 | ;; | ||
11 | - sh-*-* | sh[34]*-*-*) | ||
12 | + sh*-*-* | sh[34]*-*-*) | ||
13 | ;; | ||
14 | sh64-*-* | sh5*-*-*) | ||
15 | ;; | ||
16 | @@ -3570,7 +3570,7 @@ case "${target}" in | ||
17 | mips*-*-*) | ||
18 | noconfigdirs="$noconfigdirs gprof" | ||
19 | ;; | ||
20 | - sh-*-* | sh64-*-*) | ||
21 | + sh*-*-* | sh64-*-*) | ||
22 | case "${target}" in | ||
23 | sh*-*-elf) | ||
24 | ;; | ||
25 | Index: binutils-2.22/gprof/configure | ||
26 | =================================================================== | ||
27 | --- binutils-2.22.orig/gprof/configure | ||
28 | +++ binutils-2.22/gprof/configure | ||
29 | @@ -6103,6 +6103,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) | ||
30 | lt_cv_deplibs_check_method=pass_all | ||
31 | ;; | ||
32 | |||
33 | +linux-uclibc*) | ||
34 | + lt_cv_deplibs_check_method=pass_all | ||
35 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
36 | + ;; | ||
37 | + | ||
38 | netbsd*) | ||
39 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | ||
40 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-001_ld_makefile_patch.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-001_ld_makefile_patch.patch new file mode 100644 index 0000000..c6e1efc --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-001_ld_makefile_patch.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | #!/bin/sh -e | ||
2 | ## 001_ld_makefile_patch.dpatch | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: Description: correct where ld scripts are installed | ||
6 | ## DP: Author: Chris Chimelis <chris@debian.org> | ||
7 | ## DP: Upstream status: N/A | ||
8 | ## DP: Date: ?? | ||
9 | |||
10 | if [ $# -ne 1 ]; then | ||
11 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts | ||
16 | patch_opts="${patch_opts:--f --no-backup-if-mismatch}" | ||
17 | |||
18 | case "$1" in | ||
19 | -patch) patch $patch_opts -p1 < $0;; | ||
20 | -unpatch) patch $patch_opts -p1 -R < $0;; | ||
21 | *) | ||
22 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
23 | exit 1;; | ||
24 | esac | ||
25 | |||
26 | exit 0 | ||
27 | Upstream-Status: Inappropriate [debian patch] | ||
28 | |||
29 | @DPATCH@ | ||
30 | Index: binutils-2.22/ld/Makefile.am | ||
31 | =================================================================== | ||
32 | --- binutils-2.22.orig/ld/Makefile.am | ||
33 | +++ binutils-2.22/ld/Makefile.am | ||
34 | @@ -37,7 +37,7 @@ endif | ||
35 | # We put the scripts in the directory $(scriptdir)/ldscripts. | ||
36 | # We can't put the scripts in $(datadir) because the SEARCH_DIR | ||
37 | # directives need to be different for native and cross linkers. | ||
38 | -scriptdir = $(tooldir)/lib | ||
39 | +scriptdir = $(libdir) | ||
40 | |||
41 | EMUL = @EMUL@ | ||
42 | EMULATION_OFILES = @EMULATION_OFILES@ | ||
43 | Index: binutils-2.22/ld/Makefile.in | ||
44 | =================================================================== | ||
45 | --- binutils-2.22.orig/ld/Makefile.in | ||
46 | +++ binutils-2.22/ld/Makefile.in | ||
47 | @@ -366,7 +366,7 @@ AM_CFLAGS = $(WARN_CFLAGS) | ||
48 | # We put the scripts in the directory $(scriptdir)/ldscripts. | ||
49 | # We can't put the scripts in $(datadir) because the SEARCH_DIR | ||
50 | # directives need to be different for native and cross linkers. | ||
51 | -scriptdir = $(tooldir)/lib | ||
52 | +scriptdir = $(libdir) | ||
53 | BASEDIR = $(srcdir)/.. | ||
54 | BFDDIR = $(BASEDIR)/bfd | ||
55 | INCDIR = $(BASEDIR)/include | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-006_better_file_error.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-006_better_file_error.patch new file mode 100644 index 0000000..47bd8ff --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-006_better_file_error.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/bin/sh -e | ||
2 | ## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com> | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: Specify which filename is causing an error if the filename is a | ||
6 | ## DP: directory. (#45832) | ||
7 | |||
8 | if [ $# -ne 1 ]; then | ||
9 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts | ||
14 | patch_opts="${patch_opts:--f --no-backup-if-mismatch}" | ||
15 | |||
16 | case "$1" in | ||
17 | -patch) patch $patch_opts -p1 < $0;; | ||
18 | -unpatch) patch $patch_opts -p1 -R < $0;; | ||
19 | *) | ||
20 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
21 | exit 1;; | ||
22 | esac | ||
23 | |||
24 | exit 0 | ||
25 | Upstream-Status: Inappropriate [debian patch] | ||
26 | |||
27 | @DPATCH@ | ||
28 | Index: binutils-2.22/bfd/opncls.c | ||
29 | =================================================================== | ||
30 | --- binutils-2.22.orig/bfd/opncls.c | ||
31 | +++ binutils-2.22/bfd/opncls.c | ||
32 | @@ -197,6 +197,13 @@ bfd_fopen (const char *filename, const c | ||
33 | { | ||
34 | bfd *nbfd; | ||
35 | const bfd_target *target_vec; | ||
36 | + struct stat s; | ||
37 | + | ||
38 | + if (stat (filename, &s) == 0) | ||
39 | + if (S_ISDIR(s.st_mode)) { | ||
40 | + bfd_set_error (bfd_error_file_not_recognized); | ||
41 | + return NULL; | ||
42 | + } | ||
43 | |||
44 | nbfd = _bfd_new_bfd (); | ||
45 | if (nbfd == NULL) | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-012_check_ldrunpath_length.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000..d31f80c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-300-012_check_ldrunpath_length.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | #!/bin/sh -e | ||
2 | ## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org> | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for | ||
6 | ## DP: cases where -rpath isn't specified. (#151024) | ||
7 | |||
8 | if [ $# -ne 1 ]; then | ||
9 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts | ||
14 | patch_opts="${patch_opts:--f --no-backup-if-mismatch}" | ||
15 | |||
16 | case "$1" in | ||
17 | -patch) patch $patch_opts -p1 < $0;; | ||
18 | -unpatch) patch $patch_opts -p1 -R < $0;; | ||
19 | *) | ||
20 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
21 | exit 1;; | ||
22 | esac | ||
23 | |||
24 | exit 0 | ||
25 | Upstream-Status: Inappropriate [debian patch] | ||
26 | |||
27 | @DPATCH@ | ||
28 | Index: binutils-2.22/ld/emultempl/elf32.em | ||
29 | =================================================================== | ||
30 | --- binutils-2.22.orig/ld/emultempl/elf32.em | ||
31 | +++ binutils-2.22/ld/emultempl/elf32.em | ||
32 | @@ -1273,6 +1273,8 @@ fragment <<EOF | ||
33 | && command_line.rpath == NULL) | ||
34 | { | ||
35 | lib_path = (const char *) getenv ("LD_RUN_PATH"); | ||
36 | + if ((lib_path) && (strlen (lib_path) == 0)) | ||
37 | + lib_path = NULL; | ||
38 | if (gld${EMULATION_NAME}_search_needed (lib_path, &n, | ||
39 | force)) | ||
40 | break; | ||
41 | @@ -1500,6 +1502,8 @@ gld${EMULATION_NAME}_before_allocation ( | ||
42 | rpath = command_line.rpath; | ||
43 | if (rpath == NULL) | ||
44 | rpath = (const char *) getenv ("LD_RUN_PATH"); | ||
45 | + if ((rpath) && (strlen (rpath) == 0)) | ||
46 | + rpath = NULL; | ||
47 | |||
48 | for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) | ||
49 | if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-gas-needs-libm.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-gas-needs-libm.patch new file mode 100644 index 0000000..3869faf --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uclibc-gas-needs-libm.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Source: Khem Raj <raj.khem@gmail.com> | ||
2 | Disposition: submit upstream. | ||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Description: | ||
6 | |||
7 | We do not need to have the libtool patch anymore for binutils after | ||
8 | libtool has been updated upstream it include support for it. However | ||
9 | for building gas natively on uclibc systems we have to link it with | ||
10 | -lm so that it picks up missing symbols. | ||
11 | |||
12 | /local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double': | ||
13 | floatformat.c:(.text+0x1ec): undefined reference to `frexp' | ||
14 | floatformat.c:(.text+0x2f8): undefined reference to `ldexp' | ||
15 | /local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double': | ||
16 | floatformat.c:(.text+0x38a): undefined reference to `ldexp' | ||
17 | floatformat.c:(.text+0x3d2): undefined reference to `ldexp' | ||
18 | floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp' | ||
19 | collect2: ld returned 1 exit status | ||
20 | make[4]: *** [as-new] Error 1 | ||
21 | |||
22 | Index: binutils-2.22/gas/configure.tgt | ||
23 | =================================================================== | ||
24 | --- binutils-2.22.orig/gas/configure.tgt | ||
25 | +++ binutils-2.22/gas/configure.tgt | ||
26 | @@ -428,6 +428,12 @@ case ${generic_target} in | ||
27 | *-*-netware) fmt=elf em=netware ;; | ||
28 | esac | ||
29 | |||
30 | +case ${generic_target} in | ||
31 | + arm-*-*uclibc*) | ||
32 | + need_libm=yes | ||
33 | + ;; | ||
34 | +esac | ||
35 | + | ||
36 | case ${cpu_type} in | ||
37 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k) | ||
38 | bfd_gas=yes | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch new file mode 100644 index 0000000..2feb80c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From f9c316c4d75be236bbaa8464ef803ed2d3859d6d Mon Sep 17 00:00:00 2001 | ||
2 | From: H.J. Lu <hjl.tools@gmail.com> | ||
3 | Date: Wed, 15 Jan 2014 07:43:19 -0800 | ||
4 | Subject: [PATCH 1/1] Silence uninitialized warning on ehdr_start_save | ||
5 | |||
6 | Older GCC, like 4.1/4.2, will issue an uninitialized warning on | ||
7 | ehdr_start_save. This patch silences by using | ||
8 | |||
9 | struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save; | ||
10 | |||
11 | * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): | ||
12 | Silence uninitialized warning on ehdr_start_save with older | ||
13 | GCC. | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | --- | ||
17 | ld/ChangeLog | 6 ++++++ | ||
18 | ld/emultempl/elf32.em | 2 +- | ||
19 | 2 files changed, 7 insertions(+), 1 deletions(-) | ||
20 | |||
21 | #diff --git a/ld/ChangeLog b/ld/ChangeLog | ||
22 | #index eaa6b93..91055de 100644 | ||
23 | #--- a/ld/ChangeLog | ||
24 | #+++ b/ld/ChangeLog | ||
25 | #@@ -1,3 +1,9 @@ | ||
26 | #+2014-01-15 H.J. Lu <hongjiu.lu@intel.com> | ||
27 | #+ | ||
28 | #+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): | ||
29 | #+ Silence uninitialized warning on ehdr_start_save with older | ||
30 | #+ GCC. | ||
31 | #+ | ||
32 | # 2014-01-15 Alan Modra <amodra@gmail.com> | ||
33 | # | ||
34 | # * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define | ||
35 | diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em | ||
36 | index 13f86f0..569c7f7 100644 | ||
37 | --- a/ld/emultempl/elf32.em | ||
38 | +++ b/ld/emultempl/elf32.em | ||
39 | @@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void) | ||
40 | asection *sinterp; | ||
41 | bfd *abfd; | ||
42 | struct elf_link_hash_entry *ehdr_start = NULL; | ||
43 | - struct bfd_link_hash_entry ehdr_start_save; | ||
44 | + struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save; | ||
45 | |||
46 | if (is_elf_hash_table (link_info.hash)) | ||
47 | { | ||
48 | -- | ||
49 | 1.7.1 | ||
50 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-xlp-support.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-xlp-support.patch new file mode 100644 index 0000000..a199918 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-xlp-support.patch | |||
@@ -0,0 +1,402 @@ | |||
1 | Upstream-Status: Unknown | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | From 26adb06ce515aadfec08ce13109b4b98287f677b Mon Sep 17 00:00:00 2001 | ||
5 | From: Nebu Philips <nphilips@netlogicmicro.com> | ||
6 | Date: Fri, 30 Jul 2010 15:10:03 -0700 | ||
7 | Subject: [PATCH] Add support for Netlogic XLP | ||
8 | |||
9 | Using the mipsisa64r2nlm target, add support for XLP from | ||
10 | Netlogic. Also, update vendor name to NLM wherever applicable. | ||
11 | --- | ||
12 | bfd/aoutx.h | 1 + | ||
13 | bfd/archures.c | 1 + | ||
14 | bfd/bfd-in2.h | 1 + | ||
15 | bfd/config.bfd | 5 +++++ | ||
16 | bfd/cpu-mips.c | 6 ++++-- | ||
17 | bfd/elfxx-mips.c | 8 ++++++++ | ||
18 | binutils/readelf.c | 1 + | ||
19 | config.sub | 6 ++++++ | ||
20 | gas/config/tc-mips.c | 7 ++++++- | ||
21 | gas/configure | 3 +++ | ||
22 | gas/configure.tgt | 2 +- | ||
23 | gas/doc/c-mips.texi | 3 ++- | ||
24 | include/elf/mips.h | 1 + | ||
25 | include/opcode/mips.h | 6 +++++- | ||
26 | ld/configure.tgt | 2 ++ | ||
27 | opcodes/mips-dis.c | 6 ++++++ | ||
28 | opcodes/mips-opc.c | 31 ++++++++++++++++++++----------- | ||
29 | 17 files changed, 73 insertions(+), 17 deletions(-) | ||
30 | |||
31 | Index: binutils-2.24/bfd/aoutx.h | ||
32 | =================================================================== | ||
33 | --- binutils-2.24.orig/bfd/aoutx.h 2013-12-15 13:07:57.180399300 -0800 | ||
34 | +++ binutils-2.24/bfd/aoutx.h 2013-12-15 13:08:03.397065919 -0800 | ||
35 | @@ -798,6 +798,7 @@ | ||
36 | case bfd_mach_mipsisa64r2: | ||
37 | case bfd_mach_mips_sb1: | ||
38 | case bfd_mach_mips_xlr: | ||
39 | + case bfd_mach_mips_xlp: | ||
40 | /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */ | ||
41 | arch_flags = M_MIPS2; | ||
42 | break; | ||
43 | Index: binutils-2.24/bfd/archures.c | ||
44 | =================================================================== | ||
45 | --- binutils-2.24.orig/bfd/archures.c 2013-12-15 13:07:57.180399300 -0800 | ||
46 | +++ binutils-2.24/bfd/archures.c 2013-12-15 13:08:03.397065919 -0800 | ||
47 | @@ -178,6 +178,7 @@ | ||
48 | .#define bfd_mach_mips_octeonp 6601 | ||
49 | .#define bfd_mach_mips_octeon2 6502 | ||
50 | .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *} | ||
51 | +.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *} | ||
52 | .#define bfd_mach_mipsisa32 32 | ||
53 | .#define bfd_mach_mipsisa32r2 33 | ||
54 | .#define bfd_mach_mipsisa64 64 | ||
55 | Index: binutils-2.24/bfd/bfd-in2.h | ||
56 | =================================================================== | ||
57 | --- binutils-2.24.orig/bfd/bfd-in2.h 2013-12-15 13:07:57.180399300 -0800 | ||
58 | +++ binutils-2.24/bfd/bfd-in2.h 2013-12-15 13:08:03.400399254 -0800 | ||
59 | @@ -1933,6 +1933,7 @@ | ||
60 | #define bfd_mach_mips_octeonp 6601 | ||
61 | #define bfd_mach_mips_octeon2 6502 | ||
62 | #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */ | ||
63 | +#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */ | ||
64 | #define bfd_mach_mipsisa32 32 | ||
65 | #define bfd_mach_mipsisa32r2 33 | ||
66 | #define bfd_mach_mipsisa64 64 | ||
67 | Index: binutils-2.24/bfd/config.bfd | ||
68 | =================================================================== | ||
69 | --- binutils-2.24.orig/bfd/config.bfd 2013-12-15 13:08:03.047065922 -0800 | ||
70 | +++ binutils-2.24/bfd/config.bfd 2013-12-15 13:08:03.400399254 -0800 | ||
71 | @@ -1032,6 +1032,11 @@ | ||
72 | targ_defvec=bfd_elf32_littlemips_vec | ||
73 | targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec" | ||
74 | ;; | ||
75 | + mipsisa64*-*-elf*) | ||
76 | + targ_defvec=bfd_elf32_tradbigmips_vec | ||
77 | + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec" | ||
78 | + want64=true | ||
79 | + ;; | ||
80 | mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss) | ||
81 | targ_defvec=bfd_elf32_bigmips_vec | ||
82 | targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec" | ||
83 | Index: binutils-2.24/bfd/cpu-mips.c | ||
84 | =================================================================== | ||
85 | --- binutils-2.24.orig/bfd/cpu-mips.c 2013-12-15 13:07:57.180399300 -0800 | ||
86 | +++ binutils-2.24/bfd/cpu-mips.c 2013-12-15 13:08:03.400399254 -0800 | ||
87 | @@ -99,7 +99,8 @@ | ||
88 | I_mipsocteonp, | ||
89 | I_mipsocteon2, | ||
90 | I_xlr, | ||
91 | - I_micromips | ||
92 | + I_micromips, | ||
93 | + I_xlp | ||
94 | }; | ||
95 | |||
96 | #define NN(index) (&arch_info_struct[(index) + 1]) | ||
97 | @@ -143,7 +144,8 @@ | ||
98 | N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+", FALSE, NN(I_mipsocteonp)), | ||
99 | N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)), | ||
100 | N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)), | ||
101 | - N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0) | ||
102 | + N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)), | ||
103 | + N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, 0) | ||
104 | }; | ||
105 | |||
106 | /* The default architecture is mips:3000, but with a machine number of | ||
107 | Index: binutils-2.24/bfd/elfxx-mips.c | ||
108 | =================================================================== | ||
109 | --- binutils-2.24.orig/bfd/elfxx-mips.c 2013-12-15 13:07:57.180399300 -0800 | ||
110 | +++ binutils-2.24/bfd/elfxx-mips.c 2013-12-15 13:08:03.400399254 -0800 | ||
111 | @@ -6404,6 +6404,9 @@ | ||
112 | case E_MIPS_MACH_XLR: | ||
113 | return bfd_mach_mips_xlr; | ||
114 | |||
115 | + case E_MIPS_MACH_XLP: | ||
116 | + return bfd_mach_mips_xlp; | ||
117 | + | ||
118 | default: | ||
119 | switch (flags & EF_MIPS_ARCH) | ||
120 | { | ||
121 | @@ -11622,6 +11625,10 @@ | ||
122 | val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2; | ||
123 | break; | ||
124 | |||
125 | + case bfd_mach_mips_xlp: | ||
126 | + val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP; | ||
127 | + break; | ||
128 | + | ||
129 | case bfd_mach_mipsisa32: | ||
130 | val = E_MIPS_ARCH_32; | ||
131 | break; | ||
132 | @@ -14202,6 +14209,7 @@ | ||
133 | { bfd_mach_mips_octeon2, bfd_mach_mips_octeonp }, | ||
134 | { bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, | ||
135 | { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 }, | ||
136 | + { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 }, | ||
137 | |||
138 | /* MIPS64 extensions. */ | ||
139 | { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 }, | ||
140 | Index: binutils-2.24/binutils/readelf.c | ||
141 | =================================================================== | ||
142 | --- binutils-2.24.orig/binutils/readelf.c 2013-12-15 13:07:57.180399300 -0800 | ||
143 | +++ binutils-2.24/binutils/readelf.c 2013-12-15 13:08:03.403732587 -0800 | ||
144 | @@ -2602,6 +2602,7 @@ | ||
145 | case E_MIPS_MACH_OCTEON: strcat (buf, ", octeon"); break; | ||
146 | case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break; | ||
147 | case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break; | ||
148 | + case E_MIPS_MACH_XLP: strcat (buf, ", xlp"); break; | ||
149 | case 0: | ||
150 | /* We simply ignore the field in this case to avoid confusion: | ||
151 | MIPS ELF does not specify EF_MIPS_MACH, it is a GNU | ||
152 | Index: binutils-2.24/gas/config/tc-mips.c | ||
153 | =================================================================== | ||
154 | --- binutils-2.24.orig/gas/config/tc-mips.c 2013-12-15 13:07:57.180399300 -0800 | ||
155 | +++ binutils-2.24/gas/config/tc-mips.c 2013-12-15 13:17:19.943728439 -0800 | ||
156 | @@ -486,6 +486,7 @@ | ||
157 | || mips_opts.arch == CPU_RM7000 \ | ||
158 | || mips_opts.arch == CPU_VR5500 \ | ||
159 | || mips_opts.micromips \ | ||
160 | + || mips_opts.arch == CPU_XLP \ | ||
161 | ) | ||
162 | |||
163 | /* Whether the processor uses hardware interlocks to protect reads | ||
164 | @@ -515,6 +516,7 @@ | ||
165 | && mips_opts.isa != ISA_MIPS3) \ | ||
166 | || mips_opts.arch == CPU_R4300 \ | ||
167 | || mips_opts.micromips \ | ||
168 | + || mips_opts.arch == CPU_XLP \ | ||
169 | ) | ||
170 | |||
171 | /* Whether the processor uses hardware interlocks to protect reads | ||
172 | @@ -17794,7 +17796,7 @@ | ||
173 | /* Broadcom XLP. | ||
174 | XLP is mostly like XLR, with the prominent exception that it is | ||
175 | MIPS64R2 rather than MIPS64. */ | ||
176 | - { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR }, | ||
177 | + { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP }, | ||
178 | |||
179 | /* End marker */ | ||
180 | { NULL, 0, 0, 0, 0 } | ||
181 | Index: binutils-2.24/gas/configure | ||
182 | =================================================================== | ||
183 | --- binutils-2.24.orig/gas/configure 2013-12-15 13:08:01.127065936 -0800 | ||
184 | +++ binutils-2.24/gas/configure 2013-12-15 13:08:03.407065920 -0800 | ||
185 | @@ -12697,6 +12697,9 @@ | ||
186 | mipsisa64r2 | mipsisa64r2el) | ||
187 | mips_cpu=mips64r2 | ||
188 | ;; | ||
189 | + mipsisa64r2nlm | mipsisa64r2nlmel) | ||
190 | + mips_cpu=xlp | ||
191 | + ;; | ||
192 | mipstx39 | mipstx39el) | ||
193 | mips_cpu=r3900 | ||
194 | ;; | ||
195 | Index: binutils-2.24/gas/configure.tgt | ||
196 | =================================================================== | ||
197 | --- binutils-2.24.orig/gas/configure.tgt 2013-12-15 13:08:00.783732605 -0800 | ||
198 | +++ binutils-2.24/gas/configure.tgt 2013-12-15 13:08:03.407065920 -0800 | ||
199 | @@ -325,7 +325,7 @@ | ||
200 | fmt=elf em=freebsd ;; | ||
201 | mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;; | ||
202 | mips*-sde-elf* | mips*-mti-elf*) fmt=elf em=tmips ;; | ||
203 | - mips-*-elf* | mips-*-rtems*) fmt=elf ;; | ||
204 | + mips-*-elf* | mips-*-rtems*) fmt=elf em=tmips ;; | ||
205 | mips-*-netbsd*) fmt=elf em=tmips ;; | ||
206 | mips-*-openbsd*) fmt=elf em=tmips ;; | ||
207 | |||
208 | Index: binutils-2.24/include/elf/mips.h | ||
209 | =================================================================== | ||
210 | --- binutils-2.24.orig/include/elf/mips.h 2013-12-15 13:07:57.180399300 -0800 | ||
211 | +++ binutils-2.24/include/elf/mips.h 2013-12-15 13:08:03.407065920 -0800 | ||
212 | @@ -274,6 +274,7 @@ | ||
213 | #define E_MIPS_MACH_SB1 0x008a0000 | ||
214 | #define E_MIPS_MACH_OCTEON 0x008b0000 | ||
215 | #define E_MIPS_MACH_XLR 0x008c0000 | ||
216 | +#define E_MIPS_MACH_XLP 0x008e0000 | ||
217 | #define E_MIPS_MACH_OCTEON2 0x008d0000 | ||
218 | #define E_MIPS_MACH_5400 0x00910000 | ||
219 | #define E_MIPS_MACH_5900 0x00920000 | ||
220 | Index: binutils-2.24/include/opcode/mips.h | ||
221 | =================================================================== | ||
222 | --- binutils-2.24.orig/include/opcode/mips.h 2013-12-15 13:07:57.180399300 -0800 | ||
223 | +++ binutils-2.24/include/opcode/mips.h 2013-12-15 13:40:11.130384844 -0800 | ||
224 | @@ -1092,8 +1092,10 @@ | ||
225 | #define INSN_LOONGSON_2F 0x80000000 | ||
226 | /* Loongson 3A. */ | ||
227 | #define INSN_LOONGSON_3A 0x00000400 | ||
228 | -/* RMI Xlr instruction */ | ||
229 | -#define INSN_XLR 0x00000020 | ||
230 | +/* Netlogic Xlr instruction */ | ||
231 | +#define INSN_XLR 0x00000020 | ||
232 | +/* Netlogic XlP instruction */ | ||
233 | +#define INSN_XLP 0x00000040 | ||
234 | |||
235 | /* DSP ASE */ | ||
236 | #define ASE_DSP 0x00000001 | ||
237 | @@ -1172,6 +1174,7 @@ | ||
238 | #define CPU_OCTEONP 6601 | ||
239 | #define CPU_OCTEON2 6502 | ||
240 | #define CPU_XLR 887682 /* decimal 'XLR' */ | ||
241 | +#define CPU_XLP 887680 /* decimal 'XLP' */ | ||
242 | |||
243 | /* Return true if the given CPU is included in INSN_* mask MASK. */ | ||
244 | |||
245 | @@ -1239,6 +1242,9 @@ | ||
246 | case CPU_XLR: | ||
247 | return (mask & INSN_XLR) != 0; | ||
248 | |||
249 | + case CPU_XLP: | ||
250 | + return (mask & INSN_XLP) != 0; | ||
251 | + | ||
252 | default: | ||
253 | return FALSE; | ||
254 | } | ||
255 | Index: binutils-2.24/ld/configure.tgt | ||
256 | =================================================================== | ||
257 | --- binutils-2.24.orig/ld/configure.tgt 2013-12-15 13:08:03.047065922 -0800 | ||
258 | +++ binutils-2.24/ld/configure.tgt 2013-12-15 13:08:03.407065920 -0800 | ||
259 | @@ -457,6 +457,8 @@ | ||
260 | mips*-sde-elf* | mips*-mti-elf*) | ||
261 | targ_emul=elf32btsmip | ||
262 | targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;; | ||
263 | +mipsisa64*-*-elf*) targ_emul=elf32btsmip | ||
264 | + targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;; | ||
265 | mips64*el-ps2-elf*) targ_emul=elf32lr5900n32 | ||
266 | targ_extra_emuls="elf32lr5900" | ||
267 | targ_extra_libpath=$targ_extra_emuls ;; | ||
268 | Index: binutils-2.24/opcodes/mips-dis.c | ||
269 | =================================================================== | ||
270 | --- binutils-2.24.orig/opcodes/mips-dis.c 2013-12-15 13:07:57.180399300 -0800 | ||
271 | +++ binutils-2.24/opcodes/mips-dis.c 2013-12-15 13:39:50.243718329 -0800 | ||
272 | @@ -554,13 +554,11 @@ | ||
273 | mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), | ||
274 | mips_hwr_names_numeric }, | ||
275 | |||
276 | - /* XLP is mostly like XLR, with the prominent exception it is being | ||
277 | - MIPS64R2. */ | ||
278 | - { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR, | ||
279 | - ISA_MIPS64R2 | INSN_XLR, 0, | ||
280 | - mips_cp0_names_xlr, | ||
281 | - mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr), | ||
282 | - mips_hwr_names_numeric }, | ||
283 | + { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP, | ||
284 | + ISA_MIPS64R2 | INSN_XLP, 0, | ||
285 | + mips_cp0_names_mips3264r2, | ||
286 | + mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2), | ||
287 | + mips_hwr_names_mips3264r2 }, | ||
288 | |||
289 | /* This entry, mips16, is here only for ISA/processor selection; do | ||
290 | not print its name. */ | ||
291 | Index: binutils-2.24/opcodes/mips-opc.c | ||
292 | =================================================================== | ||
293 | --- binutils-2.24.orig/opcodes/mips-opc.c 2013-12-15 13:07:57.180399300 -0800 | ||
294 | +++ binutils-2.24/opcodes/mips-opc.c 2013-12-15 13:27:30.573724118 -0800 | ||
295 | @@ -262,7 +262,8 @@ | ||
296 | #define IOCT (INSN_OCTEON | INSN_OCTEONP | INSN_OCTEON2) | ||
297 | #define IOCTP (INSN_OCTEONP | INSN_OCTEON2) | ||
298 | #define IOCT2 INSN_OCTEON2 | ||
299 | -#define XLR INSN_XLR | ||
300 | +#define XLR INSN_XLR | ||
301 | +#define XLP INSN_XLP | ||
302 | #define IVIRT ASE_VIRT | ||
303 | #define IVIRT64 ASE_VIRT64 | ||
304 | |||
305 | @@ -881,6 +882,7 @@ | ||
306 | {"cins", "t,r,+p,+S", 0x70000032, 0xfc00003f, WR_1|RD_2, 0, IOCT, 0, 0 }, | ||
307 | {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, 0 }, | ||
308 | {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, 0 }, | ||
309 | +{"crc", "d,s,t", 0x7000001c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, | ||
310 | {"ctc0", "t,G", 0x40c00000, 0xffe007ff, RD_1|WR_CC|COD, 0, I1, 0, IOCT|IOCTP|IOCT2 }, | ||
311 | {"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|COD|FP_S, 0, I1, 0, 0 }, | ||
312 | {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|COD|FP_S, 0, I1, 0, 0 }, | ||
313 | @@ -913,10 +915,11 @@ | ||
314 | {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 }, | ||
315 | {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 }, | ||
316 | {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 }, | ||
317 | -{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR, 0, 0 }, | ||
318 | +{"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0, XLR|XLP, 0, 0 }, | ||
319 | {"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5, 0, 0 }, | ||
320 | {"dclo", "U,s", 0x70000025, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, 0 }, | ||
321 | {"dclz", "U,s", 0x70000024, 0xfc0007ff, WR_1|RD_2, 0, I64|N55, 0, 0 }, | ||
322 | +{"dcrc", "d,s,t", 0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, | ||
323 | /* dctr and dctw are used on the r5000. */ | ||
324 | {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, | ||
325 | {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, | ||
326 | @@ -980,6 +983,7 @@ | ||
327 | {"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LCD, 0, I64, 0, 0 }, | ||
328 | {"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LCD, 0, 0, IVIRT64, 0 }, | ||
329 | {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LCD, 0, 0, IVIRT64, 0 }, | ||
330 | +{"dmfur", "t,d", 0x7000001e, 0xffe007ff, WR_1, 0, XLP, 0, 0 }, | ||
331 | {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 }, | ||
332 | {"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 }, | ||
333 | {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|COD, 0, I3, 0, EE }, | ||
334 | @@ -994,6 +998,8 @@ | ||
335 | /* dmtc2 is at the bottom of the table. */ | ||
336 | /* dmfc3 is at the bottom of the table. */ | ||
337 | /* dmtc3 is at the bottom of the table. */ | ||
338 | +{"dmtur", "t,d", 0x7000001f, 0xffe007ff, RD_1, 0, XLP, 0, 0 }, | ||
339 | +{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 }, | ||
340 | {"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 }, | ||
341 | {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32 }, | ||
342 | {"dmul", "d,v,I", 0, (int) M_DMUL_I, INSN_MACRO, 0, I3, 0, M32 }, | ||
343 | @@ -1134,9 +1140,9 @@ | ||
344 | /* The macro has to be first to handle o32 correctly. */ | ||
345 | {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 }, | ||
346 | {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3, 0, I3, 0, 0 }, | ||
347 | -{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR, 0, 0 }, | ||
348 | -{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR, 0, 0 }, | ||
349 | -{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR, 0, 0 }, | ||
350 | +{"ldaddw", "t,b", 0x70000010, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, | ||
351 | +{"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, | ||
352 | +{"ldaddd", "t,b", 0x70000012, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, | ||
353 | {"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, | ||
354 | {"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, | ||
355 | {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF }, | ||
356 | @@ -1288,7 +1294,7 @@ | ||
357 | {"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 }, | ||
358 | {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 }, | ||
359 | {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 }, | ||
360 | -{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1, 0, XLR, 0, 0 }, | ||
361 | +{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_1, 0, XLR|XLP, 0, 0 }, | ||
362 | {"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 }, | ||
363 | {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 }, | ||
364 | {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 }, | ||
365 | @@ -1332,10 +1338,13 @@ | ||
366 | /* move is at the top of the table. */ | ||
367 | {"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 }, | ||
368 | {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 }, | ||
369 | +{"msgsnds", "d,t", 0x4a000001, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 }, | ||
370 | {"msgld", "", 0, (int) M_MSGLD, INSN_MACRO, 0, XLR, 0, 0 }, | ||
371 | {"msgld", "t", 0, (int) M_MSGLD_T, INSN_MACRO, 0, XLR, 0, 0 }, | ||
372 | -{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR, 0, 0 }, | ||
373 | -{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR, 0, 0 }, | ||
374 | +{"msglds", "d,t", 0x4a000002, 0xffe007ff, WR_1|RD_2|RD_C0|WR_C0, 0, XLP, 0, 0 }, | ||
375 | +{"msgwait", "", 0, (int) M_MSGWAIT, INSN_MACRO, 0, XLR|XLP, 0, 0 }, | ||
376 | +{"msgwait", "t", 0, (int) M_MSGWAIT_T,INSN_MACRO, 0, XLR|XLP, 0, 0 }, | ||
377 | +{"msgsync", "", 0x4a000004, 0xffffffff,0, 0, XLP, 0, 0 }, | ||
378 | {"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, 0 }, | ||
379 | {"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 }, | ||
380 | {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 }, | ||
381 | @@ -1381,7 +1390,7 @@ | ||
382 | {"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 }, | ||
383 | {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 }, | ||
384 | {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 }, | ||
385 | -{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR, 0, 0 }, | ||
386 | +{"mtcr", "t,s", 0x70000019, 0xfc00ffff, RD_1, 0, XLR|XLP, 0, 0 }, | ||
387 | {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, | ||
388 | {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, | ||
389 | {"mtm2", "s", 0x7000000d, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, | ||
390 | @@ -1802,9 +1811,9 @@ | ||
391 | {"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, 0}, | ||
392 | {"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 }, | ||
393 | {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 }, | ||
394 | -{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR, 0, 0 }, | ||
395 | -{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR, 0, 0 }, | ||
396 | -{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR, 0, 0 }, | ||
397 | +{"swapw", "t,b", 0x70000014, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, | ||
398 | +{"swapwu", "t,b", 0x70000015, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, | ||
399 | +{"swapd", "t,b", 0x70000016, 0xfc00ffff, MOD_1|RD_2|SM, 0, XLR|XLP, 0, 0 }, | ||
400 | {"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 0, I1, 0, IOCT|IOCTP|IOCT2 }, | ||
401 | {"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2 }, | ||
402 | {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 }, | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr15815.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr15815.patch new file mode 100644 index 0000000..9f53f41 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr15815.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | This patch fixes the problem where libiberty is not installed in spite of | ||
2 | asking it via --enable-install-libiberty, the problem is that target_header_dir | ||
3 | is reset explicitly which means libiberty.a will never get installed | ||
4 | |||
5 | also check | ||
6 | |||
7 | https://sourceware.org/bugzilla/show_bug.cgi?id=15815 | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Index: binutils-2.24/libiberty/configure | ||
14 | =================================================================== | ||
15 | --- binutils-2.24.orig/libiberty/configure 2013-12-16 00:08:09.280103157 -0800 | ||
16 | +++ binutils-2.24/libiberty/configure 2013-12-16 00:08:29.753436339 -0800 | ||
17 | @@ -5507,7 +5507,6 @@ | ||
18 | |||
19 | setobjs= | ||
20 | CHECK= | ||
21 | -target_header_dir= | ||
22 | if test -n "${with_target_subdir}"; then | ||
23 | |||
24 | # We are being configured as a target library. AC_REPLACE_FUNCS | ||
25 | Index: binutils-2.24/libiberty/configure.ac | ||
26 | =================================================================== | ||
27 | --- binutils-2.24.orig/libiberty/configure.ac 2013-11-08 02:13:49.000000000 -0800 | ||
28 | +++ binutils-2.24/libiberty/configure.ac 2013-12-16 00:07:45.133436672 -0800 | ||
29 | @@ -405,7 +405,6 @@ | ||
30 | |||
31 | setobjs= | ||
32 | CHECK= | ||
33 | -target_header_dir= | ||
34 | if test -n "${with_target_subdir}"; then | ||
35 | |||
36 | # We are being configured as a target library. AC_REPLACE_FUNCS | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch new file mode 100644 index 0000000..4584748 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch | |||
@@ -0,0 +1,123 @@ | |||
1 | commit 4199e3b8669d0a36448687850374fdc2ad7240b6 | ||
2 | Author: Alan Modra <amodra@gmail.com> | ||
3 | Date: Wed Jan 15 21:50:55 2014 +1030 | ||
4 | |||
5 | non-PIC references to __ehdr_start in pie and shared | ||
6 | |||
7 | Rather than hacking every backend to not discard dynamic relocations | ||
8 | against an undefined hidden __ehdr_start, make it appear to be defined | ||
9 | early. We want __ehdr_start hidden before size_dynamic_sections so | ||
10 | that it isn't put in .dynsym, but we do need the dynamic relocations | ||
11 | for a PIE or shared library with a non-PIC reference. Defining it | ||
12 | early is wrong if we don't actually define the symbol later to its | ||
13 | proper value. (In some cases we want to leave the symbol undefined, | ||
14 | for example, when the ELF header isn't loaded, and we don't have this | ||
15 | infomation available in before_allocation.) | ||
16 | |||
17 | ld/ | ||
18 | * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define | ||
19 | __ehdr_start before size_dynamic_sections and restore afterwards. | ||
20 | ld/testsuite/ | ||
21 | * ld-elf/ehdr_start-shared.d: New. | ||
22 | * ld-elf/ehdr_start-userdef.d: xfail frv. | ||
23 | * ld-elf/ehdr_start-weak.d: Likewise. | ||
24 | * ld-elf/ehdr_start.d: Likewise. | ||
25 | |||
26 | Upstream-Status: Backport | ||
27 | |||
28 | diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em | ||
29 | index 9a2fe89..13f86f0 100644 | ||
30 | --- a/ld/emultempl/elf32.em | ||
31 | +++ b/ld/emultempl/elf32.em | ||
32 | @@ -1480,6 +1480,8 @@ gld${EMULATION_NAME}_before_allocation (void) | ||
33 | const char *rpath; | ||
34 | asection *sinterp; | ||
35 | bfd *abfd; | ||
36 | + struct elf_link_hash_entry *ehdr_start = NULL; | ||
37 | + struct bfd_link_hash_entry ehdr_start_save; | ||
38 | |||
39 | if (is_elf_hash_table (link_info.hash)) | ||
40 | { | ||
41 | @@ -1504,6 +1506,16 @@ gld${EMULATION_NAME}_before_allocation (void) | ||
42 | _bfd_elf_link_hash_hide_symbol (&link_info, h, TRUE); | ||
43 | if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL) | ||
44 | h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN; | ||
45 | + /* Don't leave the symbol undefined. Undefined hidden | ||
46 | + symbols typically won't have dynamic relocations, but | ||
47 | + we most likely will need dynamic relocations for | ||
48 | + __ehdr_start if we are building a PIE or shared | ||
49 | + library. */ | ||
50 | + ehdr_start = h; | ||
51 | + ehdr_start_save = h->root; | ||
52 | + h->root.type = bfd_link_hash_defined; | ||
53 | + h->root.u.def.section = bfd_abs_section_ptr; | ||
54 | + h->root.u.def.value = 0; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | @@ -1620,6 +1632,14 @@ ${ELF_INTERPRETER_SET_DEFAULT} | ||
59 | |||
60 | if (!bfd_elf_size_dynsym_hash_dynstr (link_info.output_bfd, &link_info)) | ||
61 | einfo ("%P%F: failed to set dynamic section sizes: %E\n"); | ||
62 | + | ||
63 | + if (ehdr_start != NULL) | ||
64 | + { | ||
65 | + /* If we twiddled __ehdr_start to defined earlier, put it back | ||
66 | + as it was. */ | ||
67 | + ehdr_start->root.type = ehdr_start_save.type; | ||
68 | + ehdr_start->root.u = ehdr_start_save.u; | ||
69 | + } | ||
70 | } | ||
71 | |||
72 | EOF | ||
73 | diff --git a/ld/testsuite/ld-elf/ehdr_start-shared.d b/ld/testsuite/ld-elf/ehdr_start-shared.d | ||
74 | new file mode 100644 | ||
75 | index 0000000..c17516a | ||
76 | --- /dev/null | ||
77 | +++ b/ld/testsuite/ld-elf/ehdr_start-shared.d | ||
78 | @@ -0,0 +1,9 @@ | ||
79 | +#source: ehdr_start.s | ||
80 | +#ld: -e _start -shared | ||
81 | +#nm: -n | ||
82 | +#target: *-*-linux* *-*-gnu* *-*-nacl* | ||
83 | +#xfail: cris*-*-* frv-*-* | ||
84 | + | ||
85 | +#... | ||
86 | +[0-9a-f]*000 [Adrt] __ehdr_start | ||
87 | +#pass | ||
88 | diff --git a/ld/testsuite/ld-elf/ehdr_start-userdef.d b/ld/testsuite/ld-elf/ehdr_start-userdef.d | ||
89 | index 2a88e98..b58ae3f 100644 | ||
90 | --- a/ld/testsuite/ld-elf/ehdr_start-userdef.d | ||
91 | +++ b/ld/testsuite/ld-elf/ehdr_start-userdef.d | ||
92 | @@ -2,6 +2,7 @@ | ||
93 | #ld: -e _start -T ehdr_start-userdef.t | ||
94 | #readelf: -Ws | ||
95 | #target: *-*-linux* *-*-gnu* *-*-nacl* | ||
96 | +#xfail: frv-*-* | ||
97 | |||
98 | #... | ||
99 | Symbol table '\.symtab' contains [0-9]+ entries: | ||
100 | diff --git a/ld/testsuite/ld-elf/ehdr_start-weak.d b/ld/testsuite/ld-elf/ehdr_start-weak.d | ||
101 | index 8bd9035..24ae34c 100644 | ||
102 | --- a/ld/testsuite/ld-elf/ehdr_start-weak.d | ||
103 | +++ b/ld/testsuite/ld-elf/ehdr_start-weak.d | ||
104 | @@ -2,6 +2,7 @@ | ||
105 | #ld: -e _start -T ehdr_start-missing.t | ||
106 | #nm: -n | ||
107 | #target: *-*-linux* *-*-gnu* *-*-nacl* | ||
108 | +#xfail: frv-*-* | ||
109 | |||
110 | #... | ||
111 | \s+[wU] __ehdr_start | ||
112 | diff --git a/ld/testsuite/ld-elf/ehdr_start.d b/ld/testsuite/ld-elf/ehdr_start.d | ||
113 | index 52e5b54..d538b66 100644 | ||
114 | --- a/ld/testsuite/ld-elf/ehdr_start.d | ||
115 | +++ b/ld/testsuite/ld-elf/ehdr_start.d | ||
116 | @@ -2,6 +2,7 @@ | ||
117 | #ld: -e _start | ||
118 | #nm: -n | ||
119 | #target: *-*-linux* *-*-gnu* *-*-nacl* | ||
120 | +#xfail: frv-*-* | ||
121 | |||
122 | #... | ||
123 | [0-9a-f]*000 [Adrt] __ehdr_start | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16476.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16476.patch new file mode 100644 index 0000000..65d62bc --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16476.patch | |||
@@ -0,0 +1,220 @@ | |||
1 | From: H.J. Lu <hjl.tools@gmail.com> | ||
2 | Date: Tue, 21 Jan 2014 23:42:43 +0000 (-0800) | ||
3 | Subject: Check incompatible existing default symbol definition | ||
4 | X-Git-Tag: hjl/linux/release/2.24.51.0.3~1^2~8^2~16 | ||
5 | X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff_plain;h=4584ec12076e088cf36965b88ef8710ca85491f9 | ||
6 | |||
7 | Check incompatible existing default symbol definition | ||
8 | |||
9 | After resolving a versioned reference, foo@VER1, to a default versioned | ||
10 | definition, foo@@VER1, from a shared object, we also merge it with | ||
11 | the existing regular default symbol definition, foo. When foo is IFUNC | ||
12 | and foo@@VER1 aren't, we will merge 2 incompatible definitions. This | ||
13 | patch avoids merging foo@@VER1 definition with foo definition if | ||
14 | one is IFUNC and the other isn't. | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | --- | ||
18 | |||
19 | #diff --git a/bfd/ChangeLog b/bfd/ChangeLog | ||
20 | #index 5923bc3..c70a7db 100644 | ||
21 | #--- a/bfd/ChangeLog | ||
22 | #+++ b/bfd/ChangeLog | ||
23 | #@@ -1,5 +1,13 @@ | ||
24 | # 2014-01-21 H.J. Lu <hongjiu.lu@intel.com> | ||
25 | # | ||
26 | #+ PR ld/16467 | ||
27 | #+ * elflink.c (_bfd_elf_merge_symbol): When types of the existing | ||
28 | #+ regular default symbol definition and the versioned dynamic | ||
29 | #+ symbol definition mismatch, skip the default symbol definition | ||
30 | #+ if one of them is IFUNC. | ||
31 | #+ | ||
32 | #+2014-01-21 H.J. Lu <hongjiu.lu@intel.com> | ||
33 | #+ | ||
34 | # PR ld/2404 | ||
35 | # * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared, | ||
36 | # info->export_dynamic nor h->ref_dynamic for type mismatch when | ||
37 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
38 | index d0006da..792e14e 100644 | ||
39 | --- a/bfd/elflink.c | ||
40 | +++ b/bfd/elflink.c | ||
41 | @@ -1092,11 +1092,14 @@ _bfd_elf_merge_symbol (bfd *abfd, | ||
42 | && newdyn | ||
43 | && newdef | ||
44 | && !olddyn | ||
45 | - && (olddef || h->root.type == bfd_link_hash_common) | ||
46 | - && ELF_ST_TYPE (sym->st_info) != h->type | ||
47 | - && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE | ||
48 | - && h->type != STT_NOTYPE | ||
49 | - && !(newfunc && oldfunc)) | ||
50 | + && (((olddef || h->root.type == bfd_link_hash_common) | ||
51 | + && ELF_ST_TYPE (sym->st_info) != h->type | ||
52 | + && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE | ||
53 | + && h->type != STT_NOTYPE | ||
54 | + && !(newfunc && oldfunc)) | ||
55 | + || (olddef | ||
56 | + && ((h->type == STT_GNU_IFUNC) | ||
57 | + != (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC))))) | ||
58 | { | ||
59 | *skip = TRUE; | ||
60 | return TRUE; | ||
61 | #diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog | ||
62 | #index ac65a3a..a092428 100644 | ||
63 | #--- a/ld/testsuite/ChangeLog | ||
64 | #+++ b/ld/testsuite/ChangeLog | ||
65 | #@@ -1,5 +1,19 @@ | ||
66 | # 2014-01-21 H.J. Lu <hongjiu.lu@intel.com> | ||
67 | # | ||
68 | #+ PR ld/16467 | ||
69 | #+ * ld-ifunc/dummy.c: New file. | ||
70 | #+ * ld-ifunc/pr16467.out: Likewise. | ||
71 | ##+ * ld-ifunc/pr16467a.c: Likewise. | ||
72 | #+ * ld-ifunc/pr16467a.map: Likewise. | ||
73 | #+ * ld-ifunc/pr16467b.c: Likewise. | ||
74 | #+ * ld-ifunc/pr16467b.map: Likewise. | ||
75 | #+ * ld-ifunc/pr16467c.c: Likewise. | ||
76 | #+ | ||
77 | #+ * ld-ifunc/ifunc.exp (run_cc_link_tests): New. | ||
78 | #+ (run_ld_link_exec_tests): Run pr16467. | ||
79 | #+ | ||
80 | #+2014-01-21 H.J. Lu <hongjiu.lu@intel.com> | ||
81 | #+ | ||
82 | # PR ld/2404 | ||
83 | # * ld-elf/shared.exp: Add a PIE test for PR ld/2404. | ||
84 | # | ||
85 | diff --git a/ld/testsuite/ld-ifunc/dummy.c b/ld/testsuite/ld-ifunc/dummy.c | ||
86 | new file mode 100644 | ||
87 | index 0000000..5c03287 | ||
88 | --- /dev/null | ||
89 | +++ b/ld/testsuite/ld-ifunc/dummy.c | ||
90 | @@ -0,0 +1 @@ | ||
91 | +/* An empty file. */ | ||
92 | diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp | ||
93 | index fb106c6..d7ff445 100644 | ||
94 | --- a/ld/testsuite/ld-ifunc/ifunc.exp | ||
95 | +++ b/ld/testsuite/ld-ifunc/ifunc.exp | ||
96 | @@ -349,6 +349,42 @@ if { $verbose < 1 } { | ||
97 | remote_file host delete "tmpdir/static_nonifunc_prog" | ||
98 | } | ||
99 | |||
100 | +run_cc_link_tests [list \ | ||
101 | + [list \ | ||
102 | + "Build libpr16467a.so" \ | ||
103 | + "-shared -Wl,--version-script=pr16467a.map" \ | ||
104 | + "-fPIC" \ | ||
105 | + { pr16467a.c } \ | ||
106 | + {} \ | ||
107 | + "libpr16467a.so" \ | ||
108 | + ] \ | ||
109 | + [list \ | ||
110 | + "Build libpr16467b.a" \ | ||
111 | + "" \ | ||
112 | + "-fPIC" \ | ||
113 | + { pr16467b.c } \ | ||
114 | + {} \ | ||
115 | + "libpr16467b.a" \ | ||
116 | + ] \ | ||
117 | + [list \ | ||
118 | + "Build libpr16467b.so" \ | ||
119 | + "-shared tmpdir/pr16467b.o tmpdir/libpr16467a.so \ | ||
120 | + -Wl,--version-script=pr16467b.map" \ | ||
121 | + "-fPIC" \ | ||
122 | + { dummy.c } \ | ||
123 | + {} \ | ||
124 | + "libpr16467b.so" \ | ||
125 | + ] \ | ||
126 | + [list \ | ||
127 | + "Build libpr16467c.a" \ | ||
128 | + "" \ | ||
129 | + "" \ | ||
130 | + { pr16467c.c } \ | ||
131 | + {} \ | ||
132 | + "libpr16467c.a" \ | ||
133 | + ] \ | ||
134 | +] | ||
135 | + | ||
136 | run_ld_link_exec_tests [] [list \ | ||
137 | [list \ | ||
138 | "Common symbol override ifunc test 1a" \ | ||
139 | @@ -368,6 +404,15 @@ run_ld_link_exec_tests [] [list \ | ||
140 | "ifunc-common-1.out" \ | ||
141 | "-g" \ | ||
142 | ] \ | ||
143 | + [list \ | ||
144 | + "Run pr16467" \ | ||
145 | + "tmpdir/pr16467c.o tmpdir/libpr16467b.so tmpdir/libpr16467a.so" \ | ||
146 | + "" \ | ||
147 | + { dummy.c } \ | ||
148 | + "pr16467" \ | ||
149 | + "pr16467.out" \ | ||
150 | + "" \ | ||
151 | + ] \ | ||
152 | ] | ||
153 | |||
154 | set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] | ||
155 | diff --git a/ld/testsuite/ld-ifunc/pr16467.out b/ld/testsuite/ld-ifunc/pr16467.out | ||
156 | new file mode 100644 | ||
157 | index 0000000..d86bac9 | ||
158 | --- /dev/null | ||
159 | +++ b/ld/testsuite/ld-ifunc/pr16467.out | ||
160 | @@ -0,0 +1 @@ | ||
161 | +OK | ||
162 | diff --git a/ld/testsuite/ld-ifunc/pr16467a.c b/ld/testsuite/ld-ifunc/pr16467a.c | ||
163 | new file mode 100644 | ||
164 | index 0000000..ae3f084 | ||
165 | --- /dev/null | ||
166 | +++ b/ld/testsuite/ld-ifunc/pr16467a.c | ||
167 | @@ -0,0 +1,5 @@ | ||
168 | +const char * | ||
169 | +sd_get_seats(void) | ||
170 | +{ | ||
171 | + return "OK"; | ||
172 | +} | ||
173 | diff --git a/ld/testsuite/ld-ifunc/pr16467a.map b/ld/testsuite/ld-ifunc/pr16467a.map | ||
174 | new file mode 100644 | ||
175 | index 0000000..d677f37 | ||
176 | --- /dev/null | ||
177 | +++ b/ld/testsuite/ld-ifunc/pr16467a.map | ||
178 | @@ -0,0 +1,4 @@ | ||
179 | +LIBSYSTEMD_209 { | ||
180 | +global: | ||
181 | + sd_get_seats; | ||
182 | +}; | ||
183 | diff --git a/ld/testsuite/ld-ifunc/pr16467b.c b/ld/testsuite/ld-ifunc/pr16467b.c | ||
184 | new file mode 100644 | ||
185 | index 0000000..264f6cf | ||
186 | --- /dev/null | ||
187 | +++ b/ld/testsuite/ld-ifunc/pr16467b.c | ||
188 | @@ -0,0 +1,7 @@ | ||
189 | +void new_sd_get_seats(void); | ||
190 | +__asm__(".symver new_sd_get_seats,sd_get_seats@LIBSYSTEMD_209"); | ||
191 | +void (*resolve_sd_get_seats(void)) (void) __asm__ ("sd_get_seats"); | ||
192 | +void (*resolve_sd_get_seats(void)) (void) { | ||
193 | + return new_sd_get_seats; | ||
194 | +} | ||
195 | +__asm__(".type sd_get_seats, %gnu_indirect_function"); | ||
196 | diff --git a/ld/testsuite/ld-ifunc/pr16467b.map b/ld/testsuite/ld-ifunc/pr16467b.map | ||
197 | new file mode 100644 | ||
198 | index 0000000..1f263de | ||
199 | --- /dev/null | ||
200 | +++ b/ld/testsuite/ld-ifunc/pr16467b.map | ||
201 | @@ -0,0 +1,4 @@ | ||
202 | +LIBSYSTEMD_208 { | ||
203 | +global: | ||
204 | + sd_get_seats; | ||
205 | +}; | ||
206 | diff --git a/ld/testsuite/ld-ifunc/pr16467c.c b/ld/testsuite/ld-ifunc/pr16467c.c | ||
207 | new file mode 100644 | ||
208 | index 0000000..e2a901c | ||
209 | --- /dev/null | ||
210 | +++ b/ld/testsuite/ld-ifunc/pr16467c.c | ||
211 | @@ -0,0 +1,9 @@ | ||
212 | +#include <stdio.h> | ||
213 | +const char* sd_get_seats(void); | ||
214 | + | ||
215 | +int | ||
216 | +main (int argc, char **argv) | ||
217 | +{ | ||
218 | + printf("%s\n", sd_get_seats()); | ||
219 | + return 0; | ||
220 | +} | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch new file mode 100644 index 0000000..41f3504 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From: H.J. Lu <hjl.tools@gmail.com> | ||
2 | Date: Tue, 21 Jan 2014 13:33:48 +0000 (-0800) | ||
3 | Subject: Don't check shared/export_dynamic/ref_dynamic for type mismatch | ||
4 | X-Git-Tag: hjl/linux/release/2.24.51.0.3~1^2~8^2~22 | ||
5 | X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff_plain;h=22ef172a21663abb477d72284b4d59c8eabcbb82 | ||
6 | |||
7 | Don't check shared/export_dynamic/ref_dynamic for type mismatch | ||
8 | |||
9 | There is nothing linker can do when a type mismatched default definition | ||
10 | are made dynamic by info->shared, info->export_dynamic or h->ref_dynamic. | ||
11 | But we do want to avoid exporting it when building PIE. Let's remove | ||
12 | those checks. | ||
13 | |||
14 | bfd/ | ||
15 | |||
16 | PR ld/2404 | ||
17 | * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared, | ||
18 | info->export_dynamic, nor !h->ref_dynamic for type mismatch when | ||
19 | adding the default version. | ||
20 | |||
21 | ld/testsuite/ | ||
22 | |||
23 | PR ld/2404 | ||
24 | * ld-elf/shared.exp: Add a PIE test for PR ld/2404. | ||
25 | |||
26 | Upstream-Status: Backport | ||
27 | --- | ||
28 | |||
29 | Index: binutils-2.24/bfd/elflink.c | ||
30 | =================================================================== | ||
31 | --- binutils-2.24.orig/bfd/elflink.c 2014-02-08 13:20:08.628378267 +0000 | ||
32 | +++ binutils-2.24/bfd/elflink.c 2014-02-08 13:20:08.624378267 +0000 | ||
33 | @@ -1090,9 +1090,6 @@ | ||
34 | the type of existing regular definition mismatch. We only do it | ||
35 | if the existing regular definition won't be dynamic. */ | ||
36 | if (pold_alignment == NULL | ||
37 | - && !info->shared | ||
38 | - && !info->export_dynamic | ||
39 | - && !h->ref_dynamic | ||
40 | && newdyn | ||
41 | && newdef | ||
42 | && !olddyn | ||
43 | Index: binutils-2.24/ld/testsuite/ld-elf/shared.exp | ||
44 | =================================================================== | ||
45 | --- binutils-2.24.orig/ld/testsuite/ld-elf/shared.exp 2014-02-08 13:20:08.628378267 +0000 | ||
46 | +++ binutils-2.24/ld/testsuite/ld-elf/shared.exp 2014-02-08 13:20:08.624378267 +0000 | ||
47 | @@ -432,3 +432,29 @@ | ||
48 | |||
49 | run_cc_link_tests $build_cxx_tests | ||
50 | run_ld_link_exec_tests [] $run_cxx_tests | ||
51 | + | ||
52 | +if { [istarget *-*-linux*] | ||
53 | + || [istarget *-*-nacl*] | ||
54 | + || [istarget *-*-gnu*] } { | ||
55 | + run_cc_link_tests [list \ | ||
56 | + [list \ | ||
57 | + "Build libpr2404b.a with PIE" \ | ||
58 | + "" \ | ||
59 | + "-fPIE" \ | ||
60 | + { pr2404b.c } \ | ||
61 | + {} \ | ||
62 | + "libpr2404b.a" \ | ||
63 | + ] \ | ||
64 | + ] | ||
65 | + run_ld_link_exec_tests [] [list \ | ||
66 | + [list \ | ||
67 | + "Run pr2404 with PIE" \ | ||
68 | + "-pie tmpdir/pr2404b.o tmpdir/libpr2404a.so" \ | ||
69 | + "" \ | ||
70 | + { dummy.c } \ | ||
71 | + "pr2404pie" \ | ||
72 | + "pr2404.out" \ | ||
73 | + "-fPIE" \ | ||
74 | + ] \ | ||
75 | + ] | ||
76 | +} | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libiberty_path_fix.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libiberty_path_fix.patch new file mode 100644 index 0000000..6e732fb --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libiberty_path_fix.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | don't let the distro compiler point to the wrong installation location | ||
4 | |||
5 | Thanks to RP for helping find the source code causing the issue. | ||
6 | |||
7 | 2010/08/13 | ||
8 | Nitin A Kamble <nitin.a.kamble@intel.com> | ||
9 | Index: binutils-2.22/libiberty/Makefile.in | ||
10 | =================================================================== | ||
11 | --- binutils-2.22.orig/libiberty/Makefile.in | ||
12 | +++ binutils-2.22/libiberty/Makefile.in | ||
13 | @@ -350,7 +350,8 @@ install-strip: install | ||
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/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libtool-2.4-update.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libtool-2.4-update.patch new file mode 100644 index 0000000..2e621f1 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libtool-2.4-update.patch | |||
@@ -0,0 +1,19317 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Index: binutils-2.24/libtool.m4 | ||
4 | =================================================================== | ||
5 | --- binutils-2.24.orig/libtool.m4 2013-11-04 07:33:40.000000000 -0800 | ||
6 | +++ binutils-2.24/libtool.m4 2013-12-15 11:10:23.863785363 -0800 | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 | @@ -1320,14 +1369,47 @@ | ||
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 | @@ -1623,7 +1705,7 @@ | ||
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 | @@ -1667,10 +1749,10 @@ | ||
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 | @@ -2210,8 +2292,9 @@ | ||
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 | @@ -2244,13 +2327,71 @@ | ||
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 | @@ -2342,7 +2483,7 @@ | ||
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 | @@ -2950,6 +3091,11 @@ | ||
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 | @@ -3016,7 +3162,8 @@ | ||
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 | @@ -3167,6 +3314,21 @@ | ||
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 | @@ -3174,7 +3336,11 @@ | ||
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 | @@ -3277,6 +3443,67 @@ | ||
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 | @@ -3403,8 +3630,8 @@ | ||
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 | @@ -3440,6 +3667,7 @@ | ||
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 | @@ -3473,6 +3701,18 @@ | ||
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 | @@ -3484,7 +3724,7 @@ | ||
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 | @@ -3510,15 +3750,15 @@ | ||
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 | @@ -3551,6 +3791,13 @@ | ||
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 | @@ -3561,6 +3808,8 @@ | ||
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 | @@ -3572,7 +3821,6 @@ | ||
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 | @@ -3678,6 +3926,12 @@ | ||
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 | @@ -3830,7 +4084,7 @@ | ||
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 | @@ -4053,6 +4307,12 @@ | ||
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 | @@ -4115,7 +4375,7 @@ | ||
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 | @@ -4172,9 +4432,11 @@ | ||
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 | @@ -4193,6 +4455,8 @@ | ||
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 | @@ -4213,6 +4477,7 @@ | ||
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 | @@ -4221,6 +4486,7 @@ | ||
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 | @@ -4235,15 +4501,20 @@ | ||
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 | @@ -4411,7 +4682,8 @@ | ||
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 | @@ -4459,7 +4731,7 @@ | ||
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 | @@ -4510,12 +4782,12 @@ | ||
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 | @@ -4529,8 +4801,8 @@ | ||
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 | @@ -4548,8 +4820,8 @@ | ||
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 | @@ -4595,8 +4867,8 @@ | ||
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 | @@ -4726,7 +4998,7 @@ | ||
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 | @@ -4737,7 +5009,7 @@ | ||
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 | @@ -4781,20 +5053,63 @@ | ||
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 | @@ -4828,7 +5143,7 @@ | ||
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 | @@ -4836,7 +5151,7 @@ | ||
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 | @@ -4852,7 +5167,7 @@ | ||
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 | @@ -4876,10 +5191,10 @@ | ||
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 | @@ -4926,16 +5241,31 @@ | ||
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 | @@ -5020,7 +5350,7 @@ | ||
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 | @@ -5039,9 +5369,9 @@ | ||
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 | @@ -5313,8 +5643,6 @@ | ||
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 | @@ -5325,6 +5653,8 @@ | ||
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 | @@ -5426,6 +5756,7 @@ | ||
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 | @@ -5487,6 +5818,7 @@ | ||
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 | @@ -5504,6 +5836,7 @@ | ||
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 | @@ -5525,8 +5858,8 @@ | ||
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 | @@ -5667,7 +6000,7 @@ | ||
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 | @@ -5679,7 +6012,7 @@ | ||
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 | @@ -5721,29 +6054,75 @@ | ||
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 | @@ -5818,7 +6197,7 @@ | ||
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 | @@ -5889,10 +6268,10 @@ | ||
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 | @@ -5933,9 +6312,9 @@ | ||
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 | @@ -6005,20 +6384,20 @@ | ||
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 | @@ -6213,7 +6592,7 @@ | ||
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 | @@ -6259,7 +6638,7 @@ | ||
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 | @@ -6300,9 +6679,9 @@ | ||
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 | @@ -6431,6 +6810,7 @@ | ||
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 | @@ -6445,6 +6825,29 @@ | ||
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 | @@ -6453,6 +6856,7 @@ | ||
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 | @@ -6503,6 +6907,13 @@ | ||
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 | @@ -6514,7 +6925,7 @@ | ||
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 | @@ -6523,13 +6934,22 @@ | ||
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 | @@ -6549,8 +6969,10 @@ | ||
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 | @@ -6586,6 +7008,7 @@ | ||
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 | @@ -6622,7 +7045,7 @@ | ||
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 | @@ -6735,7 +7158,9 @@ | ||
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 | @@ -6789,6 +7214,7 @@ | ||
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 | @@ -6865,7 +7291,9 @@ | ||
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 | @@ -6921,7 +7349,8 @@ | ||
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 | @@ -6958,10 +7387,12 @@ | ||
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 | @@ -6992,7 +7423,8 @@ | ||
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 | @@ -7027,9 +7459,11 @@ | ||
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 | @@ -7042,7 +7476,8 @@ | ||
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 | @@ -7101,6 +7536,15 @@ | ||
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 | @@ -7194,8 +7638,8 @@ | ||
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 | @@ -7234,206 +7678,162 @@ | ||
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 | ||
1826 | Index: binutils-2.24/ltmain.sh | ||
1827 | =================================================================== | ||
1828 | --- binutils-2.24.orig/ltmain.sh 2013-11-04 07:33:40.000000000 -0800 | ||
1829 | +++ binutils-2.24/ltmain.sh 2013-12-15 11:10:23.867118697 -0800 | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
2085 | # unless 'noexit' is passed as argument. | ||
2086 | func_help () | ||
2087 | { | ||
2088 | + $opt_debug | ||
2089 | + | ||
2090 | $SED -n '/^# Usage:/,/# Report bugs to/ { | ||
2091 | |||
2092 | s/^# // | ||
2093 | s/^# *$// | ||
2094 | s*\$progname*'$progname'* | ||
2095 | @@ -714,7 +774,11 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 | |||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
4978 | ;; | ||
4979 | esac | ||
4980 | fi | ||
4981 | - deplibs="$deplibs $arg" | ||
4982 | + func_append deplibs " $arg" | ||
4983 | continue | ||
4984 | ;; | ||
4985 | |||
4986 | @@ -4782,8 +5642,8 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
5848 | continue | ||
5849 | fi | ||
5850 | fi | ||
5851 | - removelist="$removelist $p" | ||
5852 | + func_append removelist " $p" | ||
5853 | ;; | ||
5854 | *) ;; | ||
5855 | esac | ||
5856 | @@ -6642,7 +7560,7 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
5939 | fi | ||
5940 | ;; | ||
5941 | *) | ||
5942 | - newdeplibs="$newdeplibs $i" | ||
5943 | + func_append newdeplibs " $i" | ||
5944 | ;; | ||
5945 | esac | ||
5946 | done | ||
5947 | @@ -6807,18 +7726,18 @@ | ||
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 @@ | ||
5971 | fi | ||
5972 | ;; | ||
5973 | *) | ||
5974 | - newdeplibs="$newdeplibs $i" | ||
5975 | + func_append newdeplibs " $i" | ||
5976 | ;; | ||
5977 | esac | ||
5978 | done | ||
5979 | @@ -6857,15 +7776,27 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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 @@ | ||
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" | ||
7056 | Index: binutils-2.24/ltoptions.m4 | ||
7057 | =================================================================== | ||
7058 | --- binutils-2.24.orig/ltoptions.m4 2013-11-04 07:33:40.000000000 -0800 | ||
7059 | +++ binutils-2.24/ltoptions.m4 2013-12-15 11:10:23.867118697 -0800 | ||
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])]) | ||
7069 | Index: binutils-2.24/ltversion.m4 | ||
7070 | =================================================================== | ||
7071 | --- binutils-2.24.orig/ltversion.m4 2013-11-04 07:33:40.000000000 -0800 | ||
7072 | +++ binutils-2.24/ltversion.m4 2013-12-15 11:10:23.867118697 -0800 | ||
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 | ]) | ||
7097 | Index: binutils-2.24/lt~obsolete.m4 | ||
7098 | =================================================================== | ||
7099 | --- binutils-2.24.orig/lt~obsolete.m4 2013-11-04 07:33:40.000000000 -0800 | ||
7100 | +++ binutils-2.24/lt~obsolete.m4 2013-12-15 11:10:23.867118697 -0800 | ||
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 | # | ||
7110 | Index: binutils-2.24/configure | ||
7111 | =================================================================== | ||
7112 | --- binutils-2.24.orig/configure 2013-12-15 11:09:51.000000000 -0800 | ||
7113 | +++ binutils-2.24/configure 2013-12-15 11:10:23.870452030 -0800 | ||
7114 | @@ -7921,7 +7921,7 @@ | ||
7115 | # For an installed makeinfo, we require it to be from texinfo 4.7 or | ||
7116 | # higher, else we use the "missing" dummy. | ||
7117 | if ${MAKEINFO} --version \ | ||
7118 | - | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then | ||
7119 | + | egrep 'texinfo[^0-9]*([1-3][0-9]|4.[4-9]|4.[1-9][0-9]+|[5-9])' >/dev/null 2>&1; then | ||
7120 | : | ||
7121 | else | ||
7122 | MAKEINFO="$MISSING makeinfo" | ||
7123 | Index: binutils-2.24/bfd/configure | ||
7124 | =================================================================== | ||
7125 | --- binutils-2.24.orig/bfd/configure 2013-12-02 01:30:30.000000000 -0800 | ||
7126 | +++ binutils-2.24/bfd/configure 2013-12-15 11:10:23.870452030 -0800 | ||
7127 | @@ -668,6 +668,9 @@ | ||
7128 | LIPO | ||
7129 | NMEDIT | ||
7130 | DSYMUTIL | ||
7131 | +MANIFEST_TOOL | ||
7132 | +ac_ct_AR | ||
7133 | +DLLTOOL | ||
7134 | OBJDUMP | ||
7135 | LN_S | ||
7136 | NM | ||
7137 | @@ -780,6 +783,7 @@ | ||
7138 | with_pic | ||
7139 | enable_fast_install | ||
7140 | with_gnu_ld | ||
7141 | +with_libtool_sysroot | ||
7142 | enable_libtool_lock | ||
7143 | enable_plugins | ||
7144 | enable_largefile | ||
7145 | @@ -1456,6 +1460,8 @@ | ||
7146 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
7147 | both] | ||
7148 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
7149 | + --with-libtool-sysroot=DIR Search for dependent libraries within DIR | ||
7150 | + (or the compiler's sysroot if not specified). | ||
7151 | --with-mmap try using mmap for BFD input files if available | ||
7152 | --with-separate-debug-dir=DIR | ||
7153 | Look for global separate debug info in DIR | ||
7154 | @@ -5386,8 +5392,8 @@ | ||
7155 | |||
7156 | |||
7157 | |||
7158 | -macro_version='2.2.7a' | ||
7159 | -macro_revision='1.3134' | ||
7160 | +macro_version='2.4' | ||
7161 | +macro_revision='1.3293' | ||
7162 | |||
7163 | |||
7164 | |||
7165 | @@ -5427,7 +5433,7 @@ | ||
7166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | ||
7167 | $as_echo_n "checking how to print strings... " >&6; } | ||
7168 | # Test print first, because it will be a builtin if present. | ||
7169 | -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | ||
7170 | +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
7171 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
7172 | ECHO='print -r --' | ||
7173 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
7174 | @@ -6113,8 +6119,8 @@ | ||
7175 | # Try some XSI features | ||
7176 | xsi_shell=no | ||
7177 | ( _lt_dummy="a/b/c" | ||
7178 | - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | ||
7179 | - = c,a/b,, \ | ||
7180 | + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
7181 | + = c,a/b,b/c, \ | ||
7182 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
7183 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
7184 | && xsi_shell=yes | ||
7185 | @@ -6163,6 +6169,80 @@ | ||
7186 | |||
7187 | |||
7188 | |||
7189 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 | ||
7190 | +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } | ||
7191 | +if test "${lt_cv_to_host_file_cmd+set}" = set; then : | ||
7192 | + $as_echo_n "(cached) " >&6 | ||
7193 | +else | ||
7194 | + case $host in | ||
7195 | + *-*-mingw* ) | ||
7196 | + case $build in | ||
7197 | + *-*-mingw* ) # actually msys | ||
7198 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
7199 | + ;; | ||
7200 | + *-*-cygwin* ) | ||
7201 | + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
7202 | + ;; | ||
7203 | + * ) # otherwise, assume *nix | ||
7204 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
7205 | + ;; | ||
7206 | + esac | ||
7207 | + ;; | ||
7208 | + *-*-cygwin* ) | ||
7209 | + case $build in | ||
7210 | + *-*-mingw* ) # actually msys | ||
7211 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
7212 | + ;; | ||
7213 | + *-*-cygwin* ) | ||
7214 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
7215 | + ;; | ||
7216 | + * ) # otherwise, assume *nix | ||
7217 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
7218 | + ;; | ||
7219 | + esac | ||
7220 | + ;; | ||
7221 | + * ) # unhandled hosts (and "normal" native builds) | ||
7222 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
7223 | + ;; | ||
7224 | +esac | ||
7225 | + | ||
7226 | +fi | ||
7227 | + | ||
7228 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
7229 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 | ||
7230 | +$as_echo "$lt_cv_to_host_file_cmd" >&6; } | ||
7231 | + | ||
7232 | + | ||
7233 | + | ||
7234 | + | ||
7235 | + | ||
7236 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 | ||
7237 | +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } | ||
7238 | +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : | ||
7239 | + $as_echo_n "(cached) " >&6 | ||
7240 | +else | ||
7241 | + #assume ordinary cross tools, or native build. | ||
7242 | +lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
7243 | +case $host in | ||
7244 | + *-*-mingw* ) | ||
7245 | + case $build in | ||
7246 | + *-*-mingw* ) # actually msys | ||
7247 | + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
7248 | + ;; | ||
7249 | + esac | ||
7250 | + ;; | ||
7251 | +esac | ||
7252 | + | ||
7253 | +fi | ||
7254 | + | ||
7255 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
7256 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 | ||
7257 | +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } | ||
7258 | + | ||
7259 | + | ||
7260 | + | ||
7261 | + | ||
7262 | + | ||
7263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 | ||
7264 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | ||
7265 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | ||
7266 | @@ -6179,6 +6259,11 @@ | ||
7267 | esac | ||
7268 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
7269 | case $host_os in | ||
7270 | + cygwin* | mingw* | pw32* | cegcc*) | ||
7271 | + if test "$GCC" != yes; then | ||
7272 | + reload_cmds=false | ||
7273 | + fi | ||
7274 | + ;; | ||
7275 | darwin*) | ||
7276 | if test "$GCC" = yes; then | ||
7277 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
7278 | @@ -6347,7 +6432,8 @@ | ||
7279 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
7280 | lt_cv_file_magic_cmd='func_win32_libid' | ||
7281 | else | ||
7282 | - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
7283 | + # Keep this pattern in sync with the one in func_win32_libid. | ||
7284 | + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
7285 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
7286 | fi | ||
7287 | ;; | ||
7288 | @@ -6501,6 +6587,21 @@ | ||
7289 | fi | ||
7290 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 | ||
7291 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | ||
7292 | + | ||
7293 | +file_magic_glob= | ||
7294 | +want_nocaseglob=no | ||
7295 | +if test "$build" = "$host"; then | ||
7296 | + case $host_os in | ||
7297 | + mingw* | pw32*) | ||
7298 | + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
7299 | + want_nocaseglob=yes | ||
7300 | + else | ||
7301 | + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` | ||
7302 | + fi | ||
7303 | + ;; | ||
7304 | + esac | ||
7305 | +fi | ||
7306 | + | ||
7307 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
7308 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
7309 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
7310 | @@ -6516,9 +6617,162 @@ | ||
7311 | |||
7312 | |||
7313 | |||
7314 | + | ||
7315 | + | ||
7316 | + | ||
7317 | + | ||
7318 | + | ||
7319 | + | ||
7320 | + | ||
7321 | + | ||
7322 | + | ||
7323 | + | ||
7324 | if test -n "$ac_tool_prefix"; then | ||
7325 | - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
7326 | -set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
7327 | + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
7328 | +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
7329 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
7330 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
7331 | +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | ||
7332 | + $as_echo_n "(cached) " >&6 | ||
7333 | +else | ||
7334 | + if test -n "$DLLTOOL"; then | ||
7335 | + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
7336 | +else | ||
7337 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
7338 | +for as_dir in $PATH | ||
7339 | +do | ||
7340 | + IFS=$as_save_IFS | ||
7341 | + test -z "$as_dir" && as_dir=. | ||
7342 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
7343 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
7344 | + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
7345 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
7346 | + break 2 | ||
7347 | + fi | ||
7348 | +done | ||
7349 | + done | ||
7350 | +IFS=$as_save_IFS | ||
7351 | + | ||
7352 | +fi | ||
7353 | +fi | ||
7354 | +DLLTOOL=$ac_cv_prog_DLLTOOL | ||
7355 | +if test -n "$DLLTOOL"; then | ||
7356 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 | ||
7357 | +$as_echo "$DLLTOOL" >&6; } | ||
7358 | +else | ||
7359 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
7360 | +$as_echo "no" >&6; } | ||
7361 | +fi | ||
7362 | + | ||
7363 | + | ||
7364 | +fi | ||
7365 | +if test -z "$ac_cv_prog_DLLTOOL"; then | ||
7366 | + ac_ct_DLLTOOL=$DLLTOOL | ||
7367 | + # Extract the first word of "dlltool", so it can be a program name with args. | ||
7368 | +set dummy dlltool; ac_word=$2 | ||
7369 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
7370 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
7371 | +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | ||
7372 | + $as_echo_n "(cached) " >&6 | ||
7373 | +else | ||
7374 | + if test -n "$ac_ct_DLLTOOL"; then | ||
7375 | + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
7376 | +else | ||
7377 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
7378 | +for as_dir in $PATH | ||
7379 | +do | ||
7380 | + IFS=$as_save_IFS | ||
7381 | + test -z "$as_dir" && as_dir=. | ||
7382 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
7383 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
7384 | + ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
7385 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
7386 | + break 2 | ||
7387 | + fi | ||
7388 | +done | ||
7389 | + done | ||
7390 | +IFS=$as_save_IFS | ||
7391 | + | ||
7392 | +fi | ||
7393 | +fi | ||
7394 | +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
7395 | +if test -n "$ac_ct_DLLTOOL"; then | ||
7396 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 | ||
7397 | +$as_echo "$ac_ct_DLLTOOL" >&6; } | ||
7398 | +else | ||
7399 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
7400 | +$as_echo "no" >&6; } | ||
7401 | +fi | ||
7402 | + | ||
7403 | + if test "x$ac_ct_DLLTOOL" = x; then | ||
7404 | + DLLTOOL="false" | ||
7405 | + else | ||
7406 | + case $cross_compiling:$ac_tool_warned in | ||
7407 | +yes:) | ||
7408 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
7409 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
7410 | +ac_tool_warned=yes ;; | ||
7411 | +esac | ||
7412 | + DLLTOOL=$ac_ct_DLLTOOL | ||
7413 | + fi | ||
7414 | +else | ||
7415 | + DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
7416 | +fi | ||
7417 | + | ||
7418 | +test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
7419 | + | ||
7420 | + | ||
7421 | + | ||
7422 | + | ||
7423 | + | ||
7424 | + | ||
7425 | + | ||
7426 | + | ||
7427 | + | ||
7428 | + | ||
7429 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 | ||
7430 | +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } | ||
7431 | +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : | ||
7432 | + $as_echo_n "(cached) " >&6 | ||
7433 | +else | ||
7434 | + lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
7435 | + | ||
7436 | +case $host_os in | ||
7437 | +cygwin* | mingw* | pw32* | cegcc*) | ||
7438 | + # two different shell functions defined in ltmain.sh | ||
7439 | + # decide which to use based on capabilities of $DLLTOOL | ||
7440 | + case `$DLLTOOL --help 2>&1` in | ||
7441 | + *--identify-strict*) | ||
7442 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
7443 | + ;; | ||
7444 | + *) | ||
7445 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
7446 | + ;; | ||
7447 | + esac | ||
7448 | + ;; | ||
7449 | +*) | ||
7450 | + # fallback: assume linklib IS sharedlib | ||
7451 | + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
7452 | + ;; | ||
7453 | +esac | ||
7454 | + | ||
7455 | +fi | ||
7456 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 | ||
7457 | +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } | ||
7458 | +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
7459 | +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
7460 | + | ||
7461 | + | ||
7462 | + | ||
7463 | + | ||
7464 | + | ||
7465 | + | ||
7466 | + | ||
7467 | +if test -n "$ac_tool_prefix"; then | ||
7468 | + for ac_prog in ar | ||
7469 | + do | ||
7470 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
7471 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
7472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
7473 | $as_echo_n "checking for $ac_word... " >&6; } | ||
7474 | if test "${ac_cv_prog_AR+set}" = set; then : | ||
7475 | @@ -6534,7 +6788,7 @@ | ||
7476 | test -z "$as_dir" && as_dir=. | ||
7477 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
7478 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
7479 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
7480 | + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | ||
7481 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
7482 | break 2 | ||
7483 | fi | ||
7484 | @@ -6554,11 +6808,15 @@ | ||
7485 | fi | ||
7486 | |||
7487 | |||
7488 | + test -n "$AR" && break | ||
7489 | + done | ||
7490 | fi | ||
7491 | -if test -z "$ac_cv_prog_AR"; then | ||
7492 | +if test -z "$AR"; then | ||
7493 | ac_ct_AR=$AR | ||
7494 | - # Extract the first word of "ar", so it can be a program name with args. | ||
7495 | -set dummy ar; ac_word=$2 | ||
7496 | + for ac_prog in ar | ||
7497 | +do | ||
7498 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
7499 | +set dummy $ac_prog; ac_word=$2 | ||
7500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
7501 | $as_echo_n "checking for $ac_word... " >&6; } | ||
7502 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | ||
7503 | @@ -6574,7 +6832,7 @@ | ||
7504 | test -z "$as_dir" && as_dir=. | ||
7505 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
7506 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
7507 | - ac_cv_prog_ac_ct_AR="ar" | ||
7508 | + ac_cv_prog_ac_ct_AR="$ac_prog" | ||
7509 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
7510 | break 2 | ||
7511 | fi | ||
7512 | @@ -6593,6 +6851,10 @@ | ||
7513 | $as_echo "no" >&6; } | ||
7514 | fi | ||
7515 | |||
7516 | + | ||
7517 | + test -n "$ac_ct_AR" && break | ||
7518 | +done | ||
7519 | + | ||
7520 | if test "x$ac_ct_AR" = x; then | ||
7521 | AR="false" | ||
7522 | else | ||
7523 | @@ -6604,16 +6866,72 @@ | ||
7524 | esac | ||
7525 | AR=$ac_ct_AR | ||
7526 | fi | ||
7527 | -else | ||
7528 | - AR="$ac_cv_prog_AR" | ||
7529 | fi | ||
7530 | |||
7531 | -test -z "$AR" && AR=ar | ||
7532 | -test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
7533 | +: ${AR=ar} | ||
7534 | +: ${AR_FLAGS=cru} | ||
7535 | + | ||
7536 | + | ||
7537 | + | ||
7538 | + | ||
7539 | + | ||
7540 | + | ||
7541 | + | ||
7542 | + | ||
7543 | + | ||
7544 | + | ||
7545 | |||
7546 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 | ||
7547 | +$as_echo_n "checking for archiver @FILE support... " >&6; } | ||
7548 | +if test "${lt_cv_ar_at_file+set}" = set; then : | ||
7549 | + $as_echo_n "(cached) " >&6 | ||
7550 | +else | ||
7551 | + lt_cv_ar_at_file=no | ||
7552 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
7553 | +/* end confdefs.h. */ | ||
7554 | |||
7555 | +int | ||
7556 | +main () | ||
7557 | +{ | ||
7558 | |||
7559 | + ; | ||
7560 | + return 0; | ||
7561 | +} | ||
7562 | +_ACEOF | ||
7563 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
7564 | + echo conftest.$ac_objext > conftest.lst | ||
7565 | + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' | ||
7566 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
7567 | + (eval $lt_ar_try) 2>&5 | ||
7568 | + ac_status=$? | ||
7569 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
7570 | + test $ac_status = 0; } | ||
7571 | + if test "$ac_status" -eq 0; then | ||
7572 | + # Ensure the archiver fails upon bogus file names. | ||
7573 | + rm -f conftest.$ac_objext libconftest.a | ||
7574 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
7575 | + (eval $lt_ar_try) 2>&5 | ||
7576 | + ac_status=$? | ||
7577 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
7578 | + test $ac_status = 0; } | ||
7579 | + if test "$ac_status" -ne 0; then | ||
7580 | + lt_cv_ar_at_file=@ | ||
7581 | + fi | ||
7582 | + fi | ||
7583 | + rm -f conftest.* libconftest.a | ||
7584 | |||
7585 | +fi | ||
7586 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
7587 | + | ||
7588 | +fi | ||
7589 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 | ||
7590 | +$as_echo "$lt_cv_ar_at_file" >&6; } | ||
7591 | + | ||
7592 | +if test "x$lt_cv_ar_at_file" = xno; then | ||
7593 | + archiver_list_spec= | ||
7594 | +else | ||
7595 | + archiver_list_spec=$lt_cv_ar_at_file | ||
7596 | +fi | ||
7597 | |||
7598 | |||
7599 | |||
7600 | @@ -6955,8 +7273,8 @@ | ||
7601 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
7602 | |||
7603 | # Transform an extracted symbol line into symbol name and symbol address | ||
7604 | -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
7605 | -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'" | ||
7606 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
7607 | +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'" | ||
7608 | |||
7609 | # Handle CRLF in mingw tool chain | ||
7610 | opt_cr= | ||
7611 | @@ -6992,6 +7310,7 @@ | ||
7612 | else | ||
7613 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
7614 | fi | ||
7615 | + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
7616 | |||
7617 | # Check to see that the pipe works correctly. | ||
7618 | pipe_works=no | ||
7619 | @@ -7033,6 +7352,18 @@ | ||
7620 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
7621 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
7622 | cat <<_LT_EOF > conftest.$ac_ext | ||
7623 | +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
7624 | +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
7625 | +/* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
7626 | + relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
7627 | +# define LT_DLSYM_CONST | ||
7628 | +#elif defined(__osf__) | ||
7629 | +/* This system does not cope well with relocations in const data. */ | ||
7630 | +# define LT_DLSYM_CONST | ||
7631 | +#else | ||
7632 | +# define LT_DLSYM_CONST const | ||
7633 | +#endif | ||
7634 | + | ||
7635 | #ifdef __cplusplus | ||
7636 | extern "C" { | ||
7637 | #endif | ||
7638 | @@ -7044,7 +7375,7 @@ | ||
7639 | cat <<_LT_EOF >> conftest.$ac_ext | ||
7640 | |||
7641 | /* The mapping between symbol names and symbols. */ | ||
7642 | -const struct { | ||
7643 | +LT_DLSYM_CONST struct { | ||
7644 | const char *name; | ||
7645 | void *address; | ||
7646 | } | ||
7647 | @@ -7070,8 +7401,8 @@ | ||
7648 | _LT_EOF | ||
7649 | # Now try linking the two files. | ||
7650 | mv conftest.$ac_objext conftstm.$ac_objext | ||
7651 | - lt_save_LIBS="$LIBS" | ||
7652 | - lt_save_CFLAGS="$CFLAGS" | ||
7653 | + lt_globsym_save_LIBS=$LIBS | ||
7654 | + lt_globsym_save_CFLAGS=$CFLAGS | ||
7655 | LIBS="conftstm.$ac_objext" | ||
7656 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
7657 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | ||
7658 | @@ -7081,8 +7412,8 @@ | ||
7659 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | ||
7660 | pipe_works=yes | ||
7661 | fi | ||
7662 | - LIBS="$lt_save_LIBS" | ||
7663 | - CFLAGS="$lt_save_CFLAGS" | ||
7664 | + LIBS=$lt_globsym_save_LIBS | ||
7665 | + CFLAGS=$lt_globsym_save_CFLAGS | ||
7666 | else | ||
7667 | echo "cannot find nm_test_func in $nlist" >&5 | ||
7668 | fi | ||
7669 | @@ -7119,6 +7450,20 @@ | ||
7670 | $as_echo "ok" >&6; } | ||
7671 | fi | ||
7672 | |||
7673 | +# Response file support. | ||
7674 | +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
7675 | + nm_file_list_spec='@' | ||
7676 | +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then | ||
7677 | + nm_file_list_spec='@' | ||
7678 | +fi | ||
7679 | + | ||
7680 | + | ||
7681 | + | ||
7682 | + | ||
7683 | + | ||
7684 | + | ||
7685 | + | ||
7686 | + | ||
7687 | |||
7688 | |||
7689 | |||
7690 | @@ -7138,6 +7483,41 @@ | ||
7691 | |||
7692 | |||
7693 | |||
7694 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 | ||
7695 | +$as_echo_n "checking for sysroot... " >&6; } | ||
7696 | + | ||
7697 | +# Check whether --with-libtool-sysroot was given. | ||
7698 | +if test "${with_libtool_sysroot+set}" = set; then : | ||
7699 | + withval=$with_libtool_sysroot; | ||
7700 | +else | ||
7701 | + with_libtool_sysroot=no | ||
7702 | +fi | ||
7703 | + | ||
7704 | + | ||
7705 | +lt_sysroot= | ||
7706 | +case ${with_libtool_sysroot} in #( | ||
7707 | + yes) | ||
7708 | + if test "$GCC" = yes; then | ||
7709 | + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
7710 | + fi | ||
7711 | + ;; #( | ||
7712 | + /*) | ||
7713 | + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
7714 | + ;; #( | ||
7715 | + no|'') | ||
7716 | + ;; #( | ||
7717 | + *) | ||
7718 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 | ||
7719 | +$as_echo "${with_libtool_sysroot}" >&6; } | ||
7720 | + as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 | ||
7721 | + ;; | ||
7722 | +esac | ||
7723 | + | ||
7724 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 | ||
7725 | +$as_echo "${lt_sysroot:-no}" >&6; } | ||
7726 | + | ||
7727 | + | ||
7728 | + | ||
7729 | |||
7730 | |||
7731 | # Check whether --enable-libtool-lock was given. | ||
7732 | @@ -7346,6 +7726,123 @@ | ||
7733 | |||
7734 | need_locks="$enable_libtool_lock" | ||
7735 | |||
7736 | +if test -n "$ac_tool_prefix"; then | ||
7737 | + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. | ||
7738 | +set dummy ${ac_tool_prefix}mt; ac_word=$2 | ||
7739 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
7740 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
7741 | +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : | ||
7742 | + $as_echo_n "(cached) " >&6 | ||
7743 | +else | ||
7744 | + if test -n "$MANIFEST_TOOL"; then | ||
7745 | + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. | ||
7746 | +else | ||
7747 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
7748 | +for as_dir in $PATH | ||
7749 | +do | ||
7750 | + IFS=$as_save_IFS | ||
7751 | + test -z "$as_dir" && as_dir=. | ||
7752 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
7753 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
7754 | + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" | ||
7755 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
7756 | + break 2 | ||
7757 | + fi | ||
7758 | +done | ||
7759 | + done | ||
7760 | +IFS=$as_save_IFS | ||
7761 | + | ||
7762 | +fi | ||
7763 | +fi | ||
7764 | +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL | ||
7765 | +if test -n "$MANIFEST_TOOL"; then | ||
7766 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 | ||
7767 | +$as_echo "$MANIFEST_TOOL" >&6; } | ||
7768 | +else | ||
7769 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
7770 | +$as_echo "no" >&6; } | ||
7771 | +fi | ||
7772 | + | ||
7773 | + | ||
7774 | +fi | ||
7775 | +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then | ||
7776 | + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL | ||
7777 | + # Extract the first word of "mt", so it can be a program name with args. | ||
7778 | +set dummy mt; ac_word=$2 | ||
7779 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
7780 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
7781 | +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : | ||
7782 | + $as_echo_n "(cached) " >&6 | ||
7783 | +else | ||
7784 | + if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
7785 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. | ||
7786 | +else | ||
7787 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
7788 | +for as_dir in $PATH | ||
7789 | +do | ||
7790 | + IFS=$as_save_IFS | ||
7791 | + test -z "$as_dir" && as_dir=. | ||
7792 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
7793 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
7794 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" | ||
7795 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
7796 | + break 2 | ||
7797 | + fi | ||
7798 | +done | ||
7799 | + done | ||
7800 | +IFS=$as_save_IFS | ||
7801 | + | ||
7802 | +fi | ||
7803 | +fi | ||
7804 | +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL | ||
7805 | +if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
7806 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 | ||
7807 | +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } | ||
7808 | +else | ||
7809 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
7810 | +$as_echo "no" >&6; } | ||
7811 | +fi | ||
7812 | + | ||
7813 | + if test "x$ac_ct_MANIFEST_TOOL" = x; then | ||
7814 | + MANIFEST_TOOL=":" | ||
7815 | + else | ||
7816 | + case $cross_compiling:$ac_tool_warned in | ||
7817 | +yes:) | ||
7818 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
7819 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
7820 | +ac_tool_warned=yes ;; | ||
7821 | +esac | ||
7822 | + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL | ||
7823 | + fi | ||
7824 | +else | ||
7825 | + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" | ||
7826 | +fi | ||
7827 | + | ||
7828 | +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
7829 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 | ||
7830 | +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } | ||
7831 | +if test "${lt_cv_path_mainfest_tool+set}" = set; then : | ||
7832 | + $as_echo_n "(cached) " >&6 | ||
7833 | +else | ||
7834 | + lt_cv_path_mainfest_tool=no | ||
7835 | + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 | ||
7836 | + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
7837 | + cat conftest.err >&5 | ||
7838 | + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
7839 | + lt_cv_path_mainfest_tool=yes | ||
7840 | + fi | ||
7841 | + rm -f conftest* | ||
7842 | +fi | ||
7843 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 | ||
7844 | +$as_echo "$lt_cv_path_mainfest_tool" >&6; } | ||
7845 | +if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
7846 | + MANIFEST_TOOL=: | ||
7847 | +fi | ||
7848 | + | ||
7849 | + | ||
7850 | + | ||
7851 | + | ||
7852 | + | ||
7853 | |||
7854 | case $host_os in | ||
7855 | rhapsody* | darwin*) | ||
7856 | @@ -7909,6 +8406,8 @@ | ||
7857 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | ||
7858 | echo "$AR cru libconftest.a conftest.o" >&5 | ||
7859 | $AR cru libconftest.a conftest.o 2>&5 | ||
7860 | + echo "$RANLIB libconftest.a" >&5 | ||
7861 | + $RANLIB libconftest.a 2>&5 | ||
7862 | cat > conftest.c << _LT_EOF | ||
7863 | int main() { return 0;} | ||
7864 | _LT_EOF | ||
7865 | @@ -8073,7 +8572,8 @@ | ||
7866 | LIBTOOL_DEPS="$ltmain" | ||
7867 | |||
7868 | # Always use our own libtool. | ||
7869 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
7870 | +LIBTOOL='$(SHELL) $(top_builddir)' | ||
7871 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | ||
7872 | |||
7873 | |||
7874 | |||
7875 | @@ -8162,7 +8662,7 @@ | ||
7876 | esac | ||
7877 | |||
7878 | # Global variables: | ||
7879 | -ofile=libtool | ||
7880 | +ofile=${host_alias}-libtool | ||
7881 | can_build_shared=yes | ||
7882 | |||
7883 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
7884 | @@ -8460,8 +8960,6 @@ | ||
7885 | lt_prog_compiler_pic= | ||
7886 | lt_prog_compiler_static= | ||
7887 | |||
7888 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
7889 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
7890 | |||
7891 | if test "$GCC" = yes; then | ||
7892 | lt_prog_compiler_wl='-Wl,' | ||
7893 | @@ -8627,6 +9125,12 @@ | ||
7894 | lt_prog_compiler_pic='--shared' | ||
7895 | lt_prog_compiler_static='--static' | ||
7896 | ;; | ||
7897 | + nagfor*) | ||
7898 | + # NAG Fortran compiler | ||
7899 | + lt_prog_compiler_wl='-Wl,-Wl,,' | ||
7900 | + lt_prog_compiler_pic='-PIC' | ||
7901 | + lt_prog_compiler_static='-Bstatic' | ||
7902 | + ;; | ||
7903 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
7904 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
7905 | # which looks to be a dead project) | ||
7906 | @@ -8689,7 +9193,7 @@ | ||
7907 | lt_prog_compiler_pic='-KPIC' | ||
7908 | lt_prog_compiler_static='-Bstatic' | ||
7909 | case $cc_basename in | ||
7910 | - f77* | f90* | f95*) | ||
7911 | + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
7912 | lt_prog_compiler_wl='-Qoption ld ';; | ||
7913 | *) | ||
7914 | lt_prog_compiler_wl='-Wl,';; | ||
7915 | @@ -8746,13 +9250,17 @@ | ||
7916 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
7917 | ;; | ||
7918 | esac | ||
7919 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 | ||
7920 | -$as_echo "$lt_prog_compiler_pic" >&6; } | ||
7921 | - | ||
7922 | - | ||
7923 | - | ||
7924 | - | ||
7925 | |||
7926 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
7927 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
7928 | +if test "${lt_cv_prog_compiler_pic+set}" = set; then : | ||
7929 | + $as_echo_n "(cached) " >&6 | ||
7930 | +else | ||
7931 | + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic | ||
7932 | +fi | ||
7933 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 | ||
7934 | +$as_echo "$lt_cv_prog_compiler_pic" >&6; } | ||
7935 | +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic | ||
7936 | |||
7937 | # | ||
7938 | # Check to make sure the PIC flag actually works. | ||
7939 | @@ -8813,6 +9321,11 @@ | ||
7940 | |||
7941 | |||
7942 | |||
7943 | + | ||
7944 | + | ||
7945 | + | ||
7946 | + | ||
7947 | + | ||
7948 | # | ||
7949 | # Check to make sure the static flag actually works. | ||
7950 | # | ||
7951 | @@ -9163,7 +9676,8 @@ | ||
7952 | allow_undefined_flag=unsupported | ||
7953 | always_export_symbols=no | ||
7954 | enable_shared_with_static_runtimes=yes | ||
7955 | - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
7956 | + 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' | ||
7957 | + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
7958 | |||
7959 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
7960 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
7961 | @@ -9211,7 +9725,7 @@ | ||
7962 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
7963 | && test "$tmp_diet" = no | ||
7964 | then | ||
7965 | - tmp_addflag= | ||
7966 | + tmp_addflag=' $pic_flag' | ||
7967 | tmp_sharedflag='-shared' | ||
7968 | case $cc_basename,$host_cpu in | ||
7969 | pgcc*) # Portland Group C compiler | ||
7970 | @@ -9262,12 +9776,12 @@ | ||
7971 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | ||
7972 | hardcode_libdir_flag_spec= | ||
7973 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
7974 | - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | ||
7975 | + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
7976 | if test "x$supports_anon_versioning" = xyes; then | ||
7977 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | ||
7978 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
7979 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
7980 | - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
7981 | + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
7982 | fi | ||
7983 | ;; | ||
7984 | esac | ||
7985 | @@ -9281,8 +9795,8 @@ | ||
7986 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
7987 | wlarc= | ||
7988 | else | ||
7989 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7990 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
7991 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7992 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
7993 | fi | ||
7994 | ;; | ||
7995 | |||
7996 | @@ -9300,8 +9814,8 @@ | ||
7997 | |||
7998 | _LT_EOF | ||
7999 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
8000 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
8001 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
8002 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
8003 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
8004 | else | ||
8005 | ld_shlibs=no | ||
8006 | fi | ||
8007 | @@ -9347,8 +9861,8 @@ | ||
8008 | |||
8009 | *) | ||
8010 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
8011 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
8012 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
8013 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
8014 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
8015 | else | ||
8016 | ld_shlibs=no | ||
8017 | fi | ||
8018 | @@ -9478,7 +9992,13 @@ | ||
8019 | allow_undefined_flag='-berok' | ||
8020 | # Determine the default libpath from the value encoded in an | ||
8021 | # empty executable. | ||
8022 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
8023 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
8024 | + aix_libpath=$lt_cv_aix_libpath | ||
8025 | +else | ||
8026 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
8027 | + $as_echo_n "(cached) " >&6 | ||
8028 | +else | ||
8029 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
8030 | /* end confdefs.h. */ | ||
8031 | |||
8032 | int | ||
8033 | @@ -9491,22 +10011,29 @@ | ||
8034 | _ACEOF | ||
8035 | if ac_fn_c_try_link "$LINENO"; then : | ||
8036 | |||
8037 | -lt_aix_libpath_sed=' | ||
8038 | - /Import File Strings/,/^$/ { | ||
8039 | - /^0/ { | ||
8040 | - s/^0 *\(.*\)$/\1/ | ||
8041 | - p | ||
8042 | - } | ||
8043 | - }' | ||
8044 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8045 | -# Check for a 64-bit object if we didn't find anything. | ||
8046 | -if test -z "$aix_libpath"; then | ||
8047 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8048 | -fi | ||
8049 | + lt_aix_libpath_sed=' | ||
8050 | + /Import File Strings/,/^$/ { | ||
8051 | + /^0/ { | ||
8052 | + s/^0 *\([^ ]*\) *$/\1/ | ||
8053 | + p | ||
8054 | + } | ||
8055 | + }' | ||
8056 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8057 | + # Check for a 64-bit object if we didn't find anything. | ||
8058 | + if test -z "$lt_cv_aix_libpath_"; then | ||
8059 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8060 | + fi | ||
8061 | fi | ||
8062 | rm -f core conftest.err conftest.$ac_objext \ | ||
8063 | conftest$ac_exeext conftest.$ac_ext | ||
8064 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
8065 | + if test -z "$lt_cv_aix_libpath_"; then | ||
8066 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
8067 | + fi | ||
8068 | + | ||
8069 | +fi | ||
8070 | + | ||
8071 | + aix_libpath=$lt_cv_aix_libpath_ | ||
8072 | +fi | ||
8073 | |||
8074 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
8075 | 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" | ||
8076 | @@ -9518,7 +10045,13 @@ | ||
8077 | else | ||
8078 | # Determine the default libpath from the value encoded in an | ||
8079 | # empty executable. | ||
8080 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
8081 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
8082 | + aix_libpath=$lt_cv_aix_libpath | ||
8083 | +else | ||
8084 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
8085 | + $as_echo_n "(cached) " >&6 | ||
8086 | +else | ||
8087 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
8088 | /* end confdefs.h. */ | ||
8089 | |||
8090 | int | ||
8091 | @@ -9531,22 +10064,29 @@ | ||
8092 | _ACEOF | ||
8093 | if ac_fn_c_try_link "$LINENO"; then : | ||
8094 | |||
8095 | -lt_aix_libpath_sed=' | ||
8096 | - /Import File Strings/,/^$/ { | ||
8097 | - /^0/ { | ||
8098 | - s/^0 *\(.*\)$/\1/ | ||
8099 | - p | ||
8100 | - } | ||
8101 | - }' | ||
8102 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8103 | -# Check for a 64-bit object if we didn't find anything. | ||
8104 | -if test -z "$aix_libpath"; then | ||
8105 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8106 | -fi | ||
8107 | + lt_aix_libpath_sed=' | ||
8108 | + /Import File Strings/,/^$/ { | ||
8109 | + /^0/ { | ||
8110 | + s/^0 *\([^ ]*\) *$/\1/ | ||
8111 | + p | ||
8112 | + } | ||
8113 | + }' | ||
8114 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8115 | + # Check for a 64-bit object if we didn't find anything. | ||
8116 | + if test -z "$lt_cv_aix_libpath_"; then | ||
8117 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
8118 | + fi | ||
8119 | fi | ||
8120 | rm -f core conftest.err conftest.$ac_objext \ | ||
8121 | conftest$ac_exeext conftest.$ac_ext | ||
8122 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
8123 | + if test -z "$lt_cv_aix_libpath_"; then | ||
8124 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
8125 | + fi | ||
8126 | + | ||
8127 | +fi | ||
8128 | + | ||
8129 | + aix_libpath=$lt_cv_aix_libpath_ | ||
8130 | +fi | ||
8131 | |||
8132 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
8133 | # Warning - without using the other run time loading flags, | ||
8134 | @@ -9591,20 +10131,63 @@ | ||
8135 | # Microsoft Visual C++. | ||
8136 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
8137 | # no search path for DLLs. | ||
8138 | - hardcode_libdir_flag_spec=' ' | ||
8139 | - allow_undefined_flag=unsupported | ||
8140 | - # Tell ltmain to make .lib files, not .a files. | ||
8141 | - libext=lib | ||
8142 | - # Tell ltmain to make .dll files, not .so files. | ||
8143 | - shrext_cmds=".dll" | ||
8144 | - # FIXME: Setting linknames here is a bad hack. | ||
8145 | - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
8146 | - # The linker will automatically build a .lib file if we build a DLL. | ||
8147 | - old_archive_from_new_cmds='true' | ||
8148 | - # FIXME: Should let the user specify the lib program. | ||
8149 | - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
8150 | - fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
8151 | - enable_shared_with_static_runtimes=yes | ||
8152 | + case $cc_basename in | ||
8153 | + cl*) | ||
8154 | + # Native MSVC | ||
8155 | + hardcode_libdir_flag_spec=' ' | ||
8156 | + allow_undefined_flag=unsupported | ||
8157 | + always_export_symbols=yes | ||
8158 | + file_list_spec='@' | ||
8159 | + # Tell ltmain to make .lib files, not .a files. | ||
8160 | + libext=lib | ||
8161 | + # Tell ltmain to make .dll files, not .so files. | ||
8162 | + shrext_cmds=".dll" | ||
8163 | + # FIXME: Setting linknames here is a bad hack. | ||
8164 | + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
8165 | + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
8166 | + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
8167 | + else | ||
8168 | + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
8169 | + fi~ | ||
8170 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
8171 | + linknames=' | ||
8172 | + # The linker will not automatically build a static lib if we build a DLL. | ||
8173 | + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' | ||
8174 | + enable_shared_with_static_runtimes=yes | ||
8175 | + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
8176 | + # Don't use ranlib | ||
8177 | + old_postinstall_cmds='chmod 644 $oldlib' | ||
8178 | + postlink_cmds='lt_outputfile="@OUTPUT@"~ | ||
8179 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
8180 | + case $lt_outputfile in | ||
8181 | + *.exe|*.EXE) ;; | ||
8182 | + *) | ||
8183 | + lt_outputfile="$lt_outputfile.exe" | ||
8184 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
8185 | + ;; | ||
8186 | + esac~ | ||
8187 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
8188 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
8189 | + $RM "$lt_outputfile.manifest"; | ||
8190 | + fi' | ||
8191 | + ;; | ||
8192 | + *) | ||
8193 | + # Assume MSVC wrapper | ||
8194 | + hardcode_libdir_flag_spec=' ' | ||
8195 | + allow_undefined_flag=unsupported | ||
8196 | + # Tell ltmain to make .lib files, not .a files. | ||
8197 | + libext=lib | ||
8198 | + # Tell ltmain to make .dll files, not .so files. | ||
8199 | + shrext_cmds=".dll" | ||
8200 | + # FIXME: Setting linknames here is a bad hack. | ||
8201 | + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
8202 | + # The linker will automatically build a .lib file if we build a DLL. | ||
8203 | + old_archive_from_new_cmds='true' | ||
8204 | + # FIXME: Should let the user specify the lib program. | ||
8205 | + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
8206 | + enable_shared_with_static_runtimes=yes | ||
8207 | + ;; | ||
8208 | + esac | ||
8209 | ;; | ||
8210 | |||
8211 | darwin* | rhapsody*) | ||
8212 | @@ -9665,7 +10248,7 @@ | ||
8213 | |||
8214 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
8215 | freebsd* | dragonfly*) | ||
8216 | - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
8217 | + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
8218 | hardcode_libdir_flag_spec='-R$libdir' | ||
8219 | hardcode_direct=yes | ||
8220 | hardcode_shlibpath_var=no | ||
8221 | @@ -9673,7 +10256,7 @@ | ||
8222 | |||
8223 | hpux9*) | ||
8224 | if test "$GCC" = yes; then | ||
8225 | - 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' | ||
8226 | + 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' | ||
8227 | else | ||
8228 | 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' | ||
8229 | fi | ||
8230 | @@ -9689,7 +10272,7 @@ | ||
8231 | |||
8232 | hpux10*) | ||
8233 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
8234 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
8235 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
8236 | else | ||
8237 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
8238 | fi | ||
8239 | @@ -9713,10 +10296,10 @@ | ||
8240 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
8241 | ;; | ||
8242 | ia64*) | ||
8243 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
8244 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
8245 | ;; | ||
8246 | *) | ||
8247 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
8248 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
8249 | ;; | ||
8250 | esac | ||
8251 | else | ||
8252 | @@ -9795,23 +10378,36 @@ | ||
8253 | |||
8254 | irix5* | irix6* | nonstopux*) | ||
8255 | if test "$GCC" = yes; then | ||
8256 | - 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' | ||
8257 | + 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' | ||
8258 | # Try to use the -exported_symbol ld option, if it does not | ||
8259 | # work, assume that -exports_file does not work either and | ||
8260 | # implicitly export all symbols. | ||
8261 | - save_LDFLAGS="$LDFLAGS" | ||
8262 | - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
8263 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
8264 | + # This should be the same for all languages, so no per-tag cache variable. | ||
8265 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 | ||
8266 | +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } | ||
8267 | +if test "${lt_cv_irix_exported_symbol+set}" = set; then : | ||
8268 | + $as_echo_n "(cached) " >&6 | ||
8269 | +else | ||
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 | /* end confdefs.h. */ | ||
8274 | -int foo(void) {} | ||
8275 | +int foo (void) { return 0; } | ||
8276 | _ACEOF | ||
8277 | if ac_fn_c_try_link "$LINENO"; then : | ||
8278 | - 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' | ||
8279 | - | ||
8280 | + lt_cv_irix_exported_symbol=yes | ||
8281 | +else | ||
8282 | + lt_cv_irix_exported_symbol=no | ||
8283 | fi | ||
8284 | rm -f core conftest.err conftest.$ac_objext \ | ||
8285 | conftest$ac_exeext conftest.$ac_ext | ||
8286 | - LDFLAGS="$save_LDFLAGS" | ||
8287 | + LDFLAGS="$save_LDFLAGS" | ||
8288 | +fi | ||
8289 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 | ||
8290 | +$as_echo "$lt_cv_irix_exported_symbol" >&6; } | ||
8291 | + if test "$lt_cv_irix_exported_symbol" = yes; then | ||
8292 | + 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' | ||
8293 | + fi | ||
8294 | else | ||
8295 | 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' | ||
8296 | 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' | ||
8297 | @@ -9896,7 +10492,7 @@ | ||
8298 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
8299 | if test "$GCC" = yes; then | ||
8300 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
8301 | - 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' | ||
8302 | + 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' | ||
8303 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
8304 | else | ||
8305 | allow_undefined_flag=' -expect_unresolved \*' | ||
8306 | @@ -9915,9 +10511,9 @@ | ||
8307 | no_undefined_flag=' -z defs' | ||
8308 | if test "$GCC" = yes; then | ||
8309 | wlarc='${wl}' | ||
8310 | - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
8311 | + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
8312 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
8313 | - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
8314 | + $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' | ||
8315 | else | ||
8316 | case `$CC -V 2>&1` in | ||
8317 | *"Compilers 5.0"*) | ||
8318 | @@ -10493,8 +11089,9 @@ | ||
8319 | need_version=no | ||
8320 | need_lib_prefix=no | ||
8321 | |||
8322 | - case $GCC,$host_os in | ||
8323 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
8324 | + case $GCC,$cc_basename in | ||
8325 | + yes,*) | ||
8326 | + # gcc | ||
8327 | library_names_spec='$libname.dll.a' | ||
8328 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
8329 | postinstall_cmds='base_file=`basename \${file}`~ | ||
8330 | @@ -10527,13 +11124,71 @@ | ||
8331 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
8332 | ;; | ||
8333 | esac | ||
8334 | + dynamic_linker='Win32 ld.exe' | ||
8335 | + ;; | ||
8336 | + | ||
8337 | + *,cl*) | ||
8338 | + # Native MSVC | ||
8339 | + libname_spec='$name' | ||
8340 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
8341 | + library_names_spec='${libname}.dll.lib' | ||
8342 | + | ||
8343 | + case $build_os in | ||
8344 | + mingw*) | ||
8345 | + sys_lib_search_path_spec= | ||
8346 | + lt_save_ifs=$IFS | ||
8347 | + IFS=';' | ||
8348 | + for lt_path in $LIB | ||
8349 | + do | ||
8350 | + IFS=$lt_save_ifs | ||
8351 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
8352 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
8353 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
8354 | + done | ||
8355 | + IFS=$lt_save_ifs | ||
8356 | + # Convert to MSYS style. | ||
8357 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
8358 | + ;; | ||
8359 | + cygwin*) | ||
8360 | + # Convert to unix form, then to dos form, then back to unix form | ||
8361 | + # but this time dos style (no spaces!) so that the unix form looks | ||
8362 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
8363 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
8364 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
8365 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
8366 | + ;; | ||
8367 | + *) | ||
8368 | + sys_lib_search_path_spec="$LIB" | ||
8369 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
8370 | + # It is most probably a Windows format PATH. | ||
8371 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
8372 | + else | ||
8373 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
8374 | + fi | ||
8375 | + # FIXME: find the short name or the path components, as spaces are | ||
8376 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
8377 | + ;; | ||
8378 | + esac | ||
8379 | + | ||
8380 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
8381 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
8382 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
8383 | + dldir=$destdir/`dirname \$dlpath`~ | ||
8384 | + test -d \$dldir || mkdir -p \$dldir~ | ||
8385 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
8386 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
8387 | + dlpath=$dir/\$dldll~ | ||
8388 | + $RM \$dlpath' | ||
8389 | + shlibpath_overrides_runpath=yes | ||
8390 | + dynamic_linker='Win32 link.exe' | ||
8391 | ;; | ||
8392 | |||
8393 | *) | ||
8394 | + # Assume MSVC wrapper | ||
8395 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
8396 | + dynamic_linker='Win32 ld.exe' | ||
8397 | ;; | ||
8398 | esac | ||
8399 | - dynamic_linker='Win32 ld.exe' | ||
8400 | # FIXME: first we should search . and the directory the executable is in | ||
8401 | shlibpath_var=PATH | ||
8402 | ;; | ||
8403 | @@ -10625,7 +11280,7 @@ | ||
8404 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8405 | shlibpath_var=LIBRARY_PATH | ||
8406 | shlibpath_overrides_runpath=yes | ||
8407 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
8408 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
8409 | hardcode_into_libs=yes | ||
8410 | ;; | ||
8411 | |||
8412 | @@ -11465,10 +12120,10 @@ | ||
8413 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
8414 | correspondingly for the symbols needed. */ | ||
8415 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
8416 | -void fnord () __attribute__((visibility("default"))); | ||
8417 | +int fnord () __attribute__((visibility("default"))); | ||
8418 | #endif | ||
8419 | |||
8420 | -void fnord () { int i=42; } | ||
8421 | +int fnord () { return 42; } | ||
8422 | int main () | ||
8423 | { | ||
8424 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
8425 | @@ -11571,10 +12226,10 @@ | ||
8426 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
8427 | correspondingly for the symbols needed. */ | ||
8428 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
8429 | -void fnord () __attribute__((visibility("default"))); | ||
8430 | +int fnord () __attribute__((visibility("default"))); | ||
8431 | #endif | ||
8432 | |||
8433 | -void fnord () { int i=42; } | ||
8434 | +int fnord () { return 42; } | ||
8435 | int main () | ||
8436 | { | ||
8437 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
8438 | @@ -15079,7 +15734,7 @@ | ||
8439 | if test "$enable_shared" = "yes"; then | ||
8440 | x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` | ||
8441 | if test -n "$x"; then | ||
8442 | - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" | ||
8443 | + SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" | ||
8444 | fi | ||
8445 | |||
8446 | # More hacks to build DLLs on Windows. | ||
8447 | @@ -16694,13 +17349,20 @@ | ||
8448 | lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' | ||
8449 | lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' | ||
8450 | lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' | ||
8451 | +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
8452 | +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
8453 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' | ||
8454 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' | ||
8455 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' | ||
8456 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' | ||
8457 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' | ||
8458 | +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' | ||
8459 | +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' | ||
8460 | +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' | ||
8461 | +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' | ||
8462 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' | ||
8463 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' | ||
8464 | +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' | ||
8465 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' | ||
8466 | RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' | ||
8467 | old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' | ||
8468 | @@ -16715,14 +17377,17 @@ | ||
8469 | lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' | ||
8470 | lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' | ||
8471 | 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"`' | ||
8472 | +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
8473 | +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' | ||
8474 | objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' | ||
8475 | MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' | ||
8476 | lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' | ||
8477 | -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
8478 | lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' | ||
8479 | +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
8480 | lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' | ||
8481 | lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' | ||
8482 | need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' | ||
8483 | +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' | ||
8484 | DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' | ||
8485 | NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' | ||
8486 | LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' | ||
8487 | @@ -16755,12 +17420,12 @@ | ||
8488 | hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' | ||
8489 | inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' | ||
8490 | link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' | ||
8491 | -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' | ||
8492 | always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' | ||
8493 | export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' | ||
8494 | exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' | ||
8495 | include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' | ||
8496 | prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' | ||
8497 | +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' | ||
8498 | file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
8499 | variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' | ||
8500 | need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' | ||
8501 | @@ -16815,8 +17480,13 @@ | ||
8502 | OBJDUMP \ | ||
8503 | deplibs_check_method \ | ||
8504 | file_magic_cmd \ | ||
8505 | +file_magic_glob \ | ||
8506 | +want_nocaseglob \ | ||
8507 | +DLLTOOL \ | ||
8508 | +sharedlib_from_linklib_cmd \ | ||
8509 | AR \ | ||
8510 | AR_FLAGS \ | ||
8511 | +archiver_list_spec \ | ||
8512 | STRIP \ | ||
8513 | RANLIB \ | ||
8514 | CC \ | ||
8515 | @@ -16826,12 +17496,14 @@ | ||
8516 | lt_cv_sys_global_symbol_to_cdecl \ | ||
8517 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
8518 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ | ||
8519 | +nm_file_list_spec \ | ||
8520 | lt_prog_compiler_no_builtin_flag \ | ||
8521 | -lt_prog_compiler_wl \ | ||
8522 | lt_prog_compiler_pic \ | ||
8523 | +lt_prog_compiler_wl \ | ||
8524 | lt_prog_compiler_static \ | ||
8525 | lt_cv_prog_compiler_c_o \ | ||
8526 | need_locks \ | ||
8527 | +MANIFEST_TOOL \ | ||
8528 | DSYMUTIL \ | ||
8529 | NMEDIT \ | ||
8530 | LIPO \ | ||
8531 | @@ -16847,7 +17519,6 @@ | ||
8532 | hardcode_libdir_flag_spec \ | ||
8533 | hardcode_libdir_flag_spec_ld \ | ||
8534 | hardcode_libdir_separator \ | ||
8535 | -fix_srcfile_path \ | ||
8536 | exclude_expsyms \ | ||
8537 | include_expsyms \ | ||
8538 | file_list_spec \ | ||
8539 | @@ -16883,6 +17554,7 @@ | ||
8540 | module_expsym_cmds \ | ||
8541 | export_symbols_cmds \ | ||
8542 | prelink_cmds \ | ||
8543 | +postlink_cmds \ | ||
8544 | postinstall_cmds \ | ||
8545 | postuninstall_cmds \ | ||
8546 | finish_cmds \ | ||
8547 | @@ -17662,7 +18334,8 @@ | ||
8548 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
8549 | # | ||
8550 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
8551 | -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
8552 | +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, | ||
8553 | +# Inc. | ||
8554 | # Written by Gordon Matzigkeit, 1996 | ||
8555 | # | ||
8556 | # This file is part of GNU Libtool. | ||
8557 | @@ -17765,19 +18438,42 @@ | ||
8558 | # turn newlines into spaces. | ||
8559 | NL2SP=$lt_lt_NL2SP | ||
8560 | |||
8561 | +# convert \$build file names to \$host format. | ||
8562 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
8563 | + | ||
8564 | +# convert \$build files to toolchain format. | ||
8565 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
8566 | + | ||
8567 | # An object symbol dumper. | ||
8568 | OBJDUMP=$lt_OBJDUMP | ||
8569 | |||
8570 | # Method to check whether dependent libraries are shared objects. | ||
8571 | deplibs_check_method=$lt_deplibs_check_method | ||
8572 | |||
8573 | -# Command to use when deplibs_check_method == "file_magic". | ||
8574 | +# Command to use when deplibs_check_method = "file_magic". | ||
8575 | file_magic_cmd=$lt_file_magic_cmd | ||
8576 | |||
8577 | +# How to find potential files when deplibs_check_method = "file_magic". | ||
8578 | +file_magic_glob=$lt_file_magic_glob | ||
8579 | + | ||
8580 | +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". | ||
8581 | +want_nocaseglob=$lt_want_nocaseglob | ||
8582 | + | ||
8583 | +# DLL creation program. | ||
8584 | +DLLTOOL=$lt_DLLTOOL | ||
8585 | + | ||
8586 | +# Command to associate shared and link libraries. | ||
8587 | +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd | ||
8588 | + | ||
8589 | # The archiver. | ||
8590 | AR=$lt_AR | ||
8591 | + | ||
8592 | +# Flags to create an archive. | ||
8593 | AR_FLAGS=$lt_AR_FLAGS | ||
8594 | |||
8595 | +# How to feed a file listing to the archiver. | ||
8596 | +archiver_list_spec=$lt_archiver_list_spec | ||
8597 | + | ||
8598 | # A symbol stripping program. | ||
8599 | STRIP=$lt_STRIP | ||
8600 | |||
8601 | @@ -17807,6 +18503,12 @@ | ||
8602 | # Transform the output of nm in a C name address pair when lib prefix is needed. | ||
8603 | global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix | ||
8604 | |||
8605 | +# Specify filename containing input files for \$NM. | ||
8606 | +nm_file_list_spec=$lt_nm_file_list_spec | ||
8607 | + | ||
8608 | +# The root where to search for dependent libraries,and in which our libraries should be installed. | ||
8609 | +lt_sysroot=$lt_sysroot | ||
8610 | + | ||
8611 | # The name of the directory that contains temporary libtool files. | ||
8612 | objdir=$objdir | ||
8613 | |||
8614 | @@ -17816,6 +18518,9 @@ | ||
8615 | # Must we lock files when doing compilation? | ||
8616 | need_locks=$lt_need_locks | ||
8617 | |||
8618 | +# Manifest tool. | ||
8619 | +MANIFEST_TOOL=$lt_MANIFEST_TOOL | ||
8620 | + | ||
8621 | # Tool to manipulate archived DWARF debug symbol files on Mac OS X. | ||
8622 | DSYMUTIL=$lt_DSYMUTIL | ||
8623 | |||
8624 | @@ -17930,12 +18635,12 @@ | ||
8625 | # Compiler flag to turn off builtin functions. | ||
8626 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
8627 | |||
8628 | -# How to pass a linker flag through the compiler. | ||
8629 | -wl=$lt_lt_prog_compiler_wl | ||
8630 | - | ||
8631 | # Additional compiler flags for building library objects. | ||
8632 | pic_flag=$lt_lt_prog_compiler_pic | ||
8633 | |||
8634 | +# How to pass a linker flag through the compiler. | ||
8635 | +wl=$lt_lt_prog_compiler_wl | ||
8636 | + | ||
8637 | # Compiler flag to prevent dynamic linking. | ||
8638 | link_static_flag=$lt_lt_prog_compiler_static | ||
8639 | |||
8640 | @@ -18022,9 +18727,6 @@ | ||
8641 | # Whether libtool must link a program against all its dependency libraries. | ||
8642 | link_all_deplibs=$link_all_deplibs | ||
8643 | |||
8644 | -# Fix the shell variable \$srcfile for the compiler. | ||
8645 | -fix_srcfile_path=$lt_fix_srcfile_path | ||
8646 | - | ||
8647 | # Set to "yes" if exported symbols are required. | ||
8648 | always_export_symbols=$always_export_symbols | ||
8649 | |||
8650 | @@ -18040,6 +18742,9 @@ | ||
8651 | # Commands necessary for linking programs (against libraries) with templates. | ||
8652 | prelink_cmds=$lt_prelink_cmds | ||
8653 | |||
8654 | +# Commands necessary for finishing linking programs. | ||
8655 | +postlink_cmds=$lt_postlink_cmds | ||
8656 | + | ||
8657 | # Specify filename containing input files. | ||
8658 | file_list_spec=$lt_file_list_spec | ||
8659 | |||
8660 | @@ -18072,210 +18777,169 @@ | ||
8661 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
8662 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
8663 | # is reportedly fixed, but why not run on old versions too? | ||
8664 | - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | ||
8665 | - || (rm -f "$cfgfile"; exit 1) | ||
8666 | - | ||
8667 | - case $xsi_shell in | ||
8668 | - yes) | ||
8669 | - cat << \_LT_EOF >> "$cfgfile" | ||
8670 | - | ||
8671 | -# func_dirname file append nondir_replacement | ||
8672 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
8673 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
8674 | -func_dirname () | ||
8675 | -{ | ||
8676 | - case ${1} in | ||
8677 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
8678 | - * ) func_dirname_result="${3}" ;; | ||
8679 | - esac | ||
8680 | -} | ||
8681 | - | ||
8682 | -# func_basename file | ||
8683 | -func_basename () | ||
8684 | -{ | ||
8685 | - func_basename_result="${1##*/}" | ||
8686 | -} | ||
8687 | - | ||
8688 | -# func_dirname_and_basename file append nondir_replacement | ||
8689 | -# perform func_basename and func_dirname in a single function | ||
8690 | -# call: | ||
8691 | -# dirname: Compute the dirname of FILE. If nonempty, | ||
8692 | -# add APPEND to the result, otherwise set result | ||
8693 | -# to NONDIR_REPLACEMENT. | ||
8694 | -# value returned in "$func_dirname_result" | ||
8695 | -# basename: Compute filename of FILE. | ||
8696 | -# value retuned in "$func_basename_result" | ||
8697 | -# Implementation must be kept synchronized with func_dirname | ||
8698 | -# and func_basename. For efficiency, we do not delegate to | ||
8699 | -# those functions but instead duplicate the functionality here. | ||
8700 | -func_dirname_and_basename () | ||
8701 | -{ | ||
8702 | - case ${1} in | ||
8703 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
8704 | - * ) func_dirname_result="${3}" ;; | ||
8705 | - esac | ||
8706 | - func_basename_result="${1##*/}" | ||
8707 | -} | ||
8708 | - | ||
8709 | -# func_stripname prefix suffix name | ||
8710 | -# strip PREFIX and SUFFIX off of NAME. | ||
8711 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
8712 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
8713 | -# dot (in which case that matches only a dot). | ||
8714 | -func_stripname () | ||
8715 | -{ | ||
8716 | - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
8717 | - # positional parameters, so assign one to ordinary parameter first. | ||
8718 | - func_stripname_result=${3} | ||
8719 | - func_stripname_result=${func_stripname_result#"${1}"} | ||
8720 | - func_stripname_result=${func_stripname_result%"${2}"} | ||
8721 | -} | ||
8722 | - | ||
8723 | -# func_opt_split | ||
8724 | -func_opt_split () | ||
8725 | -{ | ||
8726 | - func_opt_split_opt=${1%%=*} | ||
8727 | - func_opt_split_arg=${1#*=} | ||
8728 | -} | ||
8729 | - | ||
8730 | -# func_lo2o object | ||
8731 | -func_lo2o () | ||
8732 | -{ | ||
8733 | - case ${1} in | ||
8734 | - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
8735 | - *) func_lo2o_result=${1} ;; | ||
8736 | - esac | ||
8737 | -} | ||
8738 | - | ||
8739 | -# func_xform libobj-or-source | ||
8740 | -func_xform () | ||
8741 | -{ | ||
8742 | - func_xform_result=${1%.*}.lo | ||
8743 | -} | ||
8744 | - | ||
8745 | -# func_arith arithmetic-term... | ||
8746 | -func_arith () | ||
8747 | -{ | ||
8748 | - func_arith_result=$(( $* )) | ||
8749 | -} | ||
8750 | - | ||
8751 | -# func_len string | ||
8752 | -# STRING may not start with a hyphen. | ||
8753 | -func_len () | ||
8754 | -{ | ||
8755 | - func_len_result=${#1} | ||
8756 | -} | ||
8757 | - | ||
8758 | -_LT_EOF | ||
8759 | - ;; | ||
8760 | - *) # Bourne compatible functions. | ||
8761 | - cat << \_LT_EOF >> "$cfgfile" | ||
8762 | - | ||
8763 | -# func_dirname file append nondir_replacement | ||
8764 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
8765 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
8766 | -func_dirname () | ||
8767 | -{ | ||
8768 | - # Extract subdirectory from the argument. | ||
8769 | - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | ||
8770 | - if test "X$func_dirname_result" = "X${1}"; then | ||
8771 | - func_dirname_result="${3}" | ||
8772 | - else | ||
8773 | - func_dirname_result="$func_dirname_result${2}" | ||
8774 | - fi | ||
8775 | -} | ||
8776 | - | ||
8777 | -# func_basename file | ||
8778 | -func_basename () | ||
8779 | -{ | ||
8780 | - func_basename_result=`$ECHO "${1}" | $SED "$basename"` | ||
8781 | -} | ||
8782 | - | ||
8783 | - | ||
8784 | -# func_stripname prefix suffix name | ||
8785 | -# strip PREFIX and SUFFIX off of NAME. | ||
8786 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
8787 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
8788 | -# dot (in which case that matches only a dot). | ||
8789 | -# func_strip_suffix prefix name | ||
8790 | -func_stripname () | ||
8791 | -{ | ||
8792 | - case ${2} in | ||
8793 | - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
8794 | - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
8795 | - esac | ||
8796 | -} | ||
8797 | - | ||
8798 | -# sed scripts: | ||
8799 | -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' | ||
8800 | -my_sed_long_arg='1s/^-[^=]*=//' | ||
8801 | - | ||
8802 | -# func_opt_split | ||
8803 | -func_opt_split () | ||
8804 | -{ | ||
8805 | - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` | ||
8806 | - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` | ||
8807 | -} | ||
8808 | - | ||
8809 | -# func_lo2o object | ||
8810 | -func_lo2o () | ||
8811 | -{ | ||
8812 | - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | ||
8813 | -} | ||
8814 | - | ||
8815 | -# func_xform libobj-or-source | ||
8816 | -func_xform () | ||
8817 | -{ | ||
8818 | - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | ||
8819 | -} | ||
8820 | - | ||
8821 | -# func_arith arithmetic-term... | ||
8822 | -func_arith () | ||
8823 | -{ | ||
8824 | - func_arith_result=`expr "$@"` | ||
8825 | -} | ||
8826 | - | ||
8827 | -# func_len string | ||
8828 | -# STRING may not start with a hyphen. | ||
8829 | -func_len () | ||
8830 | -{ | ||
8831 | - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` | ||
8832 | -} | ||
8833 | - | ||
8834 | -_LT_EOF | ||
8835 | -esac | ||
8836 | - | ||
8837 | -case $lt_shell_append in | ||
8838 | - yes) | ||
8839 | - cat << \_LT_EOF >> "$cfgfile" | ||
8840 | - | ||
8841 | -# func_append var value | ||
8842 | -# Append VALUE to the end of shell variable VAR. | ||
8843 | -func_append () | ||
8844 | -{ | ||
8845 | - eval "$1+=\$2" | ||
8846 | -} | ||
8847 | -_LT_EOF | ||
8848 | - ;; | ||
8849 | - *) | ||
8850 | - cat << \_LT_EOF >> "$cfgfile" | ||
8851 | - | ||
8852 | -# func_append var value | ||
8853 | -# Append VALUE to the end of shell variable VAR. | ||
8854 | -func_append () | ||
8855 | -{ | ||
8856 | - eval "$1=\$$1\$2" | ||
8857 | -} | ||
8858 | - | ||
8859 | -_LT_EOF | ||
8860 | - ;; | ||
8861 | - esac | ||
8862 | + sed '$q' "$ltmain" >> "$cfgfile" \ | ||
8863 | + || (rm -f "$cfgfile"; exit 1) | ||
8864 | |||
8865 | + if test x"$xsi_shell" = xyes; then | ||
8866 | + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ | ||
8867 | +func_dirname ()\ | ||
8868 | +{\ | ||
8869 | +\ case ${1} in\ | ||
8870 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
8871 | +\ * ) func_dirname_result="${3}" ;;\ | ||
8872 | +\ esac\ | ||
8873 | +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8874 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8875 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8876 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8877 | + | ||
8878 | + | ||
8879 | + sed -e '/^func_basename ()$/,/^} # func_basename /c\ | ||
8880 | +func_basename ()\ | ||
8881 | +{\ | ||
8882 | +\ func_basename_result="${1##*/}"\ | ||
8883 | +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8884 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8885 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8886 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8887 | + | ||
8888 | + | ||
8889 | + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ | ||
8890 | +func_dirname_and_basename ()\ | ||
8891 | +{\ | ||
8892 | +\ case ${1} in\ | ||
8893 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
8894 | +\ * ) func_dirname_result="${3}" ;;\ | ||
8895 | +\ esac\ | ||
8896 | +\ func_basename_result="${1##*/}"\ | ||
8897 | +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8898 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8899 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8900 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8901 | + | ||
8902 | + | ||
8903 | + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ | ||
8904 | +func_stripname ()\ | ||
8905 | +{\ | ||
8906 | +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ | ||
8907 | +\ # positional parameters, so assign one to ordinary parameter first.\ | ||
8908 | +\ func_stripname_result=${3}\ | ||
8909 | +\ func_stripname_result=${func_stripname_result#"${1}"}\ | ||
8910 | +\ func_stripname_result=${func_stripname_result%"${2}"}\ | ||
8911 | +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8912 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8913 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8914 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8915 | + | ||
8916 | + | ||
8917 | + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ | ||
8918 | +func_split_long_opt ()\ | ||
8919 | +{\ | ||
8920 | +\ func_split_long_opt_name=${1%%=*}\ | ||
8921 | +\ func_split_long_opt_arg=${1#*=}\ | ||
8922 | +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8923 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8924 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8925 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8926 | + | ||
8927 | + | ||
8928 | + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ | ||
8929 | +func_split_short_opt ()\ | ||
8930 | +{\ | ||
8931 | +\ func_split_short_opt_arg=${1#??}\ | ||
8932 | +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ | ||
8933 | +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8934 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8935 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8936 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8937 | + | ||
8938 | + | ||
8939 | + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ | ||
8940 | +func_lo2o ()\ | ||
8941 | +{\ | ||
8942 | +\ case ${1} in\ | ||
8943 | +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ | ||
8944 | +\ *) func_lo2o_result=${1} ;;\ | ||
8945 | +\ esac\ | ||
8946 | +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8947 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8948 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8949 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8950 | + | ||
8951 | + | ||
8952 | + sed -e '/^func_xform ()$/,/^} # func_xform /c\ | ||
8953 | +func_xform ()\ | ||
8954 | +{\ | ||
8955 | + func_xform_result=${1%.*}.lo\ | ||
8956 | +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8957 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8958 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8959 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8960 | + | ||
8961 | + | ||
8962 | + sed -e '/^func_arith ()$/,/^} # func_arith /c\ | ||
8963 | +func_arith ()\ | ||
8964 | +{\ | ||
8965 | + func_arith_result=$(( $* ))\ | ||
8966 | +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8967 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8968 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8969 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8970 | + | ||
8971 | + | ||
8972 | + sed -e '/^func_len ()$/,/^} # func_len /c\ | ||
8973 | +func_len ()\ | ||
8974 | +{\ | ||
8975 | + func_len_result=${#1}\ | ||
8976 | +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8977 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8978 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8979 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8980 | + | ||
8981 | +fi | ||
8982 | + | ||
8983 | +if test x"$lt_shell_append" = xyes; then | ||
8984 | + sed -e '/^func_append ()$/,/^} # func_append /c\ | ||
8985 | +func_append ()\ | ||
8986 | +{\ | ||
8987 | + eval "${1}+=\\${2}"\ | ||
8988 | +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ | ||
8989 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
8990 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
8991 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
8992 | + | ||
8993 | + | ||
8994 | + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ | ||
8995 | +func_append_quoted ()\ | ||
8996 | +{\ | ||
8997 | +\ func_quote_for_eval "${2}"\ | ||
8998 | +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ | ||
8999 | +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ | ||
9000 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
9001 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
9002 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
9003 | + | ||
9004 | + | ||
9005 | + # Save a `func_append' function call where possible by direct use of '+=' | ||
9006 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
9007 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
9008 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
9009 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
9010 | +else | ||
9011 | + # Save a `func_append' function call even when '+=' is not available | ||
9012 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | ||
9013 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
9014 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
9015 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
9016 | +fi | ||
9017 | + | ||
9018 | +if test x"$_lt_function_replace_fail" = x":"; then | ||
9019 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 | ||
9020 | +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} | ||
9021 | +fi | ||
9022 | |||
9023 | - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ | ||
9024 | - || (rm -f "$cfgfile"; exit 1) | ||
9025 | |||
9026 | - mv -f "$cfgfile" "$ofile" || | ||
9027 | + mv -f "$cfgfile" "$ofile" || | ||
9028 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
9029 | chmod +x "$ofile" | ||
9030 | |||
9031 | Index: binutils-2.24/opcodes/configure | ||
9032 | =================================================================== | ||
9033 | --- binutils-2.24.orig/opcodes/configure 2013-11-04 07:33:40.000000000 -0800 | ||
9034 | +++ binutils-2.24/opcodes/configure 2013-12-15 11:10:23.873785364 -0800 | ||
9035 | @@ -648,6 +648,9 @@ | ||
9036 | LIPO | ||
9037 | NMEDIT | ||
9038 | DSYMUTIL | ||
9039 | +MANIFEST_TOOL | ||
9040 | +ac_ct_AR | ||
9041 | +DLLTOOL | ||
9042 | OBJDUMP | ||
9043 | LN_S | ||
9044 | NM | ||
9045 | @@ -760,6 +763,7 @@ | ||
9046 | with_pic | ||
9047 | enable_fast_install | ||
9048 | with_gnu_ld | ||
9049 | +with_libtool_sysroot | ||
9050 | enable_libtool_lock | ||
9051 | enable_targets | ||
9052 | enable_werror | ||
9053 | @@ -1418,6 +1422,8 @@ | ||
9054 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
9055 | both] | ||
9056 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
9057 | + --with-libtool-sysroot=DIR Search for dependent libraries within DIR | ||
9058 | + (or the compiler's sysroot if not specified). | ||
9059 | |||
9060 | Some influential environment variables: | ||
9061 | CC C compiler command | ||
9062 | @@ -5113,8 +5119,8 @@ | ||
9063 | |||
9064 | |||
9065 | |||
9066 | -macro_version='2.2.7a' | ||
9067 | -macro_revision='1.3134' | ||
9068 | +macro_version='2.4' | ||
9069 | +macro_revision='1.3293' | ||
9070 | |||
9071 | |||
9072 | |||
9073 | @@ -5154,7 +5160,7 @@ | ||
9074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | ||
9075 | $as_echo_n "checking how to print strings... " >&6; } | ||
9076 | # Test print first, because it will be a builtin if present. | ||
9077 | -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | ||
9078 | +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
9079 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
9080 | ECHO='print -r --' | ||
9081 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
9082 | @@ -5840,8 +5846,8 @@ | ||
9083 | # Try some XSI features | ||
9084 | xsi_shell=no | ||
9085 | ( _lt_dummy="a/b/c" | ||
9086 | - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | ||
9087 | - = c,a/b,, \ | ||
9088 | + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
9089 | + = c,a/b,b/c, \ | ||
9090 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
9091 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
9092 | && xsi_shell=yes | ||
9093 | @@ -5890,6 +5896,80 @@ | ||
9094 | |||
9095 | |||
9096 | |||
9097 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 | ||
9098 | +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } | ||
9099 | +if test "${lt_cv_to_host_file_cmd+set}" = set; then : | ||
9100 | + $as_echo_n "(cached) " >&6 | ||
9101 | +else | ||
9102 | + case $host in | ||
9103 | + *-*-mingw* ) | ||
9104 | + case $build in | ||
9105 | + *-*-mingw* ) # actually msys | ||
9106 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
9107 | + ;; | ||
9108 | + *-*-cygwin* ) | ||
9109 | + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
9110 | + ;; | ||
9111 | + * ) # otherwise, assume *nix | ||
9112 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
9113 | + ;; | ||
9114 | + esac | ||
9115 | + ;; | ||
9116 | + *-*-cygwin* ) | ||
9117 | + case $build in | ||
9118 | + *-*-mingw* ) # actually msys | ||
9119 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
9120 | + ;; | ||
9121 | + *-*-cygwin* ) | ||
9122 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
9123 | + ;; | ||
9124 | + * ) # otherwise, assume *nix | ||
9125 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
9126 | + ;; | ||
9127 | + esac | ||
9128 | + ;; | ||
9129 | + * ) # unhandled hosts (and "normal" native builds) | ||
9130 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
9131 | + ;; | ||
9132 | +esac | ||
9133 | + | ||
9134 | +fi | ||
9135 | + | ||
9136 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
9137 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 | ||
9138 | +$as_echo "$lt_cv_to_host_file_cmd" >&6; } | ||
9139 | + | ||
9140 | + | ||
9141 | + | ||
9142 | + | ||
9143 | + | ||
9144 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 | ||
9145 | +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } | ||
9146 | +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : | ||
9147 | + $as_echo_n "(cached) " >&6 | ||
9148 | +else | ||
9149 | + #assume ordinary cross tools, or native build. | ||
9150 | +lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
9151 | +case $host in | ||
9152 | + *-*-mingw* ) | ||
9153 | + case $build in | ||
9154 | + *-*-mingw* ) # actually msys | ||
9155 | + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
9156 | + ;; | ||
9157 | + esac | ||
9158 | + ;; | ||
9159 | +esac | ||
9160 | + | ||
9161 | +fi | ||
9162 | + | ||
9163 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
9164 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 | ||
9165 | +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } | ||
9166 | + | ||
9167 | + | ||
9168 | + | ||
9169 | + | ||
9170 | + | ||
9171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 | ||
9172 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | ||
9173 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | ||
9174 | @@ -5906,6 +5986,11 @@ | ||
9175 | esac | ||
9176 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
9177 | case $host_os in | ||
9178 | + cygwin* | mingw* | pw32* | cegcc*) | ||
9179 | + if test "$GCC" != yes; then | ||
9180 | + reload_cmds=false | ||
9181 | + fi | ||
9182 | + ;; | ||
9183 | darwin*) | ||
9184 | if test "$GCC" = yes; then | ||
9185 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
9186 | @@ -6074,7 +6159,8 @@ | ||
9187 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
9188 | lt_cv_file_magic_cmd='func_win32_libid' | ||
9189 | else | ||
9190 | - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
9191 | + # Keep this pattern in sync with the one in func_win32_libid. | ||
9192 | + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
9193 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
9194 | fi | ||
9195 | ;; | ||
9196 | @@ -6228,6 +6314,21 @@ | ||
9197 | fi | ||
9198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 | ||
9199 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | ||
9200 | + | ||
9201 | +file_magic_glob= | ||
9202 | +want_nocaseglob=no | ||
9203 | +if test "$build" = "$host"; then | ||
9204 | + case $host_os in | ||
9205 | + mingw* | pw32*) | ||
9206 | + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
9207 | + want_nocaseglob=yes | ||
9208 | + else | ||
9209 | + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` | ||
9210 | + fi | ||
9211 | + ;; | ||
9212 | + esac | ||
9213 | +fi | ||
9214 | + | ||
9215 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
9216 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
9217 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
9218 | @@ -6243,9 +6344,162 @@ | ||
9219 | |||
9220 | |||
9221 | |||
9222 | + | ||
9223 | + | ||
9224 | + | ||
9225 | + | ||
9226 | + | ||
9227 | + | ||
9228 | + | ||
9229 | + | ||
9230 | + | ||
9231 | + | ||
9232 | if test -n "$ac_tool_prefix"; then | ||
9233 | - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
9234 | -set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
9235 | + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
9236 | +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
9237 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
9238 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
9239 | +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | ||
9240 | + $as_echo_n "(cached) " >&6 | ||
9241 | +else | ||
9242 | + if test -n "$DLLTOOL"; then | ||
9243 | + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
9244 | +else | ||
9245 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
9246 | +for as_dir in $PATH | ||
9247 | +do | ||
9248 | + IFS=$as_save_IFS | ||
9249 | + test -z "$as_dir" && as_dir=. | ||
9250 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
9251 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
9252 | + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
9253 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
9254 | + break 2 | ||
9255 | + fi | ||
9256 | +done | ||
9257 | + done | ||
9258 | +IFS=$as_save_IFS | ||
9259 | + | ||
9260 | +fi | ||
9261 | +fi | ||
9262 | +DLLTOOL=$ac_cv_prog_DLLTOOL | ||
9263 | +if test -n "$DLLTOOL"; then | ||
9264 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 | ||
9265 | +$as_echo "$DLLTOOL" >&6; } | ||
9266 | +else | ||
9267 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
9268 | +$as_echo "no" >&6; } | ||
9269 | +fi | ||
9270 | + | ||
9271 | + | ||
9272 | +fi | ||
9273 | +if test -z "$ac_cv_prog_DLLTOOL"; then | ||
9274 | + ac_ct_DLLTOOL=$DLLTOOL | ||
9275 | + # Extract the first word of "dlltool", so it can be a program name with args. | ||
9276 | +set dummy dlltool; ac_word=$2 | ||
9277 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
9278 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
9279 | +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | ||
9280 | + $as_echo_n "(cached) " >&6 | ||
9281 | +else | ||
9282 | + if test -n "$ac_ct_DLLTOOL"; then | ||
9283 | + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
9284 | +else | ||
9285 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
9286 | +for as_dir in $PATH | ||
9287 | +do | ||
9288 | + IFS=$as_save_IFS | ||
9289 | + test -z "$as_dir" && as_dir=. | ||
9290 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
9291 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
9292 | + ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
9293 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
9294 | + break 2 | ||
9295 | + fi | ||
9296 | +done | ||
9297 | + done | ||
9298 | +IFS=$as_save_IFS | ||
9299 | + | ||
9300 | +fi | ||
9301 | +fi | ||
9302 | +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
9303 | +if test -n "$ac_ct_DLLTOOL"; then | ||
9304 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 | ||
9305 | +$as_echo "$ac_ct_DLLTOOL" >&6; } | ||
9306 | +else | ||
9307 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
9308 | +$as_echo "no" >&6; } | ||
9309 | +fi | ||
9310 | + | ||
9311 | + if test "x$ac_ct_DLLTOOL" = x; then | ||
9312 | + DLLTOOL="false" | ||
9313 | + else | ||
9314 | + case $cross_compiling:$ac_tool_warned in | ||
9315 | +yes:) | ||
9316 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
9317 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
9318 | +ac_tool_warned=yes ;; | ||
9319 | +esac | ||
9320 | + DLLTOOL=$ac_ct_DLLTOOL | ||
9321 | + fi | ||
9322 | +else | ||
9323 | + DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
9324 | +fi | ||
9325 | + | ||
9326 | +test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
9327 | + | ||
9328 | + | ||
9329 | + | ||
9330 | + | ||
9331 | + | ||
9332 | + | ||
9333 | + | ||
9334 | + | ||
9335 | + | ||
9336 | + | ||
9337 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 | ||
9338 | +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } | ||
9339 | +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : | ||
9340 | + $as_echo_n "(cached) " >&6 | ||
9341 | +else | ||
9342 | + lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
9343 | + | ||
9344 | +case $host_os in | ||
9345 | +cygwin* | mingw* | pw32* | cegcc*) | ||
9346 | + # two different shell functions defined in ltmain.sh | ||
9347 | + # decide which to use based on capabilities of $DLLTOOL | ||
9348 | + case `$DLLTOOL --help 2>&1` in | ||
9349 | + *--identify-strict*) | ||
9350 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
9351 | + ;; | ||
9352 | + *) | ||
9353 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
9354 | + ;; | ||
9355 | + esac | ||
9356 | + ;; | ||
9357 | +*) | ||
9358 | + # fallback: assume linklib IS sharedlib | ||
9359 | + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
9360 | + ;; | ||
9361 | +esac | ||
9362 | + | ||
9363 | +fi | ||
9364 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 | ||
9365 | +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } | ||
9366 | +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
9367 | +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
9368 | + | ||
9369 | + | ||
9370 | + | ||
9371 | + | ||
9372 | + | ||
9373 | + | ||
9374 | + | ||
9375 | +if test -n "$ac_tool_prefix"; then | ||
9376 | + for ac_prog in ar | ||
9377 | + do | ||
9378 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
9379 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
9380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
9381 | $as_echo_n "checking for $ac_word... " >&6; } | ||
9382 | if test "${ac_cv_prog_AR+set}" = set; then : | ||
9383 | @@ -6261,7 +6515,7 @@ | ||
9384 | test -z "$as_dir" && as_dir=. | ||
9385 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
9386 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
9387 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
9388 | + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | ||
9389 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
9390 | break 2 | ||
9391 | fi | ||
9392 | @@ -6281,11 +6535,15 @@ | ||
9393 | fi | ||
9394 | |||
9395 | |||
9396 | + test -n "$AR" && break | ||
9397 | + done | ||
9398 | fi | ||
9399 | -if test -z "$ac_cv_prog_AR"; then | ||
9400 | +if test -z "$AR"; then | ||
9401 | ac_ct_AR=$AR | ||
9402 | - # Extract the first word of "ar", so it can be a program name with args. | ||
9403 | -set dummy ar; ac_word=$2 | ||
9404 | + for ac_prog in ar | ||
9405 | +do | ||
9406 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
9407 | +set dummy $ac_prog; ac_word=$2 | ||
9408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
9409 | $as_echo_n "checking for $ac_word... " >&6; } | ||
9410 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | ||
9411 | @@ -6301,7 +6559,7 @@ | ||
9412 | test -z "$as_dir" && as_dir=. | ||
9413 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
9414 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
9415 | - ac_cv_prog_ac_ct_AR="ar" | ||
9416 | + ac_cv_prog_ac_ct_AR="$ac_prog" | ||
9417 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
9418 | break 2 | ||
9419 | fi | ||
9420 | @@ -6320,6 +6578,10 @@ | ||
9421 | $as_echo "no" >&6; } | ||
9422 | fi | ||
9423 | |||
9424 | + | ||
9425 | + test -n "$ac_ct_AR" && break | ||
9426 | +done | ||
9427 | + | ||
9428 | if test "x$ac_ct_AR" = x; then | ||
9429 | AR="false" | ||
9430 | else | ||
9431 | @@ -6331,12 +6593,11 @@ | ||
9432 | esac | ||
9433 | AR=$ac_ct_AR | ||
9434 | fi | ||
9435 | -else | ||
9436 | - AR="$ac_cv_prog_AR" | ||
9437 | fi | ||
9438 | |||
9439 | -test -z "$AR" && AR=ar | ||
9440 | -test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
9441 | +: ${AR=ar} | ||
9442 | +: ${AR_FLAGS=cru} | ||
9443 | + | ||
9444 | |||
9445 | |||
9446 | |||
9447 | @@ -6347,6 +6608,63 @@ | ||
9448 | |||
9449 | |||
9450 | |||
9451 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 | ||
9452 | +$as_echo_n "checking for archiver @FILE support... " >&6; } | ||
9453 | +if test "${lt_cv_ar_at_file+set}" = set; then : | ||
9454 | + $as_echo_n "(cached) " >&6 | ||
9455 | +else | ||
9456 | + lt_cv_ar_at_file=no | ||
9457 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
9458 | +/* end confdefs.h. */ | ||
9459 | + | ||
9460 | +int | ||
9461 | +main () | ||
9462 | +{ | ||
9463 | + | ||
9464 | + ; | ||
9465 | + return 0; | ||
9466 | +} | ||
9467 | +_ACEOF | ||
9468 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
9469 | + echo conftest.$ac_objext > conftest.lst | ||
9470 | + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' | ||
9471 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
9472 | + (eval $lt_ar_try) 2>&5 | ||
9473 | + ac_status=$? | ||
9474 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
9475 | + test $ac_status = 0; } | ||
9476 | + if test "$ac_status" -eq 0; then | ||
9477 | + # Ensure the archiver fails upon bogus file names. | ||
9478 | + rm -f conftest.$ac_objext libconftest.a | ||
9479 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
9480 | + (eval $lt_ar_try) 2>&5 | ||
9481 | + ac_status=$? | ||
9482 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
9483 | + test $ac_status = 0; } | ||
9484 | + if test "$ac_status" -ne 0; then | ||
9485 | + lt_cv_ar_at_file=@ | ||
9486 | + fi | ||
9487 | + fi | ||
9488 | + rm -f conftest.* libconftest.a | ||
9489 | + | ||
9490 | +fi | ||
9491 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
9492 | + | ||
9493 | +fi | ||
9494 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 | ||
9495 | +$as_echo "$lt_cv_ar_at_file" >&6; } | ||
9496 | + | ||
9497 | +if test "x$lt_cv_ar_at_file" = xno; then | ||
9498 | + archiver_list_spec= | ||
9499 | +else | ||
9500 | + archiver_list_spec=$lt_cv_ar_at_file | ||
9501 | +fi | ||
9502 | + | ||
9503 | + | ||
9504 | + | ||
9505 | + | ||
9506 | + | ||
9507 | + | ||
9508 | |||
9509 | if test -n "$ac_tool_prefix"; then | ||
9510 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | ||
9511 | @@ -6682,8 +7000,8 @@ | ||
9512 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
9513 | |||
9514 | # Transform an extracted symbol line into symbol name and symbol address | ||
9515 | -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
9516 | -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'" | ||
9517 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
9518 | +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'" | ||
9519 | |||
9520 | # Handle CRLF in mingw tool chain | ||
9521 | opt_cr= | ||
9522 | @@ -6719,6 +7037,7 @@ | ||
9523 | else | ||
9524 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
9525 | fi | ||
9526 | + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
9527 | |||
9528 | # Check to see that the pipe works correctly. | ||
9529 | pipe_works=no | ||
9530 | @@ -6760,6 +7079,18 @@ | ||
9531 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
9532 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
9533 | cat <<_LT_EOF > conftest.$ac_ext | ||
9534 | +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
9535 | +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
9536 | +/* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
9537 | + relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
9538 | +# define LT_DLSYM_CONST | ||
9539 | +#elif defined(__osf__) | ||
9540 | +/* This system does not cope well with relocations in const data. */ | ||
9541 | +# define LT_DLSYM_CONST | ||
9542 | +#else | ||
9543 | +# define LT_DLSYM_CONST const | ||
9544 | +#endif | ||
9545 | + | ||
9546 | #ifdef __cplusplus | ||
9547 | extern "C" { | ||
9548 | #endif | ||
9549 | @@ -6771,7 +7102,7 @@ | ||
9550 | cat <<_LT_EOF >> conftest.$ac_ext | ||
9551 | |||
9552 | /* The mapping between symbol names and symbols. */ | ||
9553 | -const struct { | ||
9554 | +LT_DLSYM_CONST struct { | ||
9555 | const char *name; | ||
9556 | void *address; | ||
9557 | } | ||
9558 | @@ -6797,8 +7128,8 @@ | ||
9559 | _LT_EOF | ||
9560 | # Now try linking the two files. | ||
9561 | mv conftest.$ac_objext conftstm.$ac_objext | ||
9562 | - lt_save_LIBS="$LIBS" | ||
9563 | - lt_save_CFLAGS="$CFLAGS" | ||
9564 | + lt_globsym_save_LIBS=$LIBS | ||
9565 | + lt_globsym_save_CFLAGS=$CFLAGS | ||
9566 | LIBS="conftstm.$ac_objext" | ||
9567 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
9568 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | ||
9569 | @@ -6808,8 +7139,8 @@ | ||
9570 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | ||
9571 | pipe_works=yes | ||
9572 | fi | ||
9573 | - LIBS="$lt_save_LIBS" | ||
9574 | - CFLAGS="$lt_save_CFLAGS" | ||
9575 | + LIBS=$lt_globsym_save_LIBS | ||
9576 | + CFLAGS=$lt_globsym_save_CFLAGS | ||
9577 | else | ||
9578 | echo "cannot find nm_test_func in $nlist" >&5 | ||
9579 | fi | ||
9580 | @@ -6846,6 +7177,14 @@ | ||
9581 | $as_echo "ok" >&6; } | ||
9582 | fi | ||
9583 | |||
9584 | +# Response file support. | ||
9585 | +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
9586 | + nm_file_list_spec='@' | ||
9587 | +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then | ||
9588 | + nm_file_list_spec='@' | ||
9589 | +fi | ||
9590 | + | ||
9591 | + | ||
9592 | |||
9593 | |||
9594 | |||
9595 | @@ -6867,6 +7206,47 @@ | ||
9596 | |||
9597 | |||
9598 | |||
9599 | + | ||
9600 | + | ||
9601 | + | ||
9602 | + | ||
9603 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 | ||
9604 | +$as_echo_n "checking for sysroot... " >&6; } | ||
9605 | + | ||
9606 | +# Check whether --with-libtool-sysroot was given. | ||
9607 | +if test "${with_libtool_sysroot+set}" = set; then : | ||
9608 | + withval=$with_libtool_sysroot; | ||
9609 | +else | ||
9610 | + with_libtool_sysroot=no | ||
9611 | +fi | ||
9612 | + | ||
9613 | + | ||
9614 | +lt_sysroot= | ||
9615 | +case ${with_libtool_sysroot} in #( | ||
9616 | + yes) | ||
9617 | + if test "$GCC" = yes; then | ||
9618 | + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
9619 | + fi | ||
9620 | + ;; #( | ||
9621 | + /*) | ||
9622 | + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
9623 | + ;; #( | ||
9624 | + no|'') | ||
9625 | + ;; #( | ||
9626 | + *) | ||
9627 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 | ||
9628 | +$as_echo "${with_libtool_sysroot}" >&6; } | ||
9629 | + as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 | ||
9630 | + ;; | ||
9631 | +esac | ||
9632 | + | ||
9633 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 | ||
9634 | +$as_echo "${lt_sysroot:-no}" >&6; } | ||
9635 | + | ||
9636 | + | ||
9637 | + | ||
9638 | + | ||
9639 | + | ||
9640 | # Check whether --enable-libtool-lock was given. | ||
9641 | if test "${enable_libtool_lock+set}" = set; then : | ||
9642 | enableval=$enable_libtool_lock; | ||
9643 | @@ -7073,6 +7453,123 @@ | ||
9644 | |||
9645 | need_locks="$enable_libtool_lock" | ||
9646 | |||
9647 | +if test -n "$ac_tool_prefix"; then | ||
9648 | + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. | ||
9649 | +set dummy ${ac_tool_prefix}mt; ac_word=$2 | ||
9650 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
9651 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
9652 | +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : | ||
9653 | + $as_echo_n "(cached) " >&6 | ||
9654 | +else | ||
9655 | + if test -n "$MANIFEST_TOOL"; then | ||
9656 | + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. | ||
9657 | +else | ||
9658 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
9659 | +for as_dir in $PATH | ||
9660 | +do | ||
9661 | + IFS=$as_save_IFS | ||
9662 | + test -z "$as_dir" && as_dir=. | ||
9663 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
9664 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
9665 | + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" | ||
9666 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
9667 | + break 2 | ||
9668 | + fi | ||
9669 | +done | ||
9670 | + done | ||
9671 | +IFS=$as_save_IFS | ||
9672 | + | ||
9673 | +fi | ||
9674 | +fi | ||
9675 | +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL | ||
9676 | +if test -n "$MANIFEST_TOOL"; then | ||
9677 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 | ||
9678 | +$as_echo "$MANIFEST_TOOL" >&6; } | ||
9679 | +else | ||
9680 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
9681 | +$as_echo "no" >&6; } | ||
9682 | +fi | ||
9683 | + | ||
9684 | + | ||
9685 | +fi | ||
9686 | +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then | ||
9687 | + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL | ||
9688 | + # Extract the first word of "mt", so it can be a program name with args. | ||
9689 | +set dummy mt; ac_word=$2 | ||
9690 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
9691 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
9692 | +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : | ||
9693 | + $as_echo_n "(cached) " >&6 | ||
9694 | +else | ||
9695 | + if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
9696 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. | ||
9697 | +else | ||
9698 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
9699 | +for as_dir in $PATH | ||
9700 | +do | ||
9701 | + IFS=$as_save_IFS | ||
9702 | + test -z "$as_dir" && as_dir=. | ||
9703 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
9704 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
9705 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" | ||
9706 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
9707 | + break 2 | ||
9708 | + fi | ||
9709 | +done | ||
9710 | + done | ||
9711 | +IFS=$as_save_IFS | ||
9712 | + | ||
9713 | +fi | ||
9714 | +fi | ||
9715 | +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL | ||
9716 | +if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
9717 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 | ||
9718 | +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } | ||
9719 | +else | ||
9720 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
9721 | +$as_echo "no" >&6; } | ||
9722 | +fi | ||
9723 | + | ||
9724 | + if test "x$ac_ct_MANIFEST_TOOL" = x; then | ||
9725 | + MANIFEST_TOOL=":" | ||
9726 | + else | ||
9727 | + case $cross_compiling:$ac_tool_warned in | ||
9728 | +yes:) | ||
9729 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
9730 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
9731 | +ac_tool_warned=yes ;; | ||
9732 | +esac | ||
9733 | + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL | ||
9734 | + fi | ||
9735 | +else | ||
9736 | + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" | ||
9737 | +fi | ||
9738 | + | ||
9739 | +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
9740 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 | ||
9741 | +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } | ||
9742 | +if test "${lt_cv_path_mainfest_tool+set}" = set; then : | ||
9743 | + $as_echo_n "(cached) " >&6 | ||
9744 | +else | ||
9745 | + lt_cv_path_mainfest_tool=no | ||
9746 | + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 | ||
9747 | + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
9748 | + cat conftest.err >&5 | ||
9749 | + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
9750 | + lt_cv_path_mainfest_tool=yes | ||
9751 | + fi | ||
9752 | + rm -f conftest* | ||
9753 | +fi | ||
9754 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 | ||
9755 | +$as_echo "$lt_cv_path_mainfest_tool" >&6; } | ||
9756 | +if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
9757 | + MANIFEST_TOOL=: | ||
9758 | +fi | ||
9759 | + | ||
9760 | + | ||
9761 | + | ||
9762 | + | ||
9763 | + | ||
9764 | |||
9765 | case $host_os in | ||
9766 | rhapsody* | darwin*) | ||
9767 | @@ -7636,6 +8133,8 @@ | ||
9768 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | ||
9769 | echo "$AR cru libconftest.a conftest.o" >&5 | ||
9770 | $AR cru libconftest.a conftest.o 2>&5 | ||
9771 | + echo "$RANLIB libconftest.a" >&5 | ||
9772 | + $RANLIB libconftest.a 2>&5 | ||
9773 | cat > conftest.c << _LT_EOF | ||
9774 | int main() { return 0;} | ||
9775 | _LT_EOF | ||
9776 | @@ -7801,7 +8300,8 @@ | ||
9777 | LIBTOOL_DEPS="$ltmain" | ||
9778 | |||
9779 | # Always use our own libtool. | ||
9780 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
9781 | +LIBTOOL='$(SHELL) $(top_builddir)' | ||
9782 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | ||
9783 | |||
9784 | |||
9785 | |||
9786 | @@ -7890,7 +8390,7 @@ | ||
9787 | esac | ||
9788 | |||
9789 | # Global variables: | ||
9790 | -ofile=libtool | ||
9791 | +ofile=${host_alias}-libtool | ||
9792 | can_build_shared=yes | ||
9793 | |||
9794 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
9795 | @@ -8188,8 +8688,6 @@ | ||
9796 | lt_prog_compiler_pic= | ||
9797 | lt_prog_compiler_static= | ||
9798 | |||
9799 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
9800 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
9801 | |||
9802 | if test "$GCC" = yes; then | ||
9803 | lt_prog_compiler_wl='-Wl,' | ||
9804 | @@ -8355,6 +8853,12 @@ | ||
9805 | lt_prog_compiler_pic='--shared' | ||
9806 | lt_prog_compiler_static='--static' | ||
9807 | ;; | ||
9808 | + nagfor*) | ||
9809 | + # NAG Fortran compiler | ||
9810 | + lt_prog_compiler_wl='-Wl,-Wl,,' | ||
9811 | + lt_prog_compiler_pic='-PIC' | ||
9812 | + lt_prog_compiler_static='-Bstatic' | ||
9813 | + ;; | ||
9814 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
9815 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
9816 | # which looks to be a dead project) | ||
9817 | @@ -8417,7 +8921,7 @@ | ||
9818 | lt_prog_compiler_pic='-KPIC' | ||
9819 | lt_prog_compiler_static='-Bstatic' | ||
9820 | case $cc_basename in | ||
9821 | - f77* | f90* | f95*) | ||
9822 | + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
9823 | lt_prog_compiler_wl='-Qoption ld ';; | ||
9824 | *) | ||
9825 | lt_prog_compiler_wl='-Wl,';; | ||
9826 | @@ -8474,13 +8978,17 @@ | ||
9827 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
9828 | ;; | ||
9829 | esac | ||
9830 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 | ||
9831 | -$as_echo "$lt_prog_compiler_pic" >&6; } | ||
9832 | - | ||
9833 | - | ||
9834 | - | ||
9835 | - | ||
9836 | |||
9837 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
9838 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
9839 | +if test "${lt_cv_prog_compiler_pic+set}" = set; then : | ||
9840 | + $as_echo_n "(cached) " >&6 | ||
9841 | +else | ||
9842 | + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic | ||
9843 | +fi | ||
9844 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 | ||
9845 | +$as_echo "$lt_cv_prog_compiler_pic" >&6; } | ||
9846 | +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic | ||
9847 | |||
9848 | # | ||
9849 | # Check to make sure the PIC flag actually works. | ||
9850 | @@ -8541,6 +9049,11 @@ | ||
9851 | |||
9852 | |||
9853 | |||
9854 | + | ||
9855 | + | ||
9856 | + | ||
9857 | + | ||
9858 | + | ||
9859 | # | ||
9860 | # Check to make sure the static flag actually works. | ||
9861 | # | ||
9862 | @@ -8891,7 +9404,8 @@ | ||
9863 | allow_undefined_flag=unsupported | ||
9864 | always_export_symbols=no | ||
9865 | enable_shared_with_static_runtimes=yes | ||
9866 | - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
9867 | + 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' | ||
9868 | + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
9869 | |||
9870 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
9871 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
9872 | @@ -8939,7 +9453,7 @@ | ||
9873 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
9874 | && test "$tmp_diet" = no | ||
9875 | then | ||
9876 | - tmp_addflag= | ||
9877 | + tmp_addflag=' $pic_flag' | ||
9878 | tmp_sharedflag='-shared' | ||
9879 | case $cc_basename,$host_cpu in | ||
9880 | pgcc*) # Portland Group C compiler | ||
9881 | @@ -8990,12 +9504,12 @@ | ||
9882 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | ||
9883 | hardcode_libdir_flag_spec= | ||
9884 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
9885 | - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | ||
9886 | + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
9887 | if test "x$supports_anon_versioning" = xyes; then | ||
9888 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | ||
9889 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
9890 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
9891 | - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
9892 | + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
9893 | fi | ||
9894 | ;; | ||
9895 | esac | ||
9896 | @@ -9009,8 +9523,8 @@ | ||
9897 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
9898 | wlarc= | ||
9899 | else | ||
9900 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
9901 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
9902 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
9903 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
9904 | fi | ||
9905 | ;; | ||
9906 | |||
9907 | @@ -9028,8 +9542,8 @@ | ||
9908 | |||
9909 | _LT_EOF | ||
9910 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
9911 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
9912 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
9913 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
9914 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
9915 | else | ||
9916 | ld_shlibs=no | ||
9917 | fi | ||
9918 | @@ -9075,8 +9589,8 @@ | ||
9919 | |||
9920 | *) | ||
9921 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
9922 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
9923 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
9924 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
9925 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
9926 | else | ||
9927 | ld_shlibs=no | ||
9928 | fi | ||
9929 | @@ -9206,7 +9720,13 @@ | ||
9930 | allow_undefined_flag='-berok' | ||
9931 | # Determine the default libpath from the value encoded in an | ||
9932 | # empty executable. | ||
9933 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
9934 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
9935 | + aix_libpath=$lt_cv_aix_libpath | ||
9936 | +else | ||
9937 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
9938 | + $as_echo_n "(cached) " >&6 | ||
9939 | +else | ||
9940 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
9941 | /* end confdefs.h. */ | ||
9942 | |||
9943 | int | ||
9944 | @@ -9219,22 +9739,29 @@ | ||
9945 | _ACEOF | ||
9946 | if ac_fn_c_try_link "$LINENO"; then : | ||
9947 | |||
9948 | -lt_aix_libpath_sed=' | ||
9949 | - /Import File Strings/,/^$/ { | ||
9950 | - /^0/ { | ||
9951 | - s/^0 *\(.*\)$/\1/ | ||
9952 | - p | ||
9953 | - } | ||
9954 | - }' | ||
9955 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
9956 | -# Check for a 64-bit object if we didn't find anything. | ||
9957 | -if test -z "$aix_libpath"; then | ||
9958 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
9959 | -fi | ||
9960 | + lt_aix_libpath_sed=' | ||
9961 | + /Import File Strings/,/^$/ { | ||
9962 | + /^0/ { | ||
9963 | + s/^0 *\([^ ]*\) *$/\1/ | ||
9964 | + p | ||
9965 | + } | ||
9966 | + }' | ||
9967 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
9968 | + # Check for a 64-bit object if we didn't find anything. | ||
9969 | + if test -z "$lt_cv_aix_libpath_"; then | ||
9970 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
9971 | + fi | ||
9972 | fi | ||
9973 | rm -f core conftest.err conftest.$ac_objext \ | ||
9974 | conftest$ac_exeext conftest.$ac_ext | ||
9975 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
9976 | + if test -z "$lt_cv_aix_libpath_"; then | ||
9977 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
9978 | + fi | ||
9979 | + | ||
9980 | +fi | ||
9981 | + | ||
9982 | + aix_libpath=$lt_cv_aix_libpath_ | ||
9983 | +fi | ||
9984 | |||
9985 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
9986 | 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" | ||
9987 | @@ -9246,7 +9773,13 @@ | ||
9988 | else | ||
9989 | # Determine the default libpath from the value encoded in an | ||
9990 | # empty executable. | ||
9991 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
9992 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
9993 | + aix_libpath=$lt_cv_aix_libpath | ||
9994 | +else | ||
9995 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
9996 | + $as_echo_n "(cached) " >&6 | ||
9997 | +else | ||
9998 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
9999 | /* end confdefs.h. */ | ||
10000 | |||
10001 | int | ||
10002 | @@ -9259,22 +9792,29 @@ | ||
10003 | _ACEOF | ||
10004 | if ac_fn_c_try_link "$LINENO"; then : | ||
10005 | |||
10006 | -lt_aix_libpath_sed=' | ||
10007 | - /Import File Strings/,/^$/ { | ||
10008 | - /^0/ { | ||
10009 | - s/^0 *\(.*\)$/\1/ | ||
10010 | - p | ||
10011 | - } | ||
10012 | - }' | ||
10013 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
10014 | -# Check for a 64-bit object if we didn't find anything. | ||
10015 | -if test -z "$aix_libpath"; then | ||
10016 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
10017 | -fi | ||
10018 | + lt_aix_libpath_sed=' | ||
10019 | + /Import File Strings/,/^$/ { | ||
10020 | + /^0/ { | ||
10021 | + s/^0 *\([^ ]*\) *$/\1/ | ||
10022 | + p | ||
10023 | + } | ||
10024 | + }' | ||
10025 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
10026 | + # Check for a 64-bit object if we didn't find anything. | ||
10027 | + if test -z "$lt_cv_aix_libpath_"; then | ||
10028 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
10029 | + fi | ||
10030 | fi | ||
10031 | rm -f core conftest.err conftest.$ac_objext \ | ||
10032 | conftest$ac_exeext conftest.$ac_ext | ||
10033 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
10034 | + if test -z "$lt_cv_aix_libpath_"; then | ||
10035 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
10036 | + fi | ||
10037 | + | ||
10038 | +fi | ||
10039 | + | ||
10040 | + aix_libpath=$lt_cv_aix_libpath_ | ||
10041 | +fi | ||
10042 | |||
10043 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
10044 | # Warning - without using the other run time loading flags, | ||
10045 | @@ -9319,20 +9859,63 @@ | ||
10046 | # Microsoft Visual C++. | ||
10047 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
10048 | # no search path for DLLs. | ||
10049 | - hardcode_libdir_flag_spec=' ' | ||
10050 | - allow_undefined_flag=unsupported | ||
10051 | - # Tell ltmain to make .lib files, not .a files. | ||
10052 | - libext=lib | ||
10053 | - # Tell ltmain to make .dll files, not .so files. | ||
10054 | - shrext_cmds=".dll" | ||
10055 | - # FIXME: Setting linknames here is a bad hack. | ||
10056 | - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
10057 | - # The linker will automatically build a .lib file if we build a DLL. | ||
10058 | - old_archive_from_new_cmds='true' | ||
10059 | - # FIXME: Should let the user specify the lib program. | ||
10060 | - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
10061 | - fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
10062 | - enable_shared_with_static_runtimes=yes | ||
10063 | + case $cc_basename in | ||
10064 | + cl*) | ||
10065 | + # Native MSVC | ||
10066 | + hardcode_libdir_flag_spec=' ' | ||
10067 | + allow_undefined_flag=unsupported | ||
10068 | + always_export_symbols=yes | ||
10069 | + file_list_spec='@' | ||
10070 | + # Tell ltmain to make .lib files, not .a files. | ||
10071 | + libext=lib | ||
10072 | + # Tell ltmain to make .dll files, not .so files. | ||
10073 | + shrext_cmds=".dll" | ||
10074 | + # FIXME: Setting linknames here is a bad hack. | ||
10075 | + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
10076 | + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
10077 | + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
10078 | + else | ||
10079 | + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
10080 | + fi~ | ||
10081 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
10082 | + linknames=' | ||
10083 | + # The linker will not automatically build a static lib if we build a DLL. | ||
10084 | + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' | ||
10085 | + enable_shared_with_static_runtimes=yes | ||
10086 | + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
10087 | + # Don't use ranlib | ||
10088 | + old_postinstall_cmds='chmod 644 $oldlib' | ||
10089 | + postlink_cmds='lt_outputfile="@OUTPUT@"~ | ||
10090 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
10091 | + case $lt_outputfile in | ||
10092 | + *.exe|*.EXE) ;; | ||
10093 | + *) | ||
10094 | + lt_outputfile="$lt_outputfile.exe" | ||
10095 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
10096 | + ;; | ||
10097 | + esac~ | ||
10098 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
10099 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
10100 | + $RM "$lt_outputfile.manifest"; | ||
10101 | + fi' | ||
10102 | + ;; | ||
10103 | + *) | ||
10104 | + # Assume MSVC wrapper | ||
10105 | + hardcode_libdir_flag_spec=' ' | ||
10106 | + allow_undefined_flag=unsupported | ||
10107 | + # Tell ltmain to make .lib files, not .a files. | ||
10108 | + libext=lib | ||
10109 | + # Tell ltmain to make .dll files, not .so files. | ||
10110 | + shrext_cmds=".dll" | ||
10111 | + # FIXME: Setting linknames here is a bad hack. | ||
10112 | + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
10113 | + # The linker will automatically build a .lib file if we build a DLL. | ||
10114 | + old_archive_from_new_cmds='true' | ||
10115 | + # FIXME: Should let the user specify the lib program. | ||
10116 | + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
10117 | + enable_shared_with_static_runtimes=yes | ||
10118 | + ;; | ||
10119 | + esac | ||
10120 | ;; | ||
10121 | |||
10122 | darwin* | rhapsody*) | ||
10123 | @@ -9393,7 +9976,7 @@ | ||
10124 | |||
10125 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
10126 | freebsd* | dragonfly*) | ||
10127 | - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
10128 | + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
10129 | hardcode_libdir_flag_spec='-R$libdir' | ||
10130 | hardcode_direct=yes | ||
10131 | hardcode_shlibpath_var=no | ||
10132 | @@ -9401,7 +9984,7 @@ | ||
10133 | |||
10134 | hpux9*) | ||
10135 | if test "$GCC" = yes; then | ||
10136 | - 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' | ||
10137 | + 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' | ||
10138 | else | ||
10139 | 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' | ||
10140 | fi | ||
10141 | @@ -9417,7 +10000,7 @@ | ||
10142 | |||
10143 | hpux10*) | ||
10144 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
10145 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
10146 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
10147 | else | ||
10148 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
10149 | fi | ||
10150 | @@ -9441,10 +10024,10 @@ | ||
10151 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
10152 | ;; | ||
10153 | ia64*) | ||
10154 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
10155 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
10156 | ;; | ||
10157 | *) | ||
10158 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
10159 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
10160 | ;; | ||
10161 | esac | ||
10162 | else | ||
10163 | @@ -9523,23 +10106,36 @@ | ||
10164 | |||
10165 | irix5* | irix6* | nonstopux*) | ||
10166 | if test "$GCC" = yes; then | ||
10167 | - 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' | ||
10168 | + 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' | ||
10169 | # Try to use the -exported_symbol ld option, if it does not | ||
10170 | # work, assume that -exports_file does not work either and | ||
10171 | # implicitly export all symbols. | ||
10172 | - save_LDFLAGS="$LDFLAGS" | ||
10173 | - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
10174 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
10175 | + # This should be the same for all languages, so no per-tag cache variable. | ||
10176 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 | ||
10177 | +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } | ||
10178 | +if test "${lt_cv_irix_exported_symbol+set}" = set; then : | ||
10179 | + $as_echo_n "(cached) " >&6 | ||
10180 | +else | ||
10181 | + save_LDFLAGS="$LDFLAGS" | ||
10182 | + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
10183 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
10184 | /* end confdefs.h. */ | ||
10185 | -int foo(void) {} | ||
10186 | +int foo (void) { return 0; } | ||
10187 | _ACEOF | ||
10188 | if ac_fn_c_try_link "$LINENO"; then : | ||
10189 | - 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' | ||
10190 | - | ||
10191 | + lt_cv_irix_exported_symbol=yes | ||
10192 | +else | ||
10193 | + lt_cv_irix_exported_symbol=no | ||
10194 | fi | ||
10195 | rm -f core conftest.err conftest.$ac_objext \ | ||
10196 | conftest$ac_exeext conftest.$ac_ext | ||
10197 | - LDFLAGS="$save_LDFLAGS" | ||
10198 | + LDFLAGS="$save_LDFLAGS" | ||
10199 | +fi | ||
10200 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 | ||
10201 | +$as_echo "$lt_cv_irix_exported_symbol" >&6; } | ||
10202 | + if test "$lt_cv_irix_exported_symbol" = yes; then | ||
10203 | + 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' | ||
10204 | + fi | ||
10205 | else | ||
10206 | 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' | ||
10207 | 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' | ||
10208 | @@ -9624,7 +10220,7 @@ | ||
10209 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
10210 | if test "$GCC" = yes; then | ||
10211 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
10212 | - 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' | ||
10213 | + 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' | ||
10214 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
10215 | else | ||
10216 | allow_undefined_flag=' -expect_unresolved \*' | ||
10217 | @@ -9643,9 +10239,9 @@ | ||
10218 | no_undefined_flag=' -z defs' | ||
10219 | if test "$GCC" = yes; then | ||
10220 | wlarc='${wl}' | ||
10221 | - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
10222 | + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
10223 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
10224 | - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
10225 | + $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' | ||
10226 | else | ||
10227 | case `$CC -V 2>&1` in | ||
10228 | *"Compilers 5.0"*) | ||
10229 | @@ -10221,8 +10817,9 @@ | ||
10230 | need_version=no | ||
10231 | need_lib_prefix=no | ||
10232 | |||
10233 | - case $GCC,$host_os in | ||
10234 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
10235 | + case $GCC,$cc_basename in | ||
10236 | + yes,*) | ||
10237 | + # gcc | ||
10238 | library_names_spec='$libname.dll.a' | ||
10239 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
10240 | postinstall_cmds='base_file=`basename \${file}`~ | ||
10241 | @@ -10255,13 +10852,71 @@ | ||
10242 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
10243 | ;; | ||
10244 | esac | ||
10245 | + dynamic_linker='Win32 ld.exe' | ||
10246 | + ;; | ||
10247 | + | ||
10248 | + *,cl*) | ||
10249 | + # Native MSVC | ||
10250 | + libname_spec='$name' | ||
10251 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
10252 | + library_names_spec='${libname}.dll.lib' | ||
10253 | + | ||
10254 | + case $build_os in | ||
10255 | + mingw*) | ||
10256 | + sys_lib_search_path_spec= | ||
10257 | + lt_save_ifs=$IFS | ||
10258 | + IFS=';' | ||
10259 | + for lt_path in $LIB | ||
10260 | + do | ||
10261 | + IFS=$lt_save_ifs | ||
10262 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
10263 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
10264 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
10265 | + done | ||
10266 | + IFS=$lt_save_ifs | ||
10267 | + # Convert to MSYS style. | ||
10268 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
10269 | + ;; | ||
10270 | + cygwin*) | ||
10271 | + # Convert to unix form, then to dos form, then back to unix form | ||
10272 | + # but this time dos style (no spaces!) so that the unix form looks | ||
10273 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
10274 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
10275 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
10276 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
10277 | + ;; | ||
10278 | + *) | ||
10279 | + sys_lib_search_path_spec="$LIB" | ||
10280 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
10281 | + # It is most probably a Windows format PATH. | ||
10282 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
10283 | + else | ||
10284 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
10285 | + fi | ||
10286 | + # FIXME: find the short name or the path components, as spaces are | ||
10287 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
10288 | + ;; | ||
10289 | + esac | ||
10290 | + | ||
10291 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
10292 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
10293 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
10294 | + dldir=$destdir/`dirname \$dlpath`~ | ||
10295 | + test -d \$dldir || mkdir -p \$dldir~ | ||
10296 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
10297 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
10298 | + dlpath=$dir/\$dldll~ | ||
10299 | + $RM \$dlpath' | ||
10300 | + shlibpath_overrides_runpath=yes | ||
10301 | + dynamic_linker='Win32 link.exe' | ||
10302 | ;; | ||
10303 | |||
10304 | *) | ||
10305 | + # Assume MSVC wrapper | ||
10306 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
10307 | + dynamic_linker='Win32 ld.exe' | ||
10308 | ;; | ||
10309 | esac | ||
10310 | - dynamic_linker='Win32 ld.exe' | ||
10311 | # FIXME: first we should search . and the directory the executable is in | ||
10312 | shlibpath_var=PATH | ||
10313 | ;; | ||
10314 | @@ -10353,7 +11008,7 @@ | ||
10315 | soname_spec='${libname}${release}${shared_ext}$major' | ||
10316 | shlibpath_var=LIBRARY_PATH | ||
10317 | shlibpath_overrides_runpath=yes | ||
10318 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
10319 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
10320 | hardcode_into_libs=yes | ||
10321 | ;; | ||
10322 | |||
10323 | @@ -11193,10 +11848,10 @@ | ||
10324 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
10325 | correspondingly for the symbols needed. */ | ||
10326 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
10327 | -void fnord () __attribute__((visibility("default"))); | ||
10328 | +int fnord () __attribute__((visibility("default"))); | ||
10329 | #endif | ||
10330 | |||
10331 | -void fnord () { int i=42; } | ||
10332 | +int fnord () { return 42; } | ||
10333 | int main () | ||
10334 | { | ||
10335 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
10336 | @@ -11299,10 +11954,10 @@ | ||
10337 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
10338 | correspondingly for the symbols needed. */ | ||
10339 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
10340 | -void fnord () __attribute__((visibility("default"))); | ||
10341 | +int fnord () __attribute__((visibility("default"))); | ||
10342 | #endif | ||
10343 | |||
10344 | -void fnord () { int i=42; } | ||
10345 | +int fnord () { return 42; } | ||
10346 | int main () | ||
10347 | { | ||
10348 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
10349 | @@ -12415,7 +13070,7 @@ | ||
10350 | # since libbfd may not pull in the entirety of libiberty. | ||
10351 | x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` | ||
10352 | if test -n "$x"; then | ||
10353 | - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" | ||
10354 | + SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" | ||
10355 | fi | ||
10356 | |||
10357 | case "${host}" in | ||
10358 | @@ -13387,13 +14042,20 @@ | ||
10359 | lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' | ||
10360 | lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' | ||
10361 | lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' | ||
10362 | +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
10363 | +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
10364 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' | ||
10365 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' | ||
10366 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' | ||
10367 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' | ||
10368 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' | ||
10369 | +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' | ||
10370 | +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' | ||
10371 | +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' | ||
10372 | +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' | ||
10373 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' | ||
10374 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' | ||
10375 | +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' | ||
10376 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' | ||
10377 | RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' | ||
10378 | old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' | ||
10379 | @@ -13408,14 +14070,17 @@ | ||
10380 | lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' | ||
10381 | lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' | ||
10382 | 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"`' | ||
10383 | +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
10384 | +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' | ||
10385 | objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' | ||
10386 | MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' | ||
10387 | lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' | ||
10388 | -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
10389 | lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' | ||
10390 | +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
10391 | lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' | ||
10392 | lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' | ||
10393 | need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' | ||
10394 | +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' | ||
10395 | DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' | ||
10396 | NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' | ||
10397 | LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' | ||
10398 | @@ -13448,12 +14113,12 @@ | ||
10399 | hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' | ||
10400 | inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' | ||
10401 | link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' | ||
10402 | -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' | ||
10403 | always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' | ||
10404 | export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' | ||
10405 | exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' | ||
10406 | include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' | ||
10407 | prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' | ||
10408 | +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' | ||
10409 | file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
10410 | variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' | ||
10411 | need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' | ||
10412 | @@ -13508,8 +14173,13 @@ | ||
10413 | OBJDUMP \ | ||
10414 | deplibs_check_method \ | ||
10415 | file_magic_cmd \ | ||
10416 | +file_magic_glob \ | ||
10417 | +want_nocaseglob \ | ||
10418 | +DLLTOOL \ | ||
10419 | +sharedlib_from_linklib_cmd \ | ||
10420 | AR \ | ||
10421 | AR_FLAGS \ | ||
10422 | +archiver_list_spec \ | ||
10423 | STRIP \ | ||
10424 | RANLIB \ | ||
10425 | CC \ | ||
10426 | @@ -13519,12 +14189,14 @@ | ||
10427 | lt_cv_sys_global_symbol_to_cdecl \ | ||
10428 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
10429 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ | ||
10430 | +nm_file_list_spec \ | ||
10431 | lt_prog_compiler_no_builtin_flag \ | ||
10432 | -lt_prog_compiler_wl \ | ||
10433 | lt_prog_compiler_pic \ | ||
10434 | +lt_prog_compiler_wl \ | ||
10435 | lt_prog_compiler_static \ | ||
10436 | lt_cv_prog_compiler_c_o \ | ||
10437 | need_locks \ | ||
10438 | +MANIFEST_TOOL \ | ||
10439 | DSYMUTIL \ | ||
10440 | NMEDIT \ | ||
10441 | LIPO \ | ||
10442 | @@ -13540,7 +14212,6 @@ | ||
10443 | hardcode_libdir_flag_spec \ | ||
10444 | hardcode_libdir_flag_spec_ld \ | ||
10445 | hardcode_libdir_separator \ | ||
10446 | -fix_srcfile_path \ | ||
10447 | exclude_expsyms \ | ||
10448 | include_expsyms \ | ||
10449 | file_list_spec \ | ||
10450 | @@ -13576,6 +14247,7 @@ | ||
10451 | module_expsym_cmds \ | ||
10452 | export_symbols_cmds \ | ||
10453 | prelink_cmds \ | ||
10454 | +postlink_cmds \ | ||
10455 | postinstall_cmds \ | ||
10456 | postuninstall_cmds \ | ||
10457 | finish_cmds \ | ||
10458 | @@ -14332,7 +15004,8 @@ | ||
10459 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
10460 | # | ||
10461 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
10462 | -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
10463 | +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, | ||
10464 | +# Inc. | ||
10465 | # Written by Gordon Matzigkeit, 1996 | ||
10466 | # | ||
10467 | # This file is part of GNU Libtool. | ||
10468 | @@ -14435,19 +15108,42 @@ | ||
10469 | # turn newlines into spaces. | ||
10470 | NL2SP=$lt_lt_NL2SP | ||
10471 | |||
10472 | +# convert \$build file names to \$host format. | ||
10473 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
10474 | + | ||
10475 | +# convert \$build files to toolchain format. | ||
10476 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
10477 | + | ||
10478 | # An object symbol dumper. | ||
10479 | OBJDUMP=$lt_OBJDUMP | ||
10480 | |||
10481 | # Method to check whether dependent libraries are shared objects. | ||
10482 | deplibs_check_method=$lt_deplibs_check_method | ||
10483 | |||
10484 | -# Command to use when deplibs_check_method == "file_magic". | ||
10485 | +# Command to use when deplibs_check_method = "file_magic". | ||
10486 | file_magic_cmd=$lt_file_magic_cmd | ||
10487 | |||
10488 | +# How to find potential files when deplibs_check_method = "file_magic". | ||
10489 | +file_magic_glob=$lt_file_magic_glob | ||
10490 | + | ||
10491 | +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". | ||
10492 | +want_nocaseglob=$lt_want_nocaseglob | ||
10493 | + | ||
10494 | +# DLL creation program. | ||
10495 | +DLLTOOL=$lt_DLLTOOL | ||
10496 | + | ||
10497 | +# Command to associate shared and link libraries. | ||
10498 | +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd | ||
10499 | + | ||
10500 | # The archiver. | ||
10501 | AR=$lt_AR | ||
10502 | + | ||
10503 | +# Flags to create an archive. | ||
10504 | AR_FLAGS=$lt_AR_FLAGS | ||
10505 | |||
10506 | +# How to feed a file listing to the archiver. | ||
10507 | +archiver_list_spec=$lt_archiver_list_spec | ||
10508 | + | ||
10509 | # A symbol stripping program. | ||
10510 | STRIP=$lt_STRIP | ||
10511 | |||
10512 | @@ -14477,6 +15173,12 @@ | ||
10513 | # Transform the output of nm in a C name address pair when lib prefix is needed. | ||
10514 | global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix | ||
10515 | |||
10516 | +# Specify filename containing input files for \$NM. | ||
10517 | +nm_file_list_spec=$lt_nm_file_list_spec | ||
10518 | + | ||
10519 | +# The root where to search for dependent libraries,and in which our libraries should be installed. | ||
10520 | +lt_sysroot=$lt_sysroot | ||
10521 | + | ||
10522 | # The name of the directory that contains temporary libtool files. | ||
10523 | objdir=$objdir | ||
10524 | |||
10525 | @@ -14486,6 +15188,9 @@ | ||
10526 | # Must we lock files when doing compilation? | ||
10527 | need_locks=$lt_need_locks | ||
10528 | |||
10529 | +# Manifest tool. | ||
10530 | +MANIFEST_TOOL=$lt_MANIFEST_TOOL | ||
10531 | + | ||
10532 | # Tool to manipulate archived DWARF debug symbol files on Mac OS X. | ||
10533 | DSYMUTIL=$lt_DSYMUTIL | ||
10534 | |||
10535 | @@ -14600,12 +15305,12 @@ | ||
10536 | # Compiler flag to turn off builtin functions. | ||
10537 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
10538 | |||
10539 | -# How to pass a linker flag through the compiler. | ||
10540 | -wl=$lt_lt_prog_compiler_wl | ||
10541 | - | ||
10542 | # Additional compiler flags for building library objects. | ||
10543 | pic_flag=$lt_lt_prog_compiler_pic | ||
10544 | |||
10545 | +# How to pass a linker flag through the compiler. | ||
10546 | +wl=$lt_lt_prog_compiler_wl | ||
10547 | + | ||
10548 | # Compiler flag to prevent dynamic linking. | ||
10549 | link_static_flag=$lt_lt_prog_compiler_static | ||
10550 | |||
10551 | @@ -14692,9 +15397,6 @@ | ||
10552 | # Whether libtool must link a program against all its dependency libraries. | ||
10553 | link_all_deplibs=$link_all_deplibs | ||
10554 | |||
10555 | -# Fix the shell variable \$srcfile for the compiler. | ||
10556 | -fix_srcfile_path=$lt_fix_srcfile_path | ||
10557 | - | ||
10558 | # Set to "yes" if exported symbols are required. | ||
10559 | always_export_symbols=$always_export_symbols | ||
10560 | |||
10561 | @@ -14710,6 +15412,9 @@ | ||
10562 | # Commands necessary for linking programs (against libraries) with templates. | ||
10563 | prelink_cmds=$lt_prelink_cmds | ||
10564 | |||
10565 | +# Commands necessary for finishing linking programs. | ||
10566 | +postlink_cmds=$lt_postlink_cmds | ||
10567 | + | ||
10568 | # Specify filename containing input files. | ||
10569 | file_list_spec=$lt_file_list_spec | ||
10570 | |||
10571 | @@ -14742,210 +15447,169 @@ | ||
10572 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
10573 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
10574 | # is reportedly fixed, but why not run on old versions too? | ||
10575 | - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | ||
10576 | - || (rm -f "$cfgfile"; exit 1) | ||
10577 | - | ||
10578 | - case $xsi_shell in | ||
10579 | - yes) | ||
10580 | - cat << \_LT_EOF >> "$cfgfile" | ||
10581 | - | ||
10582 | -# func_dirname file append nondir_replacement | ||
10583 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
10584 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
10585 | -func_dirname () | ||
10586 | -{ | ||
10587 | - case ${1} in | ||
10588 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
10589 | - * ) func_dirname_result="${3}" ;; | ||
10590 | - esac | ||
10591 | -} | ||
10592 | - | ||
10593 | -# func_basename file | ||
10594 | -func_basename () | ||
10595 | -{ | ||
10596 | - func_basename_result="${1##*/}" | ||
10597 | -} | ||
10598 | - | ||
10599 | -# func_dirname_and_basename file append nondir_replacement | ||
10600 | -# perform func_basename and func_dirname in a single function | ||
10601 | -# call: | ||
10602 | -# dirname: Compute the dirname of FILE. If nonempty, | ||
10603 | -# add APPEND to the result, otherwise set result | ||
10604 | -# to NONDIR_REPLACEMENT. | ||
10605 | -# value returned in "$func_dirname_result" | ||
10606 | -# basename: Compute filename of FILE. | ||
10607 | -# value retuned in "$func_basename_result" | ||
10608 | -# Implementation must be kept synchronized with func_dirname | ||
10609 | -# and func_basename. For efficiency, we do not delegate to | ||
10610 | -# those functions but instead duplicate the functionality here. | ||
10611 | -func_dirname_and_basename () | ||
10612 | -{ | ||
10613 | - case ${1} in | ||
10614 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
10615 | - * ) func_dirname_result="${3}" ;; | ||
10616 | - esac | ||
10617 | - func_basename_result="${1##*/}" | ||
10618 | -} | ||
10619 | - | ||
10620 | -# func_stripname prefix suffix name | ||
10621 | -# strip PREFIX and SUFFIX off of NAME. | ||
10622 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
10623 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
10624 | -# dot (in which case that matches only a dot). | ||
10625 | -func_stripname () | ||
10626 | -{ | ||
10627 | - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
10628 | - # positional parameters, so assign one to ordinary parameter first. | ||
10629 | - func_stripname_result=${3} | ||
10630 | - func_stripname_result=${func_stripname_result#"${1}"} | ||
10631 | - func_stripname_result=${func_stripname_result%"${2}"} | ||
10632 | -} | ||
10633 | - | ||
10634 | -# func_opt_split | ||
10635 | -func_opt_split () | ||
10636 | -{ | ||
10637 | - func_opt_split_opt=${1%%=*} | ||
10638 | - func_opt_split_arg=${1#*=} | ||
10639 | -} | ||
10640 | - | ||
10641 | -# func_lo2o object | ||
10642 | -func_lo2o () | ||
10643 | -{ | ||
10644 | - case ${1} in | ||
10645 | - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
10646 | - *) func_lo2o_result=${1} ;; | ||
10647 | - esac | ||
10648 | -} | ||
10649 | - | ||
10650 | -# func_xform libobj-or-source | ||
10651 | -func_xform () | ||
10652 | -{ | ||
10653 | - func_xform_result=${1%.*}.lo | ||
10654 | -} | ||
10655 | - | ||
10656 | -# func_arith arithmetic-term... | ||
10657 | -func_arith () | ||
10658 | -{ | ||
10659 | - func_arith_result=$(( $* )) | ||
10660 | -} | ||
10661 | - | ||
10662 | -# func_len string | ||
10663 | -# STRING may not start with a hyphen. | ||
10664 | -func_len () | ||
10665 | -{ | ||
10666 | - func_len_result=${#1} | ||
10667 | -} | ||
10668 | - | ||
10669 | -_LT_EOF | ||
10670 | - ;; | ||
10671 | - *) # Bourne compatible functions. | ||
10672 | - cat << \_LT_EOF >> "$cfgfile" | ||
10673 | - | ||
10674 | -# func_dirname file append nondir_replacement | ||
10675 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
10676 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
10677 | -func_dirname () | ||
10678 | -{ | ||
10679 | - # Extract subdirectory from the argument. | ||
10680 | - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | ||
10681 | - if test "X$func_dirname_result" = "X${1}"; then | ||
10682 | - func_dirname_result="${3}" | ||
10683 | - else | ||
10684 | - func_dirname_result="$func_dirname_result${2}" | ||
10685 | - fi | ||
10686 | -} | ||
10687 | - | ||
10688 | -# func_basename file | ||
10689 | -func_basename () | ||
10690 | -{ | ||
10691 | - func_basename_result=`$ECHO "${1}" | $SED "$basename"` | ||
10692 | -} | ||
10693 | - | ||
10694 | - | ||
10695 | -# func_stripname prefix suffix name | ||
10696 | -# strip PREFIX and SUFFIX off of NAME. | ||
10697 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
10698 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
10699 | -# dot (in which case that matches only a dot). | ||
10700 | -# func_strip_suffix prefix name | ||
10701 | -func_stripname () | ||
10702 | -{ | ||
10703 | - case ${2} in | ||
10704 | - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
10705 | - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
10706 | - esac | ||
10707 | -} | ||
10708 | - | ||
10709 | -# sed scripts: | ||
10710 | -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' | ||
10711 | -my_sed_long_arg='1s/^-[^=]*=//' | ||
10712 | - | ||
10713 | -# func_opt_split | ||
10714 | -func_opt_split () | ||
10715 | -{ | ||
10716 | - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` | ||
10717 | - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` | ||
10718 | -} | ||
10719 | - | ||
10720 | -# func_lo2o object | ||
10721 | -func_lo2o () | ||
10722 | -{ | ||
10723 | - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | ||
10724 | -} | ||
10725 | - | ||
10726 | -# func_xform libobj-or-source | ||
10727 | -func_xform () | ||
10728 | -{ | ||
10729 | - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | ||
10730 | -} | ||
10731 | - | ||
10732 | -# func_arith arithmetic-term... | ||
10733 | -func_arith () | ||
10734 | -{ | ||
10735 | - func_arith_result=`expr "$@"` | ||
10736 | -} | ||
10737 | - | ||
10738 | -# func_len string | ||
10739 | -# STRING may not start with a hyphen. | ||
10740 | -func_len () | ||
10741 | -{ | ||
10742 | - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` | ||
10743 | -} | ||
10744 | - | ||
10745 | -_LT_EOF | ||
10746 | -esac | ||
10747 | - | ||
10748 | -case $lt_shell_append in | ||
10749 | - yes) | ||
10750 | - cat << \_LT_EOF >> "$cfgfile" | ||
10751 | - | ||
10752 | -# func_append var value | ||
10753 | -# Append VALUE to the end of shell variable VAR. | ||
10754 | -func_append () | ||
10755 | -{ | ||
10756 | - eval "$1+=\$2" | ||
10757 | -} | ||
10758 | -_LT_EOF | ||
10759 | - ;; | ||
10760 | - *) | ||
10761 | - cat << \_LT_EOF >> "$cfgfile" | ||
10762 | - | ||
10763 | -# func_append var value | ||
10764 | -# Append VALUE to the end of shell variable VAR. | ||
10765 | -func_append () | ||
10766 | -{ | ||
10767 | - eval "$1=\$$1\$2" | ||
10768 | -} | ||
10769 | - | ||
10770 | -_LT_EOF | ||
10771 | - ;; | ||
10772 | - esac | ||
10773 | + sed '$q' "$ltmain" >> "$cfgfile" \ | ||
10774 | + || (rm -f "$cfgfile"; exit 1) | ||
10775 | |||
10776 | + if test x"$xsi_shell" = xyes; then | ||
10777 | + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ | ||
10778 | +func_dirname ()\ | ||
10779 | +{\ | ||
10780 | +\ case ${1} in\ | ||
10781 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
10782 | +\ * ) func_dirname_result="${3}" ;;\ | ||
10783 | +\ esac\ | ||
10784 | +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10785 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10786 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10787 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10788 | + | ||
10789 | + | ||
10790 | + sed -e '/^func_basename ()$/,/^} # func_basename /c\ | ||
10791 | +func_basename ()\ | ||
10792 | +{\ | ||
10793 | +\ func_basename_result="${1##*/}"\ | ||
10794 | +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10795 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10796 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10797 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10798 | + | ||
10799 | + | ||
10800 | + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ | ||
10801 | +func_dirname_and_basename ()\ | ||
10802 | +{\ | ||
10803 | +\ case ${1} in\ | ||
10804 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
10805 | +\ * ) func_dirname_result="${3}" ;;\ | ||
10806 | +\ esac\ | ||
10807 | +\ func_basename_result="${1##*/}"\ | ||
10808 | +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10809 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10810 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10811 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10812 | + | ||
10813 | + | ||
10814 | + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ | ||
10815 | +func_stripname ()\ | ||
10816 | +{\ | ||
10817 | +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ | ||
10818 | +\ # positional parameters, so assign one to ordinary parameter first.\ | ||
10819 | +\ func_stripname_result=${3}\ | ||
10820 | +\ func_stripname_result=${func_stripname_result#"${1}"}\ | ||
10821 | +\ func_stripname_result=${func_stripname_result%"${2}"}\ | ||
10822 | +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10823 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10824 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10825 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10826 | + | ||
10827 | + | ||
10828 | + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ | ||
10829 | +func_split_long_opt ()\ | ||
10830 | +{\ | ||
10831 | +\ func_split_long_opt_name=${1%%=*}\ | ||
10832 | +\ func_split_long_opt_arg=${1#*=}\ | ||
10833 | +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10834 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10835 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10836 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10837 | + | ||
10838 | + | ||
10839 | + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ | ||
10840 | +func_split_short_opt ()\ | ||
10841 | +{\ | ||
10842 | +\ func_split_short_opt_arg=${1#??}\ | ||
10843 | +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ | ||
10844 | +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10845 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10846 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10847 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10848 | + | ||
10849 | + | ||
10850 | + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ | ||
10851 | +func_lo2o ()\ | ||
10852 | +{\ | ||
10853 | +\ case ${1} in\ | ||
10854 | +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ | ||
10855 | +\ *) func_lo2o_result=${1} ;;\ | ||
10856 | +\ esac\ | ||
10857 | +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10858 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10859 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10860 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10861 | + | ||
10862 | + | ||
10863 | + sed -e '/^func_xform ()$/,/^} # func_xform /c\ | ||
10864 | +func_xform ()\ | ||
10865 | +{\ | ||
10866 | + func_xform_result=${1%.*}.lo\ | ||
10867 | +} # Extended-shell func_xform 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_arith ()$/,/^} # func_arith /c\ | ||
10874 | +func_arith ()\ | ||
10875 | +{\ | ||
10876 | + func_arith_result=$(( $* ))\ | ||
10877 | +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10878 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10879 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10880 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10881 | + | ||
10882 | + | ||
10883 | + sed -e '/^func_len ()$/,/^} # func_len /c\ | ||
10884 | +func_len ()\ | ||
10885 | +{\ | ||
10886 | + func_len_result=${#1}\ | ||
10887 | +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10888 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10889 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10890 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10891 | + | ||
10892 | +fi | ||
10893 | + | ||
10894 | +if test x"$lt_shell_append" = xyes; then | ||
10895 | + sed -e '/^func_append ()$/,/^} # func_append /c\ | ||
10896 | +func_append ()\ | ||
10897 | +{\ | ||
10898 | + eval "${1}+=\\${2}"\ | ||
10899 | +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10900 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10901 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10902 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10903 | + | ||
10904 | + | ||
10905 | + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ | ||
10906 | +func_append_quoted ()\ | ||
10907 | +{\ | ||
10908 | +\ func_quote_for_eval "${2}"\ | ||
10909 | +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ | ||
10910 | +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ | ||
10911 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10912 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10913 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
10914 | + | ||
10915 | + | ||
10916 | + # Save a `func_append' function call where possible by direct use of '+=' | ||
10917 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
10918 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10919 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10920 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
10921 | +else | ||
10922 | + # Save a `func_append' function call even when '+=' is not available | ||
10923 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | ||
10924 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
10925 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
10926 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
10927 | +fi | ||
10928 | + | ||
10929 | +if test x"$_lt_function_replace_fail" = x":"; then | ||
10930 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 | ||
10931 | +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} | ||
10932 | +fi | ||
10933 | |||
10934 | - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ | ||
10935 | - || (rm -f "$cfgfile"; exit 1) | ||
10936 | |||
10937 | - mv -f "$cfgfile" "$ofile" || | ||
10938 | + mv -f "$cfgfile" "$ofile" || | ||
10939 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
10940 | chmod +x "$ofile" | ||
10941 | |||
10942 | Index: binutils-2.24/binutils/configure | ||
10943 | =================================================================== | ||
10944 | --- binutils-2.24.orig/binutils/configure 2013-11-04 07:33:37.000000000 -0800 | ||
10945 | +++ binutils-2.24/binutils/configure 2013-12-15 11:10:23.877118697 -0800 | ||
10946 | @@ -655,8 +655,11 @@ | ||
10947 | LIPO | ||
10948 | NMEDIT | ||
10949 | DSYMUTIL | ||
10950 | +MANIFEST_TOOL | ||
10951 | RANLIB | ||
10952 | +ac_ct_AR | ||
10953 | AR | ||
10954 | +DLLTOOL | ||
10955 | OBJDUMP | ||
10956 | LN_S | ||
10957 | NM | ||
10958 | @@ -769,6 +772,7 @@ | ||
10959 | with_pic | ||
10960 | enable_fast_install | ||
10961 | with_gnu_ld | ||
10962 | +with_libtool_sysroot | ||
10963 | enable_libtool_lock | ||
10964 | enable_targets | ||
10965 | enable_deterministic_archives | ||
10966 | @@ -1434,6 +1438,8 @@ | ||
10967 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
10968 | both] | ||
10969 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
10970 | + --with-libtool-sysroot=DIR Search for dependent libraries within DIR | ||
10971 | + (or the compiler's sysroot if not specified). | ||
10972 | --with-zlib include zlib support (auto/yes/no) default=auto | ||
10973 | --with-gnu-ld assume the C compiler uses GNU ld default=no | ||
10974 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | ||
10975 | @@ -5152,8 +5158,8 @@ | ||
10976 | |||
10977 | |||
10978 | |||
10979 | -macro_version='2.2.7a' | ||
10980 | -macro_revision='1.3134' | ||
10981 | +macro_version='2.4' | ||
10982 | +macro_revision='1.3293' | ||
10983 | |||
10984 | |||
10985 | |||
10986 | @@ -5193,7 +5199,7 @@ | ||
10987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | ||
10988 | $as_echo_n "checking how to print strings... " >&6; } | ||
10989 | # Test print first, because it will be a builtin if present. | ||
10990 | -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | ||
10991 | +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
10992 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
10993 | ECHO='print -r --' | ||
10994 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
10995 | @@ -5879,8 +5885,8 @@ | ||
10996 | # Try some XSI features | ||
10997 | xsi_shell=no | ||
10998 | ( _lt_dummy="a/b/c" | ||
10999 | - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | ||
11000 | - = c,a/b,, \ | ||
11001 | + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
11002 | + = c,a/b,b/c, \ | ||
11003 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
11004 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
11005 | && xsi_shell=yes | ||
11006 | @@ -5929,6 +5935,80 @@ | ||
11007 | |||
11008 | |||
11009 | |||
11010 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 | ||
11011 | +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } | ||
11012 | +if test "${lt_cv_to_host_file_cmd+set}" = set; then : | ||
11013 | + $as_echo_n "(cached) " >&6 | ||
11014 | +else | ||
11015 | + case $host in | ||
11016 | + *-*-mingw* ) | ||
11017 | + case $build in | ||
11018 | + *-*-mingw* ) # actually msys | ||
11019 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
11020 | + ;; | ||
11021 | + *-*-cygwin* ) | ||
11022 | + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
11023 | + ;; | ||
11024 | + * ) # otherwise, assume *nix | ||
11025 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
11026 | + ;; | ||
11027 | + esac | ||
11028 | + ;; | ||
11029 | + *-*-cygwin* ) | ||
11030 | + case $build in | ||
11031 | + *-*-mingw* ) # actually msys | ||
11032 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
11033 | + ;; | ||
11034 | + *-*-cygwin* ) | ||
11035 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
11036 | + ;; | ||
11037 | + * ) # otherwise, assume *nix | ||
11038 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
11039 | + ;; | ||
11040 | + esac | ||
11041 | + ;; | ||
11042 | + * ) # unhandled hosts (and "normal" native builds) | ||
11043 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
11044 | + ;; | ||
11045 | +esac | ||
11046 | + | ||
11047 | +fi | ||
11048 | + | ||
11049 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
11050 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 | ||
11051 | +$as_echo "$lt_cv_to_host_file_cmd" >&6; } | ||
11052 | + | ||
11053 | + | ||
11054 | + | ||
11055 | + | ||
11056 | + | ||
11057 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 | ||
11058 | +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } | ||
11059 | +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : | ||
11060 | + $as_echo_n "(cached) " >&6 | ||
11061 | +else | ||
11062 | + #assume ordinary cross tools, or native build. | ||
11063 | +lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
11064 | +case $host in | ||
11065 | + *-*-mingw* ) | ||
11066 | + case $build in | ||
11067 | + *-*-mingw* ) # actually msys | ||
11068 | + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
11069 | + ;; | ||
11070 | + esac | ||
11071 | + ;; | ||
11072 | +esac | ||
11073 | + | ||
11074 | +fi | ||
11075 | + | ||
11076 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
11077 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 | ||
11078 | +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } | ||
11079 | + | ||
11080 | + | ||
11081 | + | ||
11082 | + | ||
11083 | + | ||
11084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 | ||
11085 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | ||
11086 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | ||
11087 | @@ -5945,6 +6025,11 @@ | ||
11088 | esac | ||
11089 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
11090 | case $host_os in | ||
11091 | + cygwin* | mingw* | pw32* | cegcc*) | ||
11092 | + if test "$GCC" != yes; then | ||
11093 | + reload_cmds=false | ||
11094 | + fi | ||
11095 | + ;; | ||
11096 | darwin*) | ||
11097 | if test "$GCC" = yes; then | ||
11098 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
11099 | @@ -6113,7 +6198,8 @@ | ||
11100 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
11101 | lt_cv_file_magic_cmd='func_win32_libid' | ||
11102 | else | ||
11103 | - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
11104 | + # Keep this pattern in sync with the one in func_win32_libid. | ||
11105 | + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
11106 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
11107 | fi | ||
11108 | ;; | ||
11109 | @@ -6267,6 +6353,21 @@ | ||
11110 | fi | ||
11111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 | ||
11112 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | ||
11113 | + | ||
11114 | +file_magic_glob= | ||
11115 | +want_nocaseglob=no | ||
11116 | +if test "$build" = "$host"; then | ||
11117 | + case $host_os in | ||
11118 | + mingw* | pw32*) | ||
11119 | + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
11120 | + want_nocaseglob=yes | ||
11121 | + else | ||
11122 | + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` | ||
11123 | + fi | ||
11124 | + ;; | ||
11125 | + esac | ||
11126 | +fi | ||
11127 | + | ||
11128 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
11129 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
11130 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
11131 | @@ -6282,9 +6383,162 @@ | ||
11132 | |||
11133 | |||
11134 | |||
11135 | + | ||
11136 | + | ||
11137 | + | ||
11138 | + | ||
11139 | + | ||
11140 | + | ||
11141 | + | ||
11142 | + | ||
11143 | + | ||
11144 | + | ||
11145 | if test -n "$ac_tool_prefix"; then | ||
11146 | - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
11147 | -set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
11148 | + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
11149 | +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
11150 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
11151 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
11152 | +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | ||
11153 | + $as_echo_n "(cached) " >&6 | ||
11154 | +else | ||
11155 | + if test -n "$DLLTOOL"; then | ||
11156 | + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
11157 | +else | ||
11158 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
11159 | +for as_dir in $PATH | ||
11160 | +do | ||
11161 | + IFS=$as_save_IFS | ||
11162 | + test -z "$as_dir" && as_dir=. | ||
11163 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
11164 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
11165 | + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
11166 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
11167 | + break 2 | ||
11168 | + fi | ||
11169 | +done | ||
11170 | + done | ||
11171 | +IFS=$as_save_IFS | ||
11172 | + | ||
11173 | +fi | ||
11174 | +fi | ||
11175 | +DLLTOOL=$ac_cv_prog_DLLTOOL | ||
11176 | +if test -n "$DLLTOOL"; then | ||
11177 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 | ||
11178 | +$as_echo "$DLLTOOL" >&6; } | ||
11179 | +else | ||
11180 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
11181 | +$as_echo "no" >&6; } | ||
11182 | +fi | ||
11183 | + | ||
11184 | + | ||
11185 | +fi | ||
11186 | +if test -z "$ac_cv_prog_DLLTOOL"; then | ||
11187 | + ac_ct_DLLTOOL=$DLLTOOL | ||
11188 | + # Extract the first word of "dlltool", so it can be a program name with args. | ||
11189 | +set dummy dlltool; ac_word=$2 | ||
11190 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
11191 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
11192 | +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | ||
11193 | + $as_echo_n "(cached) " >&6 | ||
11194 | +else | ||
11195 | + if test -n "$ac_ct_DLLTOOL"; then | ||
11196 | + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
11197 | +else | ||
11198 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
11199 | +for as_dir in $PATH | ||
11200 | +do | ||
11201 | + IFS=$as_save_IFS | ||
11202 | + test -z "$as_dir" && as_dir=. | ||
11203 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
11204 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
11205 | + ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
11206 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
11207 | + break 2 | ||
11208 | + fi | ||
11209 | +done | ||
11210 | + done | ||
11211 | +IFS=$as_save_IFS | ||
11212 | + | ||
11213 | +fi | ||
11214 | +fi | ||
11215 | +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
11216 | +if test -n "$ac_ct_DLLTOOL"; then | ||
11217 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 | ||
11218 | +$as_echo "$ac_ct_DLLTOOL" >&6; } | ||
11219 | +else | ||
11220 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
11221 | +$as_echo "no" >&6; } | ||
11222 | +fi | ||
11223 | + | ||
11224 | + if test "x$ac_ct_DLLTOOL" = x; then | ||
11225 | + DLLTOOL="false" | ||
11226 | + else | ||
11227 | + case $cross_compiling:$ac_tool_warned in | ||
11228 | +yes:) | ||
11229 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
11230 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
11231 | +ac_tool_warned=yes ;; | ||
11232 | +esac | ||
11233 | + DLLTOOL=$ac_ct_DLLTOOL | ||
11234 | + fi | ||
11235 | +else | ||
11236 | + DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
11237 | +fi | ||
11238 | + | ||
11239 | +test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
11240 | + | ||
11241 | + | ||
11242 | + | ||
11243 | + | ||
11244 | + | ||
11245 | + | ||
11246 | + | ||
11247 | + | ||
11248 | + | ||
11249 | + | ||
11250 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 | ||
11251 | +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } | ||
11252 | +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : | ||
11253 | + $as_echo_n "(cached) " >&6 | ||
11254 | +else | ||
11255 | + lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
11256 | + | ||
11257 | +case $host_os in | ||
11258 | +cygwin* | mingw* | pw32* | cegcc*) | ||
11259 | + # two different shell functions defined in ltmain.sh | ||
11260 | + # decide which to use based on capabilities of $DLLTOOL | ||
11261 | + case `$DLLTOOL --help 2>&1` in | ||
11262 | + *--identify-strict*) | ||
11263 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
11264 | + ;; | ||
11265 | + *) | ||
11266 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
11267 | + ;; | ||
11268 | + esac | ||
11269 | + ;; | ||
11270 | +*) | ||
11271 | + # fallback: assume linklib IS sharedlib | ||
11272 | + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
11273 | + ;; | ||
11274 | +esac | ||
11275 | + | ||
11276 | +fi | ||
11277 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 | ||
11278 | +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } | ||
11279 | +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
11280 | +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
11281 | + | ||
11282 | + | ||
11283 | + | ||
11284 | + | ||
11285 | + | ||
11286 | + | ||
11287 | + | ||
11288 | +if test -n "$ac_tool_prefix"; then | ||
11289 | + for ac_prog in ar | ||
11290 | + do | ||
11291 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
11292 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
11293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
11294 | $as_echo_n "checking for $ac_word... " >&6; } | ||
11295 | if test "${ac_cv_prog_AR+set}" = set; then : | ||
11296 | @@ -6300,7 +6554,7 @@ | ||
11297 | test -z "$as_dir" && as_dir=. | ||
11298 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
11299 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
11300 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
11301 | + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | ||
11302 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
11303 | break 2 | ||
11304 | fi | ||
11305 | @@ -6320,11 +6574,15 @@ | ||
11306 | fi | ||
11307 | |||
11308 | |||
11309 | + test -n "$AR" && break | ||
11310 | + done | ||
11311 | fi | ||
11312 | -if test -z "$ac_cv_prog_AR"; then | ||
11313 | +if test -z "$AR"; then | ||
11314 | ac_ct_AR=$AR | ||
11315 | - # Extract the first word of "ar", so it can be a program name with args. | ||
11316 | -set dummy ar; ac_word=$2 | ||
11317 | + for ac_prog in ar | ||
11318 | +do | ||
11319 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
11320 | +set dummy $ac_prog; ac_word=$2 | ||
11321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
11322 | $as_echo_n "checking for $ac_word... " >&6; } | ||
11323 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | ||
11324 | @@ -6340,7 +6598,7 @@ | ||
11325 | test -z "$as_dir" && as_dir=. | ||
11326 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
11327 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
11328 | - ac_cv_prog_ac_ct_AR="ar" | ||
11329 | + ac_cv_prog_ac_ct_AR="$ac_prog" | ||
11330 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
11331 | break 2 | ||
11332 | fi | ||
11333 | @@ -6359,6 +6617,10 @@ | ||
11334 | $as_echo "no" >&6; } | ||
11335 | fi | ||
11336 | |||
11337 | + | ||
11338 | + test -n "$ac_ct_AR" && break | ||
11339 | +done | ||
11340 | + | ||
11341 | if test "x$ac_ct_AR" = x; then | ||
11342 | AR="false" | ||
11343 | else | ||
11344 | @@ -6370,12 +6632,10 @@ | ||
11345 | esac | ||
11346 | AR=$ac_ct_AR | ||
11347 | fi | ||
11348 | -else | ||
11349 | - AR="$ac_cv_prog_AR" | ||
11350 | fi | ||
11351 | |||
11352 | -test -z "$AR" && AR=ar | ||
11353 | -test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
11354 | +: ${AR=ar} | ||
11355 | +: ${AR_FLAGS=cru} | ||
11356 | |||
11357 | |||
11358 | |||
11359 | @@ -6387,6 +6647,64 @@ | ||
11360 | |||
11361 | |||
11362 | |||
11363 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 | ||
11364 | +$as_echo_n "checking for archiver @FILE support... " >&6; } | ||
11365 | +if test "${lt_cv_ar_at_file+set}" = set; then : | ||
11366 | + $as_echo_n "(cached) " >&6 | ||
11367 | +else | ||
11368 | + lt_cv_ar_at_file=no | ||
11369 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
11370 | +/* end confdefs.h. */ | ||
11371 | + | ||
11372 | +int | ||
11373 | +main () | ||
11374 | +{ | ||
11375 | + | ||
11376 | + ; | ||
11377 | + return 0; | ||
11378 | +} | ||
11379 | +_ACEOF | ||
11380 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
11381 | + echo conftest.$ac_objext > conftest.lst | ||
11382 | + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' | ||
11383 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
11384 | + (eval $lt_ar_try) 2>&5 | ||
11385 | + ac_status=$? | ||
11386 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
11387 | + test $ac_status = 0; } | ||
11388 | + if test "$ac_status" -eq 0; then | ||
11389 | + # Ensure the archiver fails upon bogus file names. | ||
11390 | + rm -f conftest.$ac_objext libconftest.a | ||
11391 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
11392 | + (eval $lt_ar_try) 2>&5 | ||
11393 | + ac_status=$? | ||
11394 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
11395 | + test $ac_status = 0; } | ||
11396 | + if test "$ac_status" -ne 0; then | ||
11397 | + lt_cv_ar_at_file=@ | ||
11398 | + fi | ||
11399 | + fi | ||
11400 | + rm -f conftest.* libconftest.a | ||
11401 | + | ||
11402 | +fi | ||
11403 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
11404 | + | ||
11405 | +fi | ||
11406 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 | ||
11407 | +$as_echo "$lt_cv_ar_at_file" >&6; } | ||
11408 | + | ||
11409 | +if test "x$lt_cv_ar_at_file" = xno; then | ||
11410 | + archiver_list_spec= | ||
11411 | +else | ||
11412 | + archiver_list_spec=$lt_cv_ar_at_file | ||
11413 | +fi | ||
11414 | + | ||
11415 | + | ||
11416 | + | ||
11417 | + | ||
11418 | + | ||
11419 | + | ||
11420 | + | ||
11421 | if test -n "$ac_tool_prefix"; then | ||
11422 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | ||
11423 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | ||
11424 | @@ -6721,8 +7039,8 @@ | ||
11425 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
11426 | |||
11427 | # Transform an extracted symbol line into symbol name and symbol address | ||
11428 | -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
11429 | -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'" | ||
11430 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
11431 | +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'" | ||
11432 | |||
11433 | # Handle CRLF in mingw tool chain | ||
11434 | opt_cr= | ||
11435 | @@ -6758,6 +7076,7 @@ | ||
11436 | else | ||
11437 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
11438 | fi | ||
11439 | + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
11440 | |||
11441 | # Check to see that the pipe works correctly. | ||
11442 | pipe_works=no | ||
11443 | @@ -6799,6 +7118,18 @@ | ||
11444 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
11445 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
11446 | cat <<_LT_EOF > conftest.$ac_ext | ||
11447 | +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
11448 | +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
11449 | +/* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
11450 | + relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
11451 | +# define LT_DLSYM_CONST | ||
11452 | +#elif defined(__osf__) | ||
11453 | +/* This system does not cope well with relocations in const data. */ | ||
11454 | +# define LT_DLSYM_CONST | ||
11455 | +#else | ||
11456 | +# define LT_DLSYM_CONST const | ||
11457 | +#endif | ||
11458 | + | ||
11459 | #ifdef __cplusplus | ||
11460 | extern "C" { | ||
11461 | #endif | ||
11462 | @@ -6810,7 +7141,7 @@ | ||
11463 | cat <<_LT_EOF >> conftest.$ac_ext | ||
11464 | |||
11465 | /* The mapping between symbol names and symbols. */ | ||
11466 | -const struct { | ||
11467 | +LT_DLSYM_CONST struct { | ||
11468 | const char *name; | ||
11469 | void *address; | ||
11470 | } | ||
11471 | @@ -6836,8 +7167,8 @@ | ||
11472 | _LT_EOF | ||
11473 | # Now try linking the two files. | ||
11474 | mv conftest.$ac_objext conftstm.$ac_objext | ||
11475 | - lt_save_LIBS="$LIBS" | ||
11476 | - lt_save_CFLAGS="$CFLAGS" | ||
11477 | + lt_globsym_save_LIBS=$LIBS | ||
11478 | + lt_globsym_save_CFLAGS=$CFLAGS | ||
11479 | LIBS="conftstm.$ac_objext" | ||
11480 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
11481 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | ||
11482 | @@ -6847,8 +7178,8 @@ | ||
11483 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | ||
11484 | pipe_works=yes | ||
11485 | fi | ||
11486 | - LIBS="$lt_save_LIBS" | ||
11487 | - CFLAGS="$lt_save_CFLAGS" | ||
11488 | + LIBS=$lt_globsym_save_LIBS | ||
11489 | + CFLAGS=$lt_globsym_save_CFLAGS | ||
11490 | else | ||
11491 | echo "cannot find nm_test_func in $nlist" >&5 | ||
11492 | fi | ||
11493 | @@ -6885,6 +7216,19 @@ | ||
11494 | $as_echo "ok" >&6; } | ||
11495 | fi | ||
11496 | |||
11497 | +# Response file support. | ||
11498 | +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
11499 | + nm_file_list_spec='@' | ||
11500 | +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then | ||
11501 | + nm_file_list_spec='@' | ||
11502 | +fi | ||
11503 | + | ||
11504 | + | ||
11505 | + | ||
11506 | + | ||
11507 | + | ||
11508 | + | ||
11509 | + | ||
11510 | |||
11511 | |||
11512 | |||
11513 | @@ -6905,6 +7249,42 @@ | ||
11514 | |||
11515 | |||
11516 | |||
11517 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 | ||
11518 | +$as_echo_n "checking for sysroot... " >&6; } | ||
11519 | + | ||
11520 | +# Check whether --with-libtool-sysroot was given. | ||
11521 | +if test "${with_libtool_sysroot+set}" = set; then : | ||
11522 | + withval=$with_libtool_sysroot; | ||
11523 | +else | ||
11524 | + with_libtool_sysroot=no | ||
11525 | +fi | ||
11526 | + | ||
11527 | + | ||
11528 | +lt_sysroot= | ||
11529 | +case ${with_libtool_sysroot} in #( | ||
11530 | + yes) | ||
11531 | + if test "$GCC" = yes; then | ||
11532 | + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
11533 | + fi | ||
11534 | + ;; #( | ||
11535 | + /*) | ||
11536 | + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
11537 | + ;; #( | ||
11538 | + no|'') | ||
11539 | + ;; #( | ||
11540 | + *) | ||
11541 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 | ||
11542 | +$as_echo "${with_libtool_sysroot}" >&6; } | ||
11543 | + as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 | ||
11544 | + ;; | ||
11545 | +esac | ||
11546 | + | ||
11547 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 | ||
11548 | +$as_echo "${lt_sysroot:-no}" >&6; } | ||
11549 | + | ||
11550 | + | ||
11551 | + | ||
11552 | + | ||
11553 | |||
11554 | # Check whether --enable-libtool-lock was given. | ||
11555 | if test "${enable_libtool_lock+set}" = set; then : | ||
11556 | @@ -7112,6 +7492,123 @@ | ||
11557 | |||
11558 | need_locks="$enable_libtool_lock" | ||
11559 | |||
11560 | +if test -n "$ac_tool_prefix"; then | ||
11561 | + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. | ||
11562 | +set dummy ${ac_tool_prefix}mt; ac_word=$2 | ||
11563 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
11564 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
11565 | +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : | ||
11566 | + $as_echo_n "(cached) " >&6 | ||
11567 | +else | ||
11568 | + if test -n "$MANIFEST_TOOL"; then | ||
11569 | + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. | ||
11570 | +else | ||
11571 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
11572 | +for as_dir in $PATH | ||
11573 | +do | ||
11574 | + IFS=$as_save_IFS | ||
11575 | + test -z "$as_dir" && as_dir=. | ||
11576 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
11577 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
11578 | + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" | ||
11579 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
11580 | + break 2 | ||
11581 | + fi | ||
11582 | +done | ||
11583 | + done | ||
11584 | +IFS=$as_save_IFS | ||
11585 | + | ||
11586 | +fi | ||
11587 | +fi | ||
11588 | +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL | ||
11589 | +if test -n "$MANIFEST_TOOL"; then | ||
11590 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 | ||
11591 | +$as_echo "$MANIFEST_TOOL" >&6; } | ||
11592 | +else | ||
11593 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
11594 | +$as_echo "no" >&6; } | ||
11595 | +fi | ||
11596 | + | ||
11597 | + | ||
11598 | +fi | ||
11599 | +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then | ||
11600 | + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL | ||
11601 | + # Extract the first word of "mt", so it can be a program name with args. | ||
11602 | +set dummy mt; ac_word=$2 | ||
11603 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
11604 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
11605 | +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : | ||
11606 | + $as_echo_n "(cached) " >&6 | ||
11607 | +else | ||
11608 | + if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
11609 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. | ||
11610 | +else | ||
11611 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
11612 | +for as_dir in $PATH | ||
11613 | +do | ||
11614 | + IFS=$as_save_IFS | ||
11615 | + test -z "$as_dir" && as_dir=. | ||
11616 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
11617 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
11618 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" | ||
11619 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
11620 | + break 2 | ||
11621 | + fi | ||
11622 | +done | ||
11623 | + done | ||
11624 | +IFS=$as_save_IFS | ||
11625 | + | ||
11626 | +fi | ||
11627 | +fi | ||
11628 | +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL | ||
11629 | +if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
11630 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 | ||
11631 | +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } | ||
11632 | +else | ||
11633 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
11634 | +$as_echo "no" >&6; } | ||
11635 | +fi | ||
11636 | + | ||
11637 | + if test "x$ac_ct_MANIFEST_TOOL" = x; then | ||
11638 | + MANIFEST_TOOL=":" | ||
11639 | + else | ||
11640 | + case $cross_compiling:$ac_tool_warned in | ||
11641 | +yes:) | ||
11642 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
11643 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
11644 | +ac_tool_warned=yes ;; | ||
11645 | +esac | ||
11646 | + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL | ||
11647 | + fi | ||
11648 | +else | ||
11649 | + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" | ||
11650 | +fi | ||
11651 | + | ||
11652 | +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
11653 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 | ||
11654 | +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } | ||
11655 | +if test "${lt_cv_path_mainfest_tool+set}" = set; then : | ||
11656 | + $as_echo_n "(cached) " >&6 | ||
11657 | +else | ||
11658 | + lt_cv_path_mainfest_tool=no | ||
11659 | + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 | ||
11660 | + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
11661 | + cat conftest.err >&5 | ||
11662 | + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
11663 | + lt_cv_path_mainfest_tool=yes | ||
11664 | + fi | ||
11665 | + rm -f conftest* | ||
11666 | +fi | ||
11667 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 | ||
11668 | +$as_echo "$lt_cv_path_mainfest_tool" >&6; } | ||
11669 | +if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
11670 | + MANIFEST_TOOL=: | ||
11671 | +fi | ||
11672 | + | ||
11673 | + | ||
11674 | + | ||
11675 | + | ||
11676 | + | ||
11677 | |||
11678 | case $host_os in | ||
11679 | rhapsody* | darwin*) | ||
11680 | @@ -7675,6 +8172,8 @@ | ||
11681 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | ||
11682 | echo "$AR cru libconftest.a conftest.o" >&5 | ||
11683 | $AR cru libconftest.a conftest.o 2>&5 | ||
11684 | + echo "$RANLIB libconftest.a" >&5 | ||
11685 | + $RANLIB libconftest.a 2>&5 | ||
11686 | cat > conftest.c << _LT_EOF | ||
11687 | int main() { return 0;} | ||
11688 | _LT_EOF | ||
11689 | @@ -7870,7 +8369,8 @@ | ||
11690 | LIBTOOL_DEPS="$ltmain" | ||
11691 | |||
11692 | # Always use our own libtool. | ||
11693 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
11694 | +LIBTOOL='$(SHELL) $(top_builddir)' | ||
11695 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | ||
11696 | |||
11697 | |||
11698 | |||
11699 | @@ -7959,7 +8459,7 @@ | ||
11700 | esac | ||
11701 | |||
11702 | # Global variables: | ||
11703 | -ofile=libtool | ||
11704 | +ofile=${host_alias}-libtool | ||
11705 | can_build_shared=yes | ||
11706 | |||
11707 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
11708 | @@ -8257,8 +8757,6 @@ | ||
11709 | lt_prog_compiler_pic= | ||
11710 | lt_prog_compiler_static= | ||
11711 | |||
11712 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
11713 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
11714 | |||
11715 | if test "$GCC" = yes; then | ||
11716 | lt_prog_compiler_wl='-Wl,' | ||
11717 | @@ -8424,6 +8922,12 @@ | ||
11718 | lt_prog_compiler_pic='--shared' | ||
11719 | lt_prog_compiler_static='--static' | ||
11720 | ;; | ||
11721 | + nagfor*) | ||
11722 | + # NAG Fortran compiler | ||
11723 | + lt_prog_compiler_wl='-Wl,-Wl,,' | ||
11724 | + lt_prog_compiler_pic='-PIC' | ||
11725 | + lt_prog_compiler_static='-Bstatic' | ||
11726 | + ;; | ||
11727 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
11728 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
11729 | # which looks to be a dead project) | ||
11730 | @@ -8486,7 +8990,7 @@ | ||
11731 | lt_prog_compiler_pic='-KPIC' | ||
11732 | lt_prog_compiler_static='-Bstatic' | ||
11733 | case $cc_basename in | ||
11734 | - f77* | f90* | f95*) | ||
11735 | + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
11736 | lt_prog_compiler_wl='-Qoption ld ';; | ||
11737 | *) | ||
11738 | lt_prog_compiler_wl='-Wl,';; | ||
11739 | @@ -8543,13 +9047,17 @@ | ||
11740 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
11741 | ;; | ||
11742 | esac | ||
11743 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 | ||
11744 | -$as_echo "$lt_prog_compiler_pic" >&6; } | ||
11745 | - | ||
11746 | - | ||
11747 | - | ||
11748 | - | ||
11749 | |||
11750 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
11751 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
11752 | +if test "${lt_cv_prog_compiler_pic+set}" = set; then : | ||
11753 | + $as_echo_n "(cached) " >&6 | ||
11754 | +else | ||
11755 | + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic | ||
11756 | +fi | ||
11757 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 | ||
11758 | +$as_echo "$lt_cv_prog_compiler_pic" >&6; } | ||
11759 | +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic | ||
11760 | |||
11761 | # | ||
11762 | # Check to make sure the PIC flag actually works. | ||
11763 | @@ -8610,6 +9118,11 @@ | ||
11764 | |||
11765 | |||
11766 | |||
11767 | + | ||
11768 | + | ||
11769 | + | ||
11770 | + | ||
11771 | + | ||
11772 | # | ||
11773 | # Check to make sure the static flag actually works. | ||
11774 | # | ||
11775 | @@ -8960,7 +9473,8 @@ | ||
11776 | allow_undefined_flag=unsupported | ||
11777 | always_export_symbols=no | ||
11778 | enable_shared_with_static_runtimes=yes | ||
11779 | - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
11780 | + 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' | ||
11781 | + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
11782 | |||
11783 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
11784 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
11785 | @@ -9008,7 +9522,7 @@ | ||
11786 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
11787 | && test "$tmp_diet" = no | ||
11788 | then | ||
11789 | - tmp_addflag= | ||
11790 | + tmp_addflag=' $pic_flag' | ||
11791 | tmp_sharedflag='-shared' | ||
11792 | case $cc_basename,$host_cpu in | ||
11793 | pgcc*) # Portland Group C compiler | ||
11794 | @@ -9059,12 +9573,12 @@ | ||
11795 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | ||
11796 | hardcode_libdir_flag_spec= | ||
11797 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
11798 | - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | ||
11799 | + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
11800 | if test "x$supports_anon_versioning" = xyes; then | ||
11801 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | ||
11802 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
11803 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
11804 | - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
11805 | + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
11806 | fi | ||
11807 | ;; | ||
11808 | esac | ||
11809 | @@ -9078,8 +9592,8 @@ | ||
11810 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
11811 | wlarc= | ||
11812 | else | ||
11813 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
11814 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
11815 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
11816 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
11817 | fi | ||
11818 | ;; | ||
11819 | |||
11820 | @@ -9097,8 +9611,8 @@ | ||
11821 | |||
11822 | _LT_EOF | ||
11823 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
11824 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
11825 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
11826 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
11827 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
11828 | else | ||
11829 | ld_shlibs=no | ||
11830 | fi | ||
11831 | @@ -9144,8 +9658,8 @@ | ||
11832 | |||
11833 | *) | ||
11834 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
11835 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
11836 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
11837 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
11838 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
11839 | else | ||
11840 | ld_shlibs=no | ||
11841 | fi | ||
11842 | @@ -9275,7 +9789,13 @@ | ||
11843 | allow_undefined_flag='-berok' | ||
11844 | # Determine the default libpath from the value encoded in an | ||
11845 | # empty executable. | ||
11846 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
11847 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
11848 | + aix_libpath=$lt_cv_aix_libpath | ||
11849 | +else | ||
11850 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
11851 | + $as_echo_n "(cached) " >&6 | ||
11852 | +else | ||
11853 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
11854 | /* end confdefs.h. */ | ||
11855 | |||
11856 | int | ||
11857 | @@ -9288,22 +9808,29 @@ | ||
11858 | _ACEOF | ||
11859 | if ac_fn_c_try_link "$LINENO"; then : | ||
11860 | |||
11861 | -lt_aix_libpath_sed=' | ||
11862 | - /Import File Strings/,/^$/ { | ||
11863 | - /^0/ { | ||
11864 | - s/^0 *\(.*\)$/\1/ | ||
11865 | - p | ||
11866 | - } | ||
11867 | - }' | ||
11868 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11869 | -# Check for a 64-bit object if we didn't find anything. | ||
11870 | -if test -z "$aix_libpath"; then | ||
11871 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11872 | -fi | ||
11873 | + lt_aix_libpath_sed=' | ||
11874 | + /Import File Strings/,/^$/ { | ||
11875 | + /^0/ { | ||
11876 | + s/^0 *\([^ ]*\) *$/\1/ | ||
11877 | + p | ||
11878 | + } | ||
11879 | + }' | ||
11880 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11881 | + # Check for a 64-bit object if we didn't find anything. | ||
11882 | + if test -z "$lt_cv_aix_libpath_"; then | ||
11883 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11884 | + fi | ||
11885 | fi | ||
11886 | rm -f core conftest.err conftest.$ac_objext \ | ||
11887 | conftest$ac_exeext conftest.$ac_ext | ||
11888 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
11889 | + if test -z "$lt_cv_aix_libpath_"; then | ||
11890 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
11891 | + fi | ||
11892 | + | ||
11893 | +fi | ||
11894 | + | ||
11895 | + aix_libpath=$lt_cv_aix_libpath_ | ||
11896 | +fi | ||
11897 | |||
11898 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
11899 | 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" | ||
11900 | @@ -9315,7 +9842,13 @@ | ||
11901 | else | ||
11902 | # Determine the default libpath from the value encoded in an | ||
11903 | # empty executable. | ||
11904 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
11905 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
11906 | + aix_libpath=$lt_cv_aix_libpath | ||
11907 | +else | ||
11908 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
11909 | + $as_echo_n "(cached) " >&6 | ||
11910 | +else | ||
11911 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
11912 | /* end confdefs.h. */ | ||
11913 | |||
11914 | int | ||
11915 | @@ -9328,22 +9861,29 @@ | ||
11916 | _ACEOF | ||
11917 | if ac_fn_c_try_link "$LINENO"; then : | ||
11918 | |||
11919 | -lt_aix_libpath_sed=' | ||
11920 | - /Import File Strings/,/^$/ { | ||
11921 | - /^0/ { | ||
11922 | - s/^0 *\(.*\)$/\1/ | ||
11923 | - p | ||
11924 | - } | ||
11925 | - }' | ||
11926 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11927 | -# Check for a 64-bit object if we didn't find anything. | ||
11928 | -if test -z "$aix_libpath"; then | ||
11929 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11930 | -fi | ||
11931 | + lt_aix_libpath_sed=' | ||
11932 | + /Import File Strings/,/^$/ { | ||
11933 | + /^0/ { | ||
11934 | + s/^0 *\([^ ]*\) *$/\1/ | ||
11935 | + p | ||
11936 | + } | ||
11937 | + }' | ||
11938 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11939 | + # Check for a 64-bit object if we didn't find anything. | ||
11940 | + if test -z "$lt_cv_aix_libpath_"; then | ||
11941 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
11942 | + fi | ||
11943 | fi | ||
11944 | rm -f core conftest.err conftest.$ac_objext \ | ||
11945 | conftest$ac_exeext conftest.$ac_ext | ||
11946 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
11947 | + if test -z "$lt_cv_aix_libpath_"; then | ||
11948 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
11949 | + fi | ||
11950 | + | ||
11951 | +fi | ||
11952 | + | ||
11953 | + aix_libpath=$lt_cv_aix_libpath_ | ||
11954 | +fi | ||
11955 | |||
11956 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
11957 | # Warning - without using the other run time loading flags, | ||
11958 | @@ -9388,20 +9928,63 @@ | ||
11959 | # Microsoft Visual C++. | ||
11960 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
11961 | # no search path for DLLs. | ||
11962 | - hardcode_libdir_flag_spec=' ' | ||
11963 | - allow_undefined_flag=unsupported | ||
11964 | - # Tell ltmain to make .lib files, not .a files. | ||
11965 | - libext=lib | ||
11966 | - # Tell ltmain to make .dll files, not .so files. | ||
11967 | - shrext_cmds=".dll" | ||
11968 | - # FIXME: Setting linknames here is a bad hack. | ||
11969 | - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
11970 | - # The linker will automatically build a .lib file if we build a DLL. | ||
11971 | - old_archive_from_new_cmds='true' | ||
11972 | - # FIXME: Should let the user specify the lib program. | ||
11973 | - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
11974 | - fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
11975 | - enable_shared_with_static_runtimes=yes | ||
11976 | + case $cc_basename in | ||
11977 | + cl*) | ||
11978 | + # Native MSVC | ||
11979 | + hardcode_libdir_flag_spec=' ' | ||
11980 | + allow_undefined_flag=unsupported | ||
11981 | + always_export_symbols=yes | ||
11982 | + file_list_spec='@' | ||
11983 | + # Tell ltmain to make .lib files, not .a files. | ||
11984 | + libext=lib | ||
11985 | + # Tell ltmain to make .dll files, not .so files. | ||
11986 | + shrext_cmds=".dll" | ||
11987 | + # FIXME: Setting linknames here is a bad hack. | ||
11988 | + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
11989 | + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
11990 | + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
11991 | + else | ||
11992 | + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
11993 | + fi~ | ||
11994 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
11995 | + linknames=' | ||
11996 | + # The linker will not automatically build a static lib if we build a DLL. | ||
11997 | + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' | ||
11998 | + enable_shared_with_static_runtimes=yes | ||
11999 | + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
12000 | + # Don't use ranlib | ||
12001 | + old_postinstall_cmds='chmod 644 $oldlib' | ||
12002 | + postlink_cmds='lt_outputfile="@OUTPUT@"~ | ||
12003 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
12004 | + case $lt_outputfile in | ||
12005 | + *.exe|*.EXE) ;; | ||
12006 | + *) | ||
12007 | + lt_outputfile="$lt_outputfile.exe" | ||
12008 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
12009 | + ;; | ||
12010 | + esac~ | ||
12011 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
12012 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
12013 | + $RM "$lt_outputfile.manifest"; | ||
12014 | + fi' | ||
12015 | + ;; | ||
12016 | + *) | ||
12017 | + # Assume MSVC wrapper | ||
12018 | + hardcode_libdir_flag_spec=' ' | ||
12019 | + allow_undefined_flag=unsupported | ||
12020 | + # Tell ltmain to make .lib files, not .a files. | ||
12021 | + libext=lib | ||
12022 | + # Tell ltmain to make .dll files, not .so files. | ||
12023 | + shrext_cmds=".dll" | ||
12024 | + # FIXME: Setting linknames here is a bad hack. | ||
12025 | + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
12026 | + # The linker will automatically build a .lib file if we build a DLL. | ||
12027 | + old_archive_from_new_cmds='true' | ||
12028 | + # FIXME: Should let the user specify the lib program. | ||
12029 | + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
12030 | + enable_shared_with_static_runtimes=yes | ||
12031 | + ;; | ||
12032 | + esac | ||
12033 | ;; | ||
12034 | |||
12035 | darwin* | rhapsody*) | ||
12036 | @@ -9462,7 +10045,7 @@ | ||
12037 | |||
12038 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
12039 | freebsd* | dragonfly*) | ||
12040 | - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
12041 | + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
12042 | hardcode_libdir_flag_spec='-R$libdir' | ||
12043 | hardcode_direct=yes | ||
12044 | hardcode_shlibpath_var=no | ||
12045 | @@ -9470,7 +10053,7 @@ | ||
12046 | |||
12047 | hpux9*) | ||
12048 | if test "$GCC" = yes; then | ||
12049 | - 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' | ||
12050 | + 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' | ||
12051 | else | ||
12052 | 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' | ||
12053 | fi | ||
12054 | @@ -9486,7 +10069,7 @@ | ||
12055 | |||
12056 | hpux10*) | ||
12057 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
12058 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
12059 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
12060 | else | ||
12061 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
12062 | fi | ||
12063 | @@ -9510,10 +10093,10 @@ | ||
12064 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
12065 | ;; | ||
12066 | ia64*) | ||
12067 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
12068 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
12069 | ;; | ||
12070 | *) | ||
12071 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
12072 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
12073 | ;; | ||
12074 | esac | ||
12075 | else | ||
12076 | @@ -9592,23 +10175,36 @@ | ||
12077 | |||
12078 | irix5* | irix6* | nonstopux*) | ||
12079 | if test "$GCC" = yes; then | ||
12080 | - 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' | ||
12081 | + 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' | ||
12082 | # Try to use the -exported_symbol ld option, if it does not | ||
12083 | # work, assume that -exports_file does not work either and | ||
12084 | # implicitly export all symbols. | ||
12085 | - save_LDFLAGS="$LDFLAGS" | ||
12086 | - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
12087 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
12088 | + # This should be the same for all languages, so no per-tag cache variable. | ||
12089 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 | ||
12090 | +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } | ||
12091 | +if test "${lt_cv_irix_exported_symbol+set}" = set; then : | ||
12092 | + $as_echo_n "(cached) " >&6 | ||
12093 | +else | ||
12094 | + save_LDFLAGS="$LDFLAGS" | ||
12095 | + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
12096 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
12097 | /* end confdefs.h. */ | ||
12098 | -int foo(void) {} | ||
12099 | +int foo (void) { return 0; } | ||
12100 | _ACEOF | ||
12101 | if ac_fn_c_try_link "$LINENO"; then : | ||
12102 | - 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' | ||
12103 | - | ||
12104 | + lt_cv_irix_exported_symbol=yes | ||
12105 | +else | ||
12106 | + lt_cv_irix_exported_symbol=no | ||
12107 | fi | ||
12108 | rm -f core conftest.err conftest.$ac_objext \ | ||
12109 | conftest$ac_exeext conftest.$ac_ext | ||
12110 | - LDFLAGS="$save_LDFLAGS" | ||
12111 | + LDFLAGS="$save_LDFLAGS" | ||
12112 | +fi | ||
12113 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 | ||
12114 | +$as_echo "$lt_cv_irix_exported_symbol" >&6; } | ||
12115 | + if test "$lt_cv_irix_exported_symbol" = yes; then | ||
12116 | + 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' | ||
12117 | + fi | ||
12118 | else | ||
12119 | 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' | ||
12120 | 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' | ||
12121 | @@ -9693,7 +10289,7 @@ | ||
12122 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
12123 | if test "$GCC" = yes; then | ||
12124 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
12125 | - 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' | ||
12126 | + 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' | ||
12127 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
12128 | else | ||
12129 | allow_undefined_flag=' -expect_unresolved \*' | ||
12130 | @@ -9712,9 +10308,9 @@ | ||
12131 | no_undefined_flag=' -z defs' | ||
12132 | if test "$GCC" = yes; then | ||
12133 | wlarc='${wl}' | ||
12134 | - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
12135 | + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
12136 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
12137 | - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
12138 | + $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' | ||
12139 | else | ||
12140 | case `$CC -V 2>&1` in | ||
12141 | *"Compilers 5.0"*) | ||
12142 | @@ -10290,8 +10886,9 @@ | ||
12143 | need_version=no | ||
12144 | need_lib_prefix=no | ||
12145 | |||
12146 | - case $GCC,$host_os in | ||
12147 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
12148 | + case $GCC,$cc_basename in | ||
12149 | + yes,*) | ||
12150 | + # gcc | ||
12151 | library_names_spec='$libname.dll.a' | ||
12152 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
12153 | postinstall_cmds='base_file=`basename \${file}`~ | ||
12154 | @@ -10324,13 +10921,71 @@ | ||
12155 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
12156 | ;; | ||
12157 | esac | ||
12158 | + dynamic_linker='Win32 ld.exe' | ||
12159 | + ;; | ||
12160 | + | ||
12161 | + *,cl*) | ||
12162 | + # Native MSVC | ||
12163 | + libname_spec='$name' | ||
12164 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
12165 | + library_names_spec='${libname}.dll.lib' | ||
12166 | + | ||
12167 | + case $build_os in | ||
12168 | + mingw*) | ||
12169 | + sys_lib_search_path_spec= | ||
12170 | + lt_save_ifs=$IFS | ||
12171 | + IFS=';' | ||
12172 | + for lt_path in $LIB | ||
12173 | + do | ||
12174 | + IFS=$lt_save_ifs | ||
12175 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
12176 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
12177 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
12178 | + done | ||
12179 | + IFS=$lt_save_ifs | ||
12180 | + # Convert to MSYS style. | ||
12181 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
12182 | + ;; | ||
12183 | + cygwin*) | ||
12184 | + # Convert to unix form, then to dos form, then back to unix form | ||
12185 | + # but this time dos style (no spaces!) so that the unix form looks | ||
12186 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
12187 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
12188 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
12189 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
12190 | + ;; | ||
12191 | + *) | ||
12192 | + sys_lib_search_path_spec="$LIB" | ||
12193 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
12194 | + # It is most probably a Windows format PATH. | ||
12195 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
12196 | + else | ||
12197 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
12198 | + fi | ||
12199 | + # FIXME: find the short name or the path components, as spaces are | ||
12200 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
12201 | + ;; | ||
12202 | + esac | ||
12203 | + | ||
12204 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
12205 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
12206 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
12207 | + dldir=$destdir/`dirname \$dlpath`~ | ||
12208 | + test -d \$dldir || mkdir -p \$dldir~ | ||
12209 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
12210 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
12211 | + dlpath=$dir/\$dldll~ | ||
12212 | + $RM \$dlpath' | ||
12213 | + shlibpath_overrides_runpath=yes | ||
12214 | + dynamic_linker='Win32 link.exe' | ||
12215 | ;; | ||
12216 | |||
12217 | *) | ||
12218 | + # Assume MSVC wrapper | ||
12219 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
12220 | + dynamic_linker='Win32 ld.exe' | ||
12221 | ;; | ||
12222 | esac | ||
12223 | - dynamic_linker='Win32 ld.exe' | ||
12224 | # FIXME: first we should search . and the directory the executable is in | ||
12225 | shlibpath_var=PATH | ||
12226 | ;; | ||
12227 | @@ -10422,7 +11077,7 @@ | ||
12228 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12229 | shlibpath_var=LIBRARY_PATH | ||
12230 | shlibpath_overrides_runpath=yes | ||
12231 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
12232 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
12233 | hardcode_into_libs=yes | ||
12234 | ;; | ||
12235 | |||
12236 | @@ -11262,10 +11917,10 @@ | ||
12237 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
12238 | correspondingly for the symbols needed. */ | ||
12239 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
12240 | -void fnord () __attribute__((visibility("default"))); | ||
12241 | +int fnord () __attribute__((visibility("default"))); | ||
12242 | #endif | ||
12243 | |||
12244 | -void fnord () { int i=42; } | ||
12245 | +int fnord () { return 42; } | ||
12246 | int main () | ||
12247 | { | ||
12248 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
12249 | @@ -11368,10 +12023,10 @@ | ||
12250 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
12251 | correspondingly for the symbols needed. */ | ||
12252 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
12253 | -void fnord () __attribute__((visibility("default"))); | ||
12254 | +int fnord () __attribute__((visibility("default"))); | ||
12255 | #endif | ||
12256 | |||
12257 | -void fnord () { int i=42; } | ||
12258 | +int fnord () { return 42; } | ||
12259 | int main () | ||
12260 | { | ||
12261 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
12262 | @@ -14948,13 +15603,20 @@ | ||
12263 | lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' | ||
12264 | lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' | ||
12265 | lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' | ||
12266 | +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
12267 | +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
12268 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' | ||
12269 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' | ||
12270 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' | ||
12271 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' | ||
12272 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' | ||
12273 | +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' | ||
12274 | +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' | ||
12275 | +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' | ||
12276 | +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' | ||
12277 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' | ||
12278 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' | ||
12279 | +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' | ||
12280 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' | ||
12281 | RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' | ||
12282 | old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' | ||
12283 | @@ -14969,14 +15631,17 @@ | ||
12284 | lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' | ||
12285 | lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' | ||
12286 | 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"`' | ||
12287 | +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
12288 | +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' | ||
12289 | objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' | ||
12290 | MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' | ||
12291 | lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' | ||
12292 | -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
12293 | lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' | ||
12294 | +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
12295 | lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' | ||
12296 | lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' | ||
12297 | need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' | ||
12298 | +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' | ||
12299 | DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' | ||
12300 | NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' | ||
12301 | LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' | ||
12302 | @@ -15009,12 +15674,12 @@ | ||
12303 | hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' | ||
12304 | inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' | ||
12305 | link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' | ||
12306 | -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' | ||
12307 | always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' | ||
12308 | export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' | ||
12309 | exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' | ||
12310 | include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' | ||
12311 | prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' | ||
12312 | +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' | ||
12313 | file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
12314 | variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' | ||
12315 | need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' | ||
12316 | @@ -15069,8 +15734,13 @@ | ||
12317 | OBJDUMP \ | ||
12318 | deplibs_check_method \ | ||
12319 | file_magic_cmd \ | ||
12320 | +file_magic_glob \ | ||
12321 | +want_nocaseglob \ | ||
12322 | +DLLTOOL \ | ||
12323 | +sharedlib_from_linklib_cmd \ | ||
12324 | AR \ | ||
12325 | AR_FLAGS \ | ||
12326 | +archiver_list_spec \ | ||
12327 | STRIP \ | ||
12328 | RANLIB \ | ||
12329 | CC \ | ||
12330 | @@ -15080,12 +15750,14 @@ | ||
12331 | lt_cv_sys_global_symbol_to_cdecl \ | ||
12332 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
12333 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ | ||
12334 | +nm_file_list_spec \ | ||
12335 | lt_prog_compiler_no_builtin_flag \ | ||
12336 | -lt_prog_compiler_wl \ | ||
12337 | lt_prog_compiler_pic \ | ||
12338 | +lt_prog_compiler_wl \ | ||
12339 | lt_prog_compiler_static \ | ||
12340 | lt_cv_prog_compiler_c_o \ | ||
12341 | need_locks \ | ||
12342 | +MANIFEST_TOOL \ | ||
12343 | DSYMUTIL \ | ||
12344 | NMEDIT \ | ||
12345 | LIPO \ | ||
12346 | @@ -15101,7 +15773,6 @@ | ||
12347 | hardcode_libdir_flag_spec \ | ||
12348 | hardcode_libdir_flag_spec_ld \ | ||
12349 | hardcode_libdir_separator \ | ||
12350 | -fix_srcfile_path \ | ||
12351 | exclude_expsyms \ | ||
12352 | include_expsyms \ | ||
12353 | file_list_spec \ | ||
12354 | @@ -15137,6 +15808,7 @@ | ||
12355 | module_expsym_cmds \ | ||
12356 | export_symbols_cmds \ | ||
12357 | prelink_cmds \ | ||
12358 | +postlink_cmds \ | ||
12359 | postinstall_cmds \ | ||
12360 | postuninstall_cmds \ | ||
12361 | finish_cmds \ | ||
12362 | @@ -15894,7 +16566,8 @@ | ||
12363 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
12364 | # | ||
12365 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
12366 | -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
12367 | +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, | ||
12368 | +# Inc. | ||
12369 | # Written by Gordon Matzigkeit, 1996 | ||
12370 | # | ||
12371 | # This file is part of GNU Libtool. | ||
12372 | @@ -15997,19 +16670,42 @@ | ||
12373 | # turn newlines into spaces. | ||
12374 | NL2SP=$lt_lt_NL2SP | ||
12375 | |||
12376 | +# convert \$build file names to \$host format. | ||
12377 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
12378 | + | ||
12379 | +# convert \$build files to toolchain format. | ||
12380 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
12381 | + | ||
12382 | # An object symbol dumper. | ||
12383 | OBJDUMP=$lt_OBJDUMP | ||
12384 | |||
12385 | # Method to check whether dependent libraries are shared objects. | ||
12386 | deplibs_check_method=$lt_deplibs_check_method | ||
12387 | |||
12388 | -# Command to use when deplibs_check_method == "file_magic". | ||
12389 | +# Command to use when deplibs_check_method = "file_magic". | ||
12390 | file_magic_cmd=$lt_file_magic_cmd | ||
12391 | |||
12392 | +# How to find potential files when deplibs_check_method = "file_magic". | ||
12393 | +file_magic_glob=$lt_file_magic_glob | ||
12394 | + | ||
12395 | +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". | ||
12396 | +want_nocaseglob=$lt_want_nocaseglob | ||
12397 | + | ||
12398 | +# DLL creation program. | ||
12399 | +DLLTOOL=$lt_DLLTOOL | ||
12400 | + | ||
12401 | +# Command to associate shared and link libraries. | ||
12402 | +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd | ||
12403 | + | ||
12404 | # The archiver. | ||
12405 | AR=$lt_AR | ||
12406 | + | ||
12407 | +# Flags to create an archive. | ||
12408 | AR_FLAGS=$lt_AR_FLAGS | ||
12409 | |||
12410 | +# How to feed a file listing to the archiver. | ||
12411 | +archiver_list_spec=$lt_archiver_list_spec | ||
12412 | + | ||
12413 | # A symbol stripping program. | ||
12414 | STRIP=$lt_STRIP | ||
12415 | |||
12416 | @@ -16039,6 +16735,12 @@ | ||
12417 | # Transform the output of nm in a C name address pair when lib prefix is needed. | ||
12418 | global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix | ||
12419 | |||
12420 | +# Specify filename containing input files for \$NM. | ||
12421 | +nm_file_list_spec=$lt_nm_file_list_spec | ||
12422 | + | ||
12423 | +# The root where to search for dependent libraries,and in which our libraries should be installed. | ||
12424 | +lt_sysroot=$lt_sysroot | ||
12425 | + | ||
12426 | # The name of the directory that contains temporary libtool files. | ||
12427 | objdir=$objdir | ||
12428 | |||
12429 | @@ -16048,6 +16750,9 @@ | ||
12430 | # Must we lock files when doing compilation? | ||
12431 | need_locks=$lt_need_locks | ||
12432 | |||
12433 | +# Manifest tool. | ||
12434 | +MANIFEST_TOOL=$lt_MANIFEST_TOOL | ||
12435 | + | ||
12436 | # Tool to manipulate archived DWARF debug symbol files on Mac OS X. | ||
12437 | DSYMUTIL=$lt_DSYMUTIL | ||
12438 | |||
12439 | @@ -16162,12 +16867,12 @@ | ||
12440 | # Compiler flag to turn off builtin functions. | ||
12441 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
12442 | |||
12443 | -# How to pass a linker flag through the compiler. | ||
12444 | -wl=$lt_lt_prog_compiler_wl | ||
12445 | - | ||
12446 | # Additional compiler flags for building library objects. | ||
12447 | pic_flag=$lt_lt_prog_compiler_pic | ||
12448 | |||
12449 | +# How to pass a linker flag through the compiler. | ||
12450 | +wl=$lt_lt_prog_compiler_wl | ||
12451 | + | ||
12452 | # Compiler flag to prevent dynamic linking. | ||
12453 | link_static_flag=$lt_lt_prog_compiler_static | ||
12454 | |||
12455 | @@ -16254,9 +16959,6 @@ | ||
12456 | # Whether libtool must link a program against all its dependency libraries. | ||
12457 | link_all_deplibs=$link_all_deplibs | ||
12458 | |||
12459 | -# Fix the shell variable \$srcfile for the compiler. | ||
12460 | -fix_srcfile_path=$lt_fix_srcfile_path | ||
12461 | - | ||
12462 | # Set to "yes" if exported symbols are required. | ||
12463 | always_export_symbols=$always_export_symbols | ||
12464 | |||
12465 | @@ -16272,6 +16974,9 @@ | ||
12466 | # Commands necessary for linking programs (against libraries) with templates. | ||
12467 | prelink_cmds=$lt_prelink_cmds | ||
12468 | |||
12469 | +# Commands necessary for finishing linking programs. | ||
12470 | +postlink_cmds=$lt_postlink_cmds | ||
12471 | + | ||
12472 | # Specify filename containing input files. | ||
12473 | file_list_spec=$lt_file_list_spec | ||
12474 | |||
12475 | @@ -16304,210 +17009,169 @@ | ||
12476 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
12477 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
12478 | # is reportedly fixed, but why not run on old versions too? | ||
12479 | - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | ||
12480 | - || (rm -f "$cfgfile"; exit 1) | ||
12481 | - | ||
12482 | - case $xsi_shell in | ||
12483 | - yes) | ||
12484 | - cat << \_LT_EOF >> "$cfgfile" | ||
12485 | - | ||
12486 | -# func_dirname file append nondir_replacement | ||
12487 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
12488 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
12489 | -func_dirname () | ||
12490 | -{ | ||
12491 | - case ${1} in | ||
12492 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
12493 | - * ) func_dirname_result="${3}" ;; | ||
12494 | - esac | ||
12495 | -} | ||
12496 | - | ||
12497 | -# func_basename file | ||
12498 | -func_basename () | ||
12499 | -{ | ||
12500 | - func_basename_result="${1##*/}" | ||
12501 | -} | ||
12502 | - | ||
12503 | -# func_dirname_and_basename file append nondir_replacement | ||
12504 | -# perform func_basename and func_dirname in a single function | ||
12505 | -# call: | ||
12506 | -# dirname: Compute the dirname of FILE. If nonempty, | ||
12507 | -# add APPEND to the result, otherwise set result | ||
12508 | -# to NONDIR_REPLACEMENT. | ||
12509 | -# value returned in "$func_dirname_result" | ||
12510 | -# basename: Compute filename of FILE. | ||
12511 | -# value retuned in "$func_basename_result" | ||
12512 | -# Implementation must be kept synchronized with func_dirname | ||
12513 | -# and func_basename. For efficiency, we do not delegate to | ||
12514 | -# those functions but instead duplicate the functionality here. | ||
12515 | -func_dirname_and_basename () | ||
12516 | -{ | ||
12517 | - case ${1} in | ||
12518 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
12519 | - * ) func_dirname_result="${3}" ;; | ||
12520 | - esac | ||
12521 | - func_basename_result="${1##*/}" | ||
12522 | -} | ||
12523 | - | ||
12524 | -# func_stripname prefix suffix name | ||
12525 | -# strip PREFIX and SUFFIX off of NAME. | ||
12526 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
12527 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
12528 | -# dot (in which case that matches only a dot). | ||
12529 | -func_stripname () | ||
12530 | -{ | ||
12531 | - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
12532 | - # positional parameters, so assign one to ordinary parameter first. | ||
12533 | - func_stripname_result=${3} | ||
12534 | - func_stripname_result=${func_stripname_result#"${1}"} | ||
12535 | - func_stripname_result=${func_stripname_result%"${2}"} | ||
12536 | -} | ||
12537 | - | ||
12538 | -# func_opt_split | ||
12539 | -func_opt_split () | ||
12540 | -{ | ||
12541 | - func_opt_split_opt=${1%%=*} | ||
12542 | - func_opt_split_arg=${1#*=} | ||
12543 | -} | ||
12544 | - | ||
12545 | -# func_lo2o object | ||
12546 | -func_lo2o () | ||
12547 | -{ | ||
12548 | - case ${1} in | ||
12549 | - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
12550 | - *) func_lo2o_result=${1} ;; | ||
12551 | - esac | ||
12552 | -} | ||
12553 | - | ||
12554 | -# func_xform libobj-or-source | ||
12555 | -func_xform () | ||
12556 | -{ | ||
12557 | - func_xform_result=${1%.*}.lo | ||
12558 | -} | ||
12559 | - | ||
12560 | -# func_arith arithmetic-term... | ||
12561 | -func_arith () | ||
12562 | -{ | ||
12563 | - func_arith_result=$(( $* )) | ||
12564 | -} | ||
12565 | - | ||
12566 | -# func_len string | ||
12567 | -# STRING may not start with a hyphen. | ||
12568 | -func_len () | ||
12569 | -{ | ||
12570 | - func_len_result=${#1} | ||
12571 | -} | ||
12572 | - | ||
12573 | -_LT_EOF | ||
12574 | - ;; | ||
12575 | - *) # Bourne compatible functions. | ||
12576 | - cat << \_LT_EOF >> "$cfgfile" | ||
12577 | - | ||
12578 | -# func_dirname file append nondir_replacement | ||
12579 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
12580 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
12581 | -func_dirname () | ||
12582 | -{ | ||
12583 | - # Extract subdirectory from the argument. | ||
12584 | - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | ||
12585 | - if test "X$func_dirname_result" = "X${1}"; then | ||
12586 | - func_dirname_result="${3}" | ||
12587 | - else | ||
12588 | - func_dirname_result="$func_dirname_result${2}" | ||
12589 | - fi | ||
12590 | -} | ||
12591 | - | ||
12592 | -# func_basename file | ||
12593 | -func_basename () | ||
12594 | -{ | ||
12595 | - func_basename_result=`$ECHO "${1}" | $SED "$basename"` | ||
12596 | -} | ||
12597 | - | ||
12598 | - | ||
12599 | -# func_stripname prefix suffix name | ||
12600 | -# strip PREFIX and SUFFIX off of NAME. | ||
12601 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
12602 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
12603 | -# dot (in which case that matches only a dot). | ||
12604 | -# func_strip_suffix prefix name | ||
12605 | -func_stripname () | ||
12606 | -{ | ||
12607 | - case ${2} in | ||
12608 | - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
12609 | - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
12610 | - esac | ||
12611 | -} | ||
12612 | - | ||
12613 | -# sed scripts: | ||
12614 | -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' | ||
12615 | -my_sed_long_arg='1s/^-[^=]*=//' | ||
12616 | - | ||
12617 | -# func_opt_split | ||
12618 | -func_opt_split () | ||
12619 | -{ | ||
12620 | - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` | ||
12621 | - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` | ||
12622 | -} | ||
12623 | - | ||
12624 | -# func_lo2o object | ||
12625 | -func_lo2o () | ||
12626 | -{ | ||
12627 | - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | ||
12628 | -} | ||
12629 | - | ||
12630 | -# func_xform libobj-or-source | ||
12631 | -func_xform () | ||
12632 | -{ | ||
12633 | - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | ||
12634 | -} | ||
12635 | - | ||
12636 | -# func_arith arithmetic-term... | ||
12637 | -func_arith () | ||
12638 | -{ | ||
12639 | - func_arith_result=`expr "$@"` | ||
12640 | -} | ||
12641 | - | ||
12642 | -# func_len string | ||
12643 | -# STRING may not start with a hyphen. | ||
12644 | -func_len () | ||
12645 | -{ | ||
12646 | - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` | ||
12647 | -} | ||
12648 | - | ||
12649 | -_LT_EOF | ||
12650 | -esac | ||
12651 | - | ||
12652 | -case $lt_shell_append in | ||
12653 | - yes) | ||
12654 | - cat << \_LT_EOF >> "$cfgfile" | ||
12655 | - | ||
12656 | -# func_append var value | ||
12657 | -# Append VALUE to the end of shell variable VAR. | ||
12658 | -func_append () | ||
12659 | -{ | ||
12660 | - eval "$1+=\$2" | ||
12661 | -} | ||
12662 | -_LT_EOF | ||
12663 | - ;; | ||
12664 | - *) | ||
12665 | - cat << \_LT_EOF >> "$cfgfile" | ||
12666 | - | ||
12667 | -# func_append var value | ||
12668 | -# Append VALUE to the end of shell variable VAR. | ||
12669 | -func_append () | ||
12670 | -{ | ||
12671 | - eval "$1=\$$1\$2" | ||
12672 | -} | ||
12673 | - | ||
12674 | -_LT_EOF | ||
12675 | - ;; | ||
12676 | - esac | ||
12677 | + sed '$q' "$ltmain" >> "$cfgfile" \ | ||
12678 | + || (rm -f "$cfgfile"; exit 1) | ||
12679 | |||
12680 | + if test x"$xsi_shell" = xyes; then | ||
12681 | + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ | ||
12682 | +func_dirname ()\ | ||
12683 | +{\ | ||
12684 | +\ case ${1} in\ | ||
12685 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
12686 | +\ * ) func_dirname_result="${3}" ;;\ | ||
12687 | +\ esac\ | ||
12688 | +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12689 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12690 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12691 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12692 | + | ||
12693 | + | ||
12694 | + sed -e '/^func_basename ()$/,/^} # func_basename /c\ | ||
12695 | +func_basename ()\ | ||
12696 | +{\ | ||
12697 | +\ func_basename_result="${1##*/}"\ | ||
12698 | +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12699 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12700 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12701 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12702 | + | ||
12703 | + | ||
12704 | + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ | ||
12705 | +func_dirname_and_basename ()\ | ||
12706 | +{\ | ||
12707 | +\ case ${1} in\ | ||
12708 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
12709 | +\ * ) func_dirname_result="${3}" ;;\ | ||
12710 | +\ esac\ | ||
12711 | +\ func_basename_result="${1##*/}"\ | ||
12712 | +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12713 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12714 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12715 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12716 | + | ||
12717 | + | ||
12718 | + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ | ||
12719 | +func_stripname ()\ | ||
12720 | +{\ | ||
12721 | +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ | ||
12722 | +\ # positional parameters, so assign one to ordinary parameter first.\ | ||
12723 | +\ func_stripname_result=${3}\ | ||
12724 | +\ func_stripname_result=${func_stripname_result#"${1}"}\ | ||
12725 | +\ func_stripname_result=${func_stripname_result%"${2}"}\ | ||
12726 | +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12727 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12728 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12729 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12730 | + | ||
12731 | + | ||
12732 | + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ | ||
12733 | +func_split_long_opt ()\ | ||
12734 | +{\ | ||
12735 | +\ func_split_long_opt_name=${1%%=*}\ | ||
12736 | +\ func_split_long_opt_arg=${1#*=}\ | ||
12737 | +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12738 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12739 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12740 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12741 | + | ||
12742 | + | ||
12743 | + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ | ||
12744 | +func_split_short_opt ()\ | ||
12745 | +{\ | ||
12746 | +\ func_split_short_opt_arg=${1#??}\ | ||
12747 | +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ | ||
12748 | +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12749 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12750 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12751 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12752 | + | ||
12753 | + | ||
12754 | + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ | ||
12755 | +func_lo2o ()\ | ||
12756 | +{\ | ||
12757 | +\ case ${1} in\ | ||
12758 | +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ | ||
12759 | +\ *) func_lo2o_result=${1} ;;\ | ||
12760 | +\ esac\ | ||
12761 | +} # Extended-shell func_lo2o 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_xform ()$/,/^} # func_xform /c\ | ||
12768 | +func_xform ()\ | ||
12769 | +{\ | ||
12770 | + func_xform_result=${1%.*}.lo\ | ||
12771 | +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12772 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12773 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12774 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12775 | + | ||
12776 | + | ||
12777 | + sed -e '/^func_arith ()$/,/^} # func_arith /c\ | ||
12778 | +func_arith ()\ | ||
12779 | +{\ | ||
12780 | + func_arith_result=$(( $* ))\ | ||
12781 | +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12782 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12783 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12784 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12785 | + | ||
12786 | + | ||
12787 | + sed -e '/^func_len ()$/,/^} # func_len /c\ | ||
12788 | +func_len ()\ | ||
12789 | +{\ | ||
12790 | + func_len_result=${#1}\ | ||
12791 | +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12792 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12793 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12794 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12795 | + | ||
12796 | +fi | ||
12797 | + | ||
12798 | +if test x"$lt_shell_append" = xyes; then | ||
12799 | + sed -e '/^func_append ()$/,/^} # func_append /c\ | ||
12800 | +func_append ()\ | ||
12801 | +{\ | ||
12802 | + eval "${1}+=\\${2}"\ | ||
12803 | +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12804 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12805 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12806 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12807 | + | ||
12808 | + | ||
12809 | + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ | ||
12810 | +func_append_quoted ()\ | ||
12811 | +{\ | ||
12812 | +\ func_quote_for_eval "${2}"\ | ||
12813 | +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ | ||
12814 | +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ | ||
12815 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12816 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12817 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
12818 | + | ||
12819 | + | ||
12820 | + # Save a `func_append' function call where possible by direct use of '+=' | ||
12821 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
12822 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12823 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12824 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
12825 | +else | ||
12826 | + # Save a `func_append' function call even when '+=' is not available | ||
12827 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | ||
12828 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
12829 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
12830 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
12831 | +fi | ||
12832 | + | ||
12833 | +if test x"$_lt_function_replace_fail" = x":"; then | ||
12834 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 | ||
12835 | +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} | ||
12836 | +fi | ||
12837 | |||
12838 | - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ | ||
12839 | - || (rm -f "$cfgfile"; exit 1) | ||
12840 | |||
12841 | - mv -f "$cfgfile" "$ofile" || | ||
12842 | + mv -f "$cfgfile" "$ofile" || | ||
12843 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
12844 | chmod +x "$ofile" | ||
12845 | |||
12846 | Index: binutils-2.24/gas/configure | ||
12847 | =================================================================== | ||
12848 | --- binutils-2.24.orig/gas/configure 2013-11-04 07:33:37.000000000 -0800 | ||
12849 | +++ binutils-2.24/gas/configure 2013-12-15 11:10:23.880452030 -0800 | ||
12850 | @@ -645,8 +645,11 @@ | ||
12851 | LIPO | ||
12852 | NMEDIT | ||
12853 | DSYMUTIL | ||
12854 | +MANIFEST_TOOL | ||
12855 | RANLIB | ||
12856 | +ac_ct_AR | ||
12857 | AR | ||
12858 | +DLLTOOL | ||
12859 | OBJDUMP | ||
12860 | LN_S | ||
12861 | NM | ||
12862 | @@ -759,6 +762,7 @@ | ||
12863 | with_pic | ||
12864 | enable_fast_install | ||
12865 | with_gnu_ld | ||
12866 | +with_libtool_sysroot | ||
12867 | enable_libtool_lock | ||
12868 | enable_targets | ||
12869 | enable_checking | ||
12870 | @@ -1420,6 +1424,8 @@ | ||
12871 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
12872 | both] | ||
12873 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
12874 | + --with-libtool-sysroot=DIR Search for dependent libraries within DIR | ||
12875 | + (or the compiler's sysroot if not specified). | ||
12876 | --with-zlib include zlib support (auto/yes/no) default=auto | ||
12877 | |||
12878 | Some influential environment variables: | ||
12879 | @@ -5135,8 +5141,8 @@ | ||
12880 | |||
12881 | |||
12882 | |||
12883 | -macro_version='2.2.7a' | ||
12884 | -macro_revision='1.3134' | ||
12885 | +macro_version='2.4' | ||
12886 | +macro_revision='1.3293' | ||
12887 | |||
12888 | |||
12889 | |||
12890 | @@ -5176,7 +5182,7 @@ | ||
12891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | ||
12892 | $as_echo_n "checking how to print strings... " >&6; } | ||
12893 | # Test print first, because it will be a builtin if present. | ||
12894 | -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | ||
12895 | +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
12896 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
12897 | ECHO='print -r --' | ||
12898 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
12899 | @@ -5862,8 +5868,8 @@ | ||
12900 | # Try some XSI features | ||
12901 | xsi_shell=no | ||
12902 | ( _lt_dummy="a/b/c" | ||
12903 | - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | ||
12904 | - = c,a/b,, \ | ||
12905 | + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
12906 | + = c,a/b,b/c, \ | ||
12907 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
12908 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
12909 | && xsi_shell=yes | ||
12910 | @@ -5912,6 +5918,80 @@ | ||
12911 | |||
12912 | |||
12913 | |||
12914 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 | ||
12915 | +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } | ||
12916 | +if test "${lt_cv_to_host_file_cmd+set}" = set; then : | ||
12917 | + $as_echo_n "(cached) " >&6 | ||
12918 | +else | ||
12919 | + case $host in | ||
12920 | + *-*-mingw* ) | ||
12921 | + case $build in | ||
12922 | + *-*-mingw* ) # actually msys | ||
12923 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
12924 | + ;; | ||
12925 | + *-*-cygwin* ) | ||
12926 | + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
12927 | + ;; | ||
12928 | + * ) # otherwise, assume *nix | ||
12929 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
12930 | + ;; | ||
12931 | + esac | ||
12932 | + ;; | ||
12933 | + *-*-cygwin* ) | ||
12934 | + case $build in | ||
12935 | + *-*-mingw* ) # actually msys | ||
12936 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
12937 | + ;; | ||
12938 | + *-*-cygwin* ) | ||
12939 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
12940 | + ;; | ||
12941 | + * ) # otherwise, assume *nix | ||
12942 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
12943 | + ;; | ||
12944 | + esac | ||
12945 | + ;; | ||
12946 | + * ) # unhandled hosts (and "normal" native builds) | ||
12947 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
12948 | + ;; | ||
12949 | +esac | ||
12950 | + | ||
12951 | +fi | ||
12952 | + | ||
12953 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
12954 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 | ||
12955 | +$as_echo "$lt_cv_to_host_file_cmd" >&6; } | ||
12956 | + | ||
12957 | + | ||
12958 | + | ||
12959 | + | ||
12960 | + | ||
12961 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 | ||
12962 | +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } | ||
12963 | +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : | ||
12964 | + $as_echo_n "(cached) " >&6 | ||
12965 | +else | ||
12966 | + #assume ordinary cross tools, or native build. | ||
12967 | +lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
12968 | +case $host in | ||
12969 | + *-*-mingw* ) | ||
12970 | + case $build in | ||
12971 | + *-*-mingw* ) # actually msys | ||
12972 | + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
12973 | + ;; | ||
12974 | + esac | ||
12975 | + ;; | ||
12976 | +esac | ||
12977 | + | ||
12978 | +fi | ||
12979 | + | ||
12980 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
12981 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 | ||
12982 | +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } | ||
12983 | + | ||
12984 | + | ||
12985 | + | ||
12986 | + | ||
12987 | + | ||
12988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 | ||
12989 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | ||
12990 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | ||
12991 | @@ -5928,6 +6008,11 @@ | ||
12992 | esac | ||
12993 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
12994 | case $host_os in | ||
12995 | + cygwin* | mingw* | pw32* | cegcc*) | ||
12996 | + if test "$GCC" != yes; then | ||
12997 | + reload_cmds=false | ||
12998 | + fi | ||
12999 | + ;; | ||
13000 | darwin*) | ||
13001 | if test "$GCC" = yes; then | ||
13002 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
13003 | @@ -6096,7 +6181,8 @@ | ||
13004 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
13005 | lt_cv_file_magic_cmd='func_win32_libid' | ||
13006 | else | ||
13007 | - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
13008 | + # Keep this pattern in sync with the one in func_win32_libid. | ||
13009 | + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
13010 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
13011 | fi | ||
13012 | ;; | ||
13013 | @@ -6250,6 +6336,21 @@ | ||
13014 | fi | ||
13015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 | ||
13016 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | ||
13017 | + | ||
13018 | +file_magic_glob= | ||
13019 | +want_nocaseglob=no | ||
13020 | +if test "$build" = "$host"; then | ||
13021 | + case $host_os in | ||
13022 | + mingw* | pw32*) | ||
13023 | + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
13024 | + want_nocaseglob=yes | ||
13025 | + else | ||
13026 | + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` | ||
13027 | + fi | ||
13028 | + ;; | ||
13029 | + esac | ||
13030 | +fi | ||
13031 | + | ||
13032 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
13033 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
13034 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
13035 | @@ -6265,9 +6366,162 @@ | ||
13036 | |||
13037 | |||
13038 | |||
13039 | + | ||
13040 | + | ||
13041 | + | ||
13042 | + | ||
13043 | + | ||
13044 | + | ||
13045 | + | ||
13046 | + | ||
13047 | + | ||
13048 | + | ||
13049 | +if test -n "$ac_tool_prefix"; then | ||
13050 | + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
13051 | +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
13052 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
13053 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
13054 | +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | ||
13055 | + $as_echo_n "(cached) " >&6 | ||
13056 | +else | ||
13057 | + if test -n "$DLLTOOL"; then | ||
13058 | + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
13059 | +else | ||
13060 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
13061 | +for as_dir in $PATH | ||
13062 | +do | ||
13063 | + IFS=$as_save_IFS | ||
13064 | + test -z "$as_dir" && as_dir=. | ||
13065 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
13066 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
13067 | + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
13068 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
13069 | + break 2 | ||
13070 | + fi | ||
13071 | +done | ||
13072 | + done | ||
13073 | +IFS=$as_save_IFS | ||
13074 | + | ||
13075 | +fi | ||
13076 | +fi | ||
13077 | +DLLTOOL=$ac_cv_prog_DLLTOOL | ||
13078 | +if test -n "$DLLTOOL"; then | ||
13079 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 | ||
13080 | +$as_echo "$DLLTOOL" >&6; } | ||
13081 | +else | ||
13082 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
13083 | +$as_echo "no" >&6; } | ||
13084 | +fi | ||
13085 | + | ||
13086 | + | ||
13087 | +fi | ||
13088 | +if test -z "$ac_cv_prog_DLLTOOL"; then | ||
13089 | + ac_ct_DLLTOOL=$DLLTOOL | ||
13090 | + # Extract the first word of "dlltool", so it can be a program name with args. | ||
13091 | +set dummy dlltool; ac_word=$2 | ||
13092 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
13093 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
13094 | +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | ||
13095 | + $as_echo_n "(cached) " >&6 | ||
13096 | +else | ||
13097 | + if test -n "$ac_ct_DLLTOOL"; then | ||
13098 | + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
13099 | +else | ||
13100 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
13101 | +for as_dir in $PATH | ||
13102 | +do | ||
13103 | + IFS=$as_save_IFS | ||
13104 | + test -z "$as_dir" && as_dir=. | ||
13105 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
13106 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
13107 | + ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
13108 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
13109 | + break 2 | ||
13110 | + fi | ||
13111 | +done | ||
13112 | + done | ||
13113 | +IFS=$as_save_IFS | ||
13114 | + | ||
13115 | +fi | ||
13116 | +fi | ||
13117 | +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
13118 | +if test -n "$ac_ct_DLLTOOL"; then | ||
13119 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 | ||
13120 | +$as_echo "$ac_ct_DLLTOOL" >&6; } | ||
13121 | +else | ||
13122 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
13123 | +$as_echo "no" >&6; } | ||
13124 | +fi | ||
13125 | + | ||
13126 | + if test "x$ac_ct_DLLTOOL" = x; then | ||
13127 | + DLLTOOL="false" | ||
13128 | + else | ||
13129 | + case $cross_compiling:$ac_tool_warned in | ||
13130 | +yes:) | ||
13131 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
13132 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
13133 | +ac_tool_warned=yes ;; | ||
13134 | +esac | ||
13135 | + DLLTOOL=$ac_ct_DLLTOOL | ||
13136 | + fi | ||
13137 | +else | ||
13138 | + DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
13139 | +fi | ||
13140 | + | ||
13141 | +test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
13142 | + | ||
13143 | + | ||
13144 | + | ||
13145 | + | ||
13146 | + | ||
13147 | + | ||
13148 | + | ||
13149 | + | ||
13150 | + | ||
13151 | + | ||
13152 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 | ||
13153 | +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } | ||
13154 | +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : | ||
13155 | + $as_echo_n "(cached) " >&6 | ||
13156 | +else | ||
13157 | + lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
13158 | + | ||
13159 | +case $host_os in | ||
13160 | +cygwin* | mingw* | pw32* | cegcc*) | ||
13161 | + # two different shell functions defined in ltmain.sh | ||
13162 | + # decide which to use based on capabilities of $DLLTOOL | ||
13163 | + case `$DLLTOOL --help 2>&1` in | ||
13164 | + *--identify-strict*) | ||
13165 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
13166 | + ;; | ||
13167 | + *) | ||
13168 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
13169 | + ;; | ||
13170 | + esac | ||
13171 | + ;; | ||
13172 | +*) | ||
13173 | + # fallback: assume linklib IS sharedlib | ||
13174 | + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
13175 | + ;; | ||
13176 | +esac | ||
13177 | + | ||
13178 | +fi | ||
13179 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 | ||
13180 | +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } | ||
13181 | +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
13182 | +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
13183 | + | ||
13184 | + | ||
13185 | + | ||
13186 | + | ||
13187 | + | ||
13188 | + | ||
13189 | + | ||
13190 | if test -n "$ac_tool_prefix"; then | ||
13191 | - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
13192 | -set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
13193 | + for ac_prog in ar | ||
13194 | + do | ||
13195 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
13196 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
13197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
13198 | $as_echo_n "checking for $ac_word... " >&6; } | ||
13199 | if test "${ac_cv_prog_AR+set}" = set; then : | ||
13200 | @@ -6283,7 +6537,7 @@ | ||
13201 | test -z "$as_dir" && as_dir=. | ||
13202 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
13203 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
13204 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
13205 | + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | ||
13206 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
13207 | break 2 | ||
13208 | fi | ||
13209 | @@ -6303,11 +6557,15 @@ | ||
13210 | fi | ||
13211 | |||
13212 | |||
13213 | + test -n "$AR" && break | ||
13214 | + done | ||
13215 | fi | ||
13216 | -if test -z "$ac_cv_prog_AR"; then | ||
13217 | +if test -z "$AR"; then | ||
13218 | ac_ct_AR=$AR | ||
13219 | - # Extract the first word of "ar", so it can be a program name with args. | ||
13220 | -set dummy ar; ac_word=$2 | ||
13221 | + for ac_prog in ar | ||
13222 | +do | ||
13223 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
13224 | +set dummy $ac_prog; ac_word=$2 | ||
13225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
13226 | $as_echo_n "checking for $ac_word... " >&6; } | ||
13227 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | ||
13228 | @@ -6323,7 +6581,7 @@ | ||
13229 | test -z "$as_dir" && as_dir=. | ||
13230 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
13231 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
13232 | - ac_cv_prog_ac_ct_AR="ar" | ||
13233 | + ac_cv_prog_ac_ct_AR="$ac_prog" | ||
13234 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
13235 | break 2 | ||
13236 | fi | ||
13237 | @@ -6342,6 +6600,10 @@ | ||
13238 | $as_echo "no" >&6; } | ||
13239 | fi | ||
13240 | |||
13241 | + | ||
13242 | + test -n "$ac_ct_AR" && break | ||
13243 | +done | ||
13244 | + | ||
13245 | if test "x$ac_ct_AR" = x; then | ||
13246 | AR="false" | ||
13247 | else | ||
13248 | @@ -6353,16 +6615,72 @@ | ||
13249 | esac | ||
13250 | AR=$ac_ct_AR | ||
13251 | fi | ||
13252 | -else | ||
13253 | - AR="$ac_cv_prog_AR" | ||
13254 | fi | ||
13255 | |||
13256 | -test -z "$AR" && AR=ar | ||
13257 | -test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
13258 | +: ${AR=ar} | ||
13259 | +: ${AR_FLAGS=cru} | ||
13260 | + | ||
13261 | + | ||
13262 | + | ||
13263 | + | ||
13264 | + | ||
13265 | + | ||
13266 | + | ||
13267 | + | ||
13268 | + | ||
13269 | + | ||
13270 | + | ||
13271 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 | ||
13272 | +$as_echo_n "checking for archiver @FILE support... " >&6; } | ||
13273 | +if test "${lt_cv_ar_at_file+set}" = set; then : | ||
13274 | + $as_echo_n "(cached) " >&6 | ||
13275 | +else | ||
13276 | + lt_cv_ar_at_file=no | ||
13277 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13278 | +/* end confdefs.h. */ | ||
13279 | + | ||
13280 | +int | ||
13281 | +main () | ||
13282 | +{ | ||
13283 | |||
13284 | + ; | ||
13285 | + return 0; | ||
13286 | +} | ||
13287 | +_ACEOF | ||
13288 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
13289 | + echo conftest.$ac_objext > conftest.lst | ||
13290 | + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' | ||
13291 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
13292 | + (eval $lt_ar_try) 2>&5 | ||
13293 | + ac_status=$? | ||
13294 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
13295 | + test $ac_status = 0; } | ||
13296 | + if test "$ac_status" -eq 0; then | ||
13297 | + # Ensure the archiver fails upon bogus file names. | ||
13298 | + rm -f conftest.$ac_objext libconftest.a | ||
13299 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
13300 | + (eval $lt_ar_try) 2>&5 | ||
13301 | + ac_status=$? | ||
13302 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
13303 | + test $ac_status = 0; } | ||
13304 | + if test "$ac_status" -ne 0; then | ||
13305 | + lt_cv_ar_at_file=@ | ||
13306 | + fi | ||
13307 | + fi | ||
13308 | + rm -f conftest.* libconftest.a | ||
13309 | |||
13310 | +fi | ||
13311 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
13312 | |||
13313 | +fi | ||
13314 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 | ||
13315 | +$as_echo "$lt_cv_ar_at_file" >&6; } | ||
13316 | |||
13317 | +if test "x$lt_cv_ar_at_file" = xno; then | ||
13318 | + archiver_list_spec= | ||
13319 | +else | ||
13320 | + archiver_list_spec=$lt_cv_ar_at_file | ||
13321 | +fi | ||
13322 | |||
13323 | |||
13324 | |||
13325 | @@ -6704,8 +7022,8 @@ | ||
13326 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
13327 | |||
13328 | # Transform an extracted symbol line into symbol name and symbol address | ||
13329 | -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
13330 | -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'" | ||
13331 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
13332 | +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'" | ||
13333 | |||
13334 | # Handle CRLF in mingw tool chain | ||
13335 | opt_cr= | ||
13336 | @@ -6741,6 +7059,7 @@ | ||
13337 | else | ||
13338 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
13339 | fi | ||
13340 | + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
13341 | |||
13342 | # Check to see that the pipe works correctly. | ||
13343 | pipe_works=no | ||
13344 | @@ -6782,6 +7101,18 @@ | ||
13345 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
13346 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
13347 | cat <<_LT_EOF > conftest.$ac_ext | ||
13348 | +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
13349 | +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
13350 | +/* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
13351 | + relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
13352 | +# define LT_DLSYM_CONST | ||
13353 | +#elif defined(__osf__) | ||
13354 | +/* This system does not cope well with relocations in const data. */ | ||
13355 | +# define LT_DLSYM_CONST | ||
13356 | +#else | ||
13357 | +# define LT_DLSYM_CONST const | ||
13358 | +#endif | ||
13359 | + | ||
13360 | #ifdef __cplusplus | ||
13361 | extern "C" { | ||
13362 | #endif | ||
13363 | @@ -6793,7 +7124,7 @@ | ||
13364 | cat <<_LT_EOF >> conftest.$ac_ext | ||
13365 | |||
13366 | /* The mapping between symbol names and symbols. */ | ||
13367 | -const struct { | ||
13368 | +LT_DLSYM_CONST struct { | ||
13369 | const char *name; | ||
13370 | void *address; | ||
13371 | } | ||
13372 | @@ -6819,8 +7150,8 @@ | ||
13373 | _LT_EOF | ||
13374 | # Now try linking the two files. | ||
13375 | mv conftest.$ac_objext conftstm.$ac_objext | ||
13376 | - lt_save_LIBS="$LIBS" | ||
13377 | - lt_save_CFLAGS="$CFLAGS" | ||
13378 | + lt_globsym_save_LIBS=$LIBS | ||
13379 | + lt_globsym_save_CFLAGS=$CFLAGS | ||
13380 | LIBS="conftstm.$ac_objext" | ||
13381 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
13382 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | ||
13383 | @@ -6830,8 +7161,8 @@ | ||
13384 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | ||
13385 | pipe_works=yes | ||
13386 | fi | ||
13387 | - LIBS="$lt_save_LIBS" | ||
13388 | - CFLAGS="$lt_save_CFLAGS" | ||
13389 | + LIBS=$lt_globsym_save_LIBS | ||
13390 | + CFLAGS=$lt_globsym_save_CFLAGS | ||
13391 | else | ||
13392 | echo "cannot find nm_test_func in $nlist" >&5 | ||
13393 | fi | ||
13394 | @@ -6868,6 +7199,19 @@ | ||
13395 | $as_echo "ok" >&6; } | ||
13396 | fi | ||
13397 | |||
13398 | +# Response file support. | ||
13399 | +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
13400 | + nm_file_list_spec='@' | ||
13401 | +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then | ||
13402 | + nm_file_list_spec='@' | ||
13403 | +fi | ||
13404 | + | ||
13405 | + | ||
13406 | + | ||
13407 | + | ||
13408 | + | ||
13409 | + | ||
13410 | + | ||
13411 | |||
13412 | |||
13413 | |||
13414 | @@ -6888,6 +7232,42 @@ | ||
13415 | |||
13416 | |||
13417 | |||
13418 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 | ||
13419 | +$as_echo_n "checking for sysroot... " >&6; } | ||
13420 | + | ||
13421 | +# Check whether --with-libtool-sysroot was given. | ||
13422 | +if test "${with_libtool_sysroot+set}" = set; then : | ||
13423 | + withval=$with_libtool_sysroot; | ||
13424 | +else | ||
13425 | + with_libtool_sysroot=no | ||
13426 | +fi | ||
13427 | + | ||
13428 | + | ||
13429 | +lt_sysroot= | ||
13430 | +case ${with_libtool_sysroot} in #( | ||
13431 | + yes) | ||
13432 | + if test "$GCC" = yes; then | ||
13433 | + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
13434 | + fi | ||
13435 | + ;; #( | ||
13436 | + /*) | ||
13437 | + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
13438 | + ;; #( | ||
13439 | + no|'') | ||
13440 | + ;; #( | ||
13441 | + *) | ||
13442 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 | ||
13443 | +$as_echo "${with_libtool_sysroot}" >&6; } | ||
13444 | + as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 | ||
13445 | + ;; | ||
13446 | +esac | ||
13447 | + | ||
13448 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 | ||
13449 | +$as_echo "${lt_sysroot:-no}" >&6; } | ||
13450 | + | ||
13451 | + | ||
13452 | + | ||
13453 | + | ||
13454 | |||
13455 | # Check whether --enable-libtool-lock was given. | ||
13456 | if test "${enable_libtool_lock+set}" = set; then : | ||
13457 | @@ -7095,6 +7475,123 @@ | ||
13458 | |||
13459 | need_locks="$enable_libtool_lock" | ||
13460 | |||
13461 | +if test -n "$ac_tool_prefix"; then | ||
13462 | + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. | ||
13463 | +set dummy ${ac_tool_prefix}mt; ac_word=$2 | ||
13464 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
13465 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
13466 | +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : | ||
13467 | + $as_echo_n "(cached) " >&6 | ||
13468 | +else | ||
13469 | + if test -n "$MANIFEST_TOOL"; then | ||
13470 | + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. | ||
13471 | +else | ||
13472 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
13473 | +for as_dir in $PATH | ||
13474 | +do | ||
13475 | + IFS=$as_save_IFS | ||
13476 | + test -z "$as_dir" && as_dir=. | ||
13477 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
13478 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
13479 | + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" | ||
13480 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
13481 | + break 2 | ||
13482 | + fi | ||
13483 | +done | ||
13484 | + done | ||
13485 | +IFS=$as_save_IFS | ||
13486 | + | ||
13487 | +fi | ||
13488 | +fi | ||
13489 | +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL | ||
13490 | +if test -n "$MANIFEST_TOOL"; then | ||
13491 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 | ||
13492 | +$as_echo "$MANIFEST_TOOL" >&6; } | ||
13493 | +else | ||
13494 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
13495 | +$as_echo "no" >&6; } | ||
13496 | +fi | ||
13497 | + | ||
13498 | + | ||
13499 | +fi | ||
13500 | +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then | ||
13501 | + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL | ||
13502 | + # Extract the first word of "mt", so it can be a program name with args. | ||
13503 | +set dummy mt; ac_word=$2 | ||
13504 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
13505 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
13506 | +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : | ||
13507 | + $as_echo_n "(cached) " >&6 | ||
13508 | +else | ||
13509 | + if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
13510 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. | ||
13511 | +else | ||
13512 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
13513 | +for as_dir in $PATH | ||
13514 | +do | ||
13515 | + IFS=$as_save_IFS | ||
13516 | + test -z "$as_dir" && as_dir=. | ||
13517 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
13518 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
13519 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" | ||
13520 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
13521 | + break 2 | ||
13522 | + fi | ||
13523 | +done | ||
13524 | + done | ||
13525 | +IFS=$as_save_IFS | ||
13526 | + | ||
13527 | +fi | ||
13528 | +fi | ||
13529 | +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL | ||
13530 | +if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
13531 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 | ||
13532 | +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } | ||
13533 | +else | ||
13534 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
13535 | +$as_echo "no" >&6; } | ||
13536 | +fi | ||
13537 | + | ||
13538 | + if test "x$ac_ct_MANIFEST_TOOL" = x; then | ||
13539 | + MANIFEST_TOOL=":" | ||
13540 | + else | ||
13541 | + case $cross_compiling:$ac_tool_warned in | ||
13542 | +yes:) | ||
13543 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
13544 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
13545 | +ac_tool_warned=yes ;; | ||
13546 | +esac | ||
13547 | + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL | ||
13548 | + fi | ||
13549 | +else | ||
13550 | + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" | ||
13551 | +fi | ||
13552 | + | ||
13553 | +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
13554 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 | ||
13555 | +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } | ||
13556 | +if test "${lt_cv_path_mainfest_tool+set}" = set; then : | ||
13557 | + $as_echo_n "(cached) " >&6 | ||
13558 | +else | ||
13559 | + lt_cv_path_mainfest_tool=no | ||
13560 | + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 | ||
13561 | + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
13562 | + cat conftest.err >&5 | ||
13563 | + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
13564 | + lt_cv_path_mainfest_tool=yes | ||
13565 | + fi | ||
13566 | + rm -f conftest* | ||
13567 | +fi | ||
13568 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 | ||
13569 | +$as_echo "$lt_cv_path_mainfest_tool" >&6; } | ||
13570 | +if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
13571 | + MANIFEST_TOOL=: | ||
13572 | +fi | ||
13573 | + | ||
13574 | + | ||
13575 | + | ||
13576 | + | ||
13577 | + | ||
13578 | |||
13579 | case $host_os in | ||
13580 | rhapsody* | darwin*) | ||
13581 | @@ -7658,6 +8155,8 @@ | ||
13582 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | ||
13583 | echo "$AR cru libconftest.a conftest.o" >&5 | ||
13584 | $AR cru libconftest.a conftest.o 2>&5 | ||
13585 | + echo "$RANLIB libconftest.a" >&5 | ||
13586 | + $RANLIB libconftest.a 2>&5 | ||
13587 | cat > conftest.c << _LT_EOF | ||
13588 | int main() { return 0;} | ||
13589 | _LT_EOF | ||
13590 | @@ -7853,7 +8352,8 @@ | ||
13591 | LIBTOOL_DEPS="$ltmain" | ||
13592 | |||
13593 | # Always use our own libtool. | ||
13594 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
13595 | +LIBTOOL='$(SHELL) $(top_builddir)' | ||
13596 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | ||
13597 | |||
13598 | |||
13599 | |||
13600 | @@ -7942,7 +8442,7 @@ | ||
13601 | esac | ||
13602 | |||
13603 | # Global variables: | ||
13604 | -ofile=libtool | ||
13605 | +ofile=${host_alias}-libtool | ||
13606 | can_build_shared=yes | ||
13607 | |||
13608 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
13609 | @@ -8240,8 +8740,6 @@ | ||
13610 | lt_prog_compiler_pic= | ||
13611 | lt_prog_compiler_static= | ||
13612 | |||
13613 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
13614 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
13615 | |||
13616 | if test "$GCC" = yes; then | ||
13617 | lt_prog_compiler_wl='-Wl,' | ||
13618 | @@ -8407,6 +8905,12 @@ | ||
13619 | lt_prog_compiler_pic='--shared' | ||
13620 | lt_prog_compiler_static='--static' | ||
13621 | ;; | ||
13622 | + nagfor*) | ||
13623 | + # NAG Fortran compiler | ||
13624 | + lt_prog_compiler_wl='-Wl,-Wl,,' | ||
13625 | + lt_prog_compiler_pic='-PIC' | ||
13626 | + lt_prog_compiler_static='-Bstatic' | ||
13627 | + ;; | ||
13628 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
13629 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
13630 | # which looks to be a dead project) | ||
13631 | @@ -8469,7 +8973,7 @@ | ||
13632 | lt_prog_compiler_pic='-KPIC' | ||
13633 | lt_prog_compiler_static='-Bstatic' | ||
13634 | case $cc_basename in | ||
13635 | - f77* | f90* | f95*) | ||
13636 | + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
13637 | lt_prog_compiler_wl='-Qoption ld ';; | ||
13638 | *) | ||
13639 | lt_prog_compiler_wl='-Wl,';; | ||
13640 | @@ -8526,13 +9030,17 @@ | ||
13641 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
13642 | ;; | ||
13643 | esac | ||
13644 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 | ||
13645 | -$as_echo "$lt_prog_compiler_pic" >&6; } | ||
13646 | - | ||
13647 | - | ||
13648 | - | ||
13649 | - | ||
13650 | |||
13651 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
13652 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
13653 | +if test "${lt_cv_prog_compiler_pic+set}" = set; then : | ||
13654 | + $as_echo_n "(cached) " >&6 | ||
13655 | +else | ||
13656 | + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic | ||
13657 | +fi | ||
13658 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 | ||
13659 | +$as_echo "$lt_cv_prog_compiler_pic" >&6; } | ||
13660 | +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic | ||
13661 | |||
13662 | # | ||
13663 | # Check to make sure the PIC flag actually works. | ||
13664 | @@ -8593,6 +9101,11 @@ | ||
13665 | |||
13666 | |||
13667 | |||
13668 | + | ||
13669 | + | ||
13670 | + | ||
13671 | + | ||
13672 | + | ||
13673 | # | ||
13674 | # Check to make sure the static flag actually works. | ||
13675 | # | ||
13676 | @@ -8943,7 +9456,8 @@ | ||
13677 | allow_undefined_flag=unsupported | ||
13678 | always_export_symbols=no | ||
13679 | enable_shared_with_static_runtimes=yes | ||
13680 | - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
13681 | + 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' | ||
13682 | + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
13683 | |||
13684 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
13685 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
13686 | @@ -8991,7 +9505,7 @@ | ||
13687 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
13688 | && test "$tmp_diet" = no | ||
13689 | then | ||
13690 | - tmp_addflag= | ||
13691 | + tmp_addflag=' $pic_flag' | ||
13692 | tmp_sharedflag='-shared' | ||
13693 | case $cc_basename,$host_cpu in | ||
13694 | pgcc*) # Portland Group C compiler | ||
13695 | @@ -9042,12 +9556,12 @@ | ||
13696 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | ||
13697 | hardcode_libdir_flag_spec= | ||
13698 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
13699 | - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | ||
13700 | + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
13701 | if test "x$supports_anon_versioning" = xyes; then | ||
13702 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | ||
13703 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
13704 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
13705 | - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
13706 | + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
13707 | fi | ||
13708 | ;; | ||
13709 | esac | ||
13710 | @@ -9061,8 +9575,8 @@ | ||
13711 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
13712 | wlarc= | ||
13713 | else | ||
13714 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
13715 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
13716 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
13717 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
13718 | fi | ||
13719 | ;; | ||
13720 | |||
13721 | @@ -9080,8 +9594,8 @@ | ||
13722 | |||
13723 | _LT_EOF | ||
13724 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
13725 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
13726 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
13727 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
13728 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
13729 | else | ||
13730 | ld_shlibs=no | ||
13731 | fi | ||
13732 | @@ -9127,8 +9641,8 @@ | ||
13733 | |||
13734 | *) | ||
13735 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
13736 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
13737 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
13738 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
13739 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
13740 | else | ||
13741 | ld_shlibs=no | ||
13742 | fi | ||
13743 | @@ -9258,7 +9772,13 @@ | ||
13744 | allow_undefined_flag='-berok' | ||
13745 | # Determine the default libpath from the value encoded in an | ||
13746 | # empty executable. | ||
13747 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13748 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
13749 | + aix_libpath=$lt_cv_aix_libpath | ||
13750 | +else | ||
13751 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
13752 | + $as_echo_n "(cached) " >&6 | ||
13753 | +else | ||
13754 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13755 | /* end confdefs.h. */ | ||
13756 | |||
13757 | int | ||
13758 | @@ -9271,22 +9791,29 @@ | ||
13759 | _ACEOF | ||
13760 | if ac_fn_c_try_link "$LINENO"; then : | ||
13761 | |||
13762 | -lt_aix_libpath_sed=' | ||
13763 | - /Import File Strings/,/^$/ { | ||
13764 | - /^0/ { | ||
13765 | - s/^0 *\(.*\)$/\1/ | ||
13766 | - p | ||
13767 | - } | ||
13768 | - }' | ||
13769 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13770 | -# Check for a 64-bit object if we didn't find anything. | ||
13771 | -if test -z "$aix_libpath"; then | ||
13772 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13773 | -fi | ||
13774 | + lt_aix_libpath_sed=' | ||
13775 | + /Import File Strings/,/^$/ { | ||
13776 | + /^0/ { | ||
13777 | + s/^0 *\([^ ]*\) *$/\1/ | ||
13778 | + p | ||
13779 | + } | ||
13780 | + }' | ||
13781 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13782 | + # Check for a 64-bit object if we didn't find anything. | ||
13783 | + if test -z "$lt_cv_aix_libpath_"; then | ||
13784 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13785 | + fi | ||
13786 | fi | ||
13787 | rm -f core conftest.err conftest.$ac_objext \ | ||
13788 | conftest$ac_exeext conftest.$ac_ext | ||
13789 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
13790 | + if test -z "$lt_cv_aix_libpath_"; then | ||
13791 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
13792 | + fi | ||
13793 | + | ||
13794 | +fi | ||
13795 | + | ||
13796 | + aix_libpath=$lt_cv_aix_libpath_ | ||
13797 | +fi | ||
13798 | |||
13799 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
13800 | 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" | ||
13801 | @@ -9298,7 +9825,13 @@ | ||
13802 | else | ||
13803 | # Determine the default libpath from the value encoded in an | ||
13804 | # empty executable. | ||
13805 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13806 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
13807 | + aix_libpath=$lt_cv_aix_libpath | ||
13808 | +else | ||
13809 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
13810 | + $as_echo_n "(cached) " >&6 | ||
13811 | +else | ||
13812 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13813 | /* end confdefs.h. */ | ||
13814 | |||
13815 | int | ||
13816 | @@ -9311,22 +9844,29 @@ | ||
13817 | _ACEOF | ||
13818 | if ac_fn_c_try_link "$LINENO"; then : | ||
13819 | |||
13820 | -lt_aix_libpath_sed=' | ||
13821 | - /Import File Strings/,/^$/ { | ||
13822 | - /^0/ { | ||
13823 | - s/^0 *\(.*\)$/\1/ | ||
13824 | - p | ||
13825 | - } | ||
13826 | - }' | ||
13827 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13828 | -# Check for a 64-bit object if we didn't find anything. | ||
13829 | -if test -z "$aix_libpath"; then | ||
13830 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13831 | -fi | ||
13832 | + lt_aix_libpath_sed=' | ||
13833 | + /Import File Strings/,/^$/ { | ||
13834 | + /^0/ { | ||
13835 | + s/^0 *\([^ ]*\) *$/\1/ | ||
13836 | + p | ||
13837 | + } | ||
13838 | + }' | ||
13839 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13840 | + # Check for a 64-bit object if we didn't find anything. | ||
13841 | + if test -z "$lt_cv_aix_libpath_"; then | ||
13842 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
13843 | + fi | ||
13844 | fi | ||
13845 | rm -f core conftest.err conftest.$ac_objext \ | ||
13846 | conftest$ac_exeext conftest.$ac_ext | ||
13847 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
13848 | + if test -z "$lt_cv_aix_libpath_"; then | ||
13849 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
13850 | + fi | ||
13851 | + | ||
13852 | +fi | ||
13853 | + | ||
13854 | + aix_libpath=$lt_cv_aix_libpath_ | ||
13855 | +fi | ||
13856 | |||
13857 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
13858 | # Warning - without using the other run time loading flags, | ||
13859 | @@ -9371,20 +9911,63 @@ | ||
13860 | # Microsoft Visual C++. | ||
13861 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
13862 | # no search path for DLLs. | ||
13863 | - hardcode_libdir_flag_spec=' ' | ||
13864 | - allow_undefined_flag=unsupported | ||
13865 | - # Tell ltmain to make .lib files, not .a files. | ||
13866 | - libext=lib | ||
13867 | - # Tell ltmain to make .dll files, not .so files. | ||
13868 | - shrext_cmds=".dll" | ||
13869 | - # FIXME: Setting linknames here is a bad hack. | ||
13870 | - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
13871 | - # The linker will automatically build a .lib file if we build a DLL. | ||
13872 | - old_archive_from_new_cmds='true' | ||
13873 | - # FIXME: Should let the user specify the lib program. | ||
13874 | - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
13875 | - fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
13876 | - enable_shared_with_static_runtimes=yes | ||
13877 | + case $cc_basename in | ||
13878 | + cl*) | ||
13879 | + # Native MSVC | ||
13880 | + hardcode_libdir_flag_spec=' ' | ||
13881 | + allow_undefined_flag=unsupported | ||
13882 | + always_export_symbols=yes | ||
13883 | + file_list_spec='@' | ||
13884 | + # Tell ltmain to make .lib files, not .a files. | ||
13885 | + libext=lib | ||
13886 | + # Tell ltmain to make .dll files, not .so files. | ||
13887 | + shrext_cmds=".dll" | ||
13888 | + # FIXME: Setting linknames here is a bad hack. | ||
13889 | + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
13890 | + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
13891 | + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
13892 | + else | ||
13893 | + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
13894 | + fi~ | ||
13895 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
13896 | + linknames=' | ||
13897 | + # The linker will not automatically build a static lib if we build a DLL. | ||
13898 | + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' | ||
13899 | + enable_shared_with_static_runtimes=yes | ||
13900 | + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
13901 | + # Don't use ranlib | ||
13902 | + old_postinstall_cmds='chmod 644 $oldlib' | ||
13903 | + postlink_cmds='lt_outputfile="@OUTPUT@"~ | ||
13904 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
13905 | + case $lt_outputfile in | ||
13906 | + *.exe|*.EXE) ;; | ||
13907 | + *) | ||
13908 | + lt_outputfile="$lt_outputfile.exe" | ||
13909 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
13910 | + ;; | ||
13911 | + esac~ | ||
13912 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
13913 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
13914 | + $RM "$lt_outputfile.manifest"; | ||
13915 | + fi' | ||
13916 | + ;; | ||
13917 | + *) | ||
13918 | + # Assume MSVC wrapper | ||
13919 | + hardcode_libdir_flag_spec=' ' | ||
13920 | + allow_undefined_flag=unsupported | ||
13921 | + # Tell ltmain to make .lib files, not .a files. | ||
13922 | + libext=lib | ||
13923 | + # Tell ltmain to make .dll files, not .so files. | ||
13924 | + shrext_cmds=".dll" | ||
13925 | + # FIXME: Setting linknames here is a bad hack. | ||
13926 | + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
13927 | + # The linker will automatically build a .lib file if we build a DLL. | ||
13928 | + old_archive_from_new_cmds='true' | ||
13929 | + # FIXME: Should let the user specify the lib program. | ||
13930 | + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
13931 | + enable_shared_with_static_runtimes=yes | ||
13932 | + ;; | ||
13933 | + esac | ||
13934 | ;; | ||
13935 | |||
13936 | darwin* | rhapsody*) | ||
13937 | @@ -9445,7 +10028,7 @@ | ||
13938 | |||
13939 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
13940 | freebsd* | dragonfly*) | ||
13941 | - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
13942 | + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
13943 | hardcode_libdir_flag_spec='-R$libdir' | ||
13944 | hardcode_direct=yes | ||
13945 | hardcode_shlibpath_var=no | ||
13946 | @@ -9453,7 +10036,7 @@ | ||
13947 | |||
13948 | hpux9*) | ||
13949 | if test "$GCC" = yes; then | ||
13950 | - 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' | ||
13951 | + 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' | ||
13952 | else | ||
13953 | 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' | ||
13954 | fi | ||
13955 | @@ -9469,7 +10052,7 @@ | ||
13956 | |||
13957 | hpux10*) | ||
13958 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
13959 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
13960 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
13961 | else | ||
13962 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
13963 | fi | ||
13964 | @@ -9493,10 +10076,10 @@ | ||
13965 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
13966 | ;; | ||
13967 | ia64*) | ||
13968 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
13969 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
13970 | ;; | ||
13971 | *) | ||
13972 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
13973 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
13974 | ;; | ||
13975 | esac | ||
13976 | else | ||
13977 | @@ -9575,23 +10158,36 @@ | ||
13978 | |||
13979 | irix5* | irix6* | nonstopux*) | ||
13980 | if test "$GCC" = yes; then | ||
13981 | - 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' | ||
13982 | + 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' | ||
13983 | # Try to use the -exported_symbol ld option, if it does not | ||
13984 | # work, assume that -exports_file does not work either and | ||
13985 | # implicitly export all symbols. | ||
13986 | - save_LDFLAGS="$LDFLAGS" | ||
13987 | - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
13988 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13989 | + # This should be the same for all languages, so no per-tag cache variable. | ||
13990 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 | ||
13991 | +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } | ||
13992 | +if test "${lt_cv_irix_exported_symbol+set}" = set; then : | ||
13993 | + $as_echo_n "(cached) " >&6 | ||
13994 | +else | ||
13995 | + save_LDFLAGS="$LDFLAGS" | ||
13996 | + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
13997 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
13998 | /* end confdefs.h. */ | ||
13999 | -int foo(void) {} | ||
14000 | +int foo (void) { return 0; } | ||
14001 | _ACEOF | ||
14002 | if ac_fn_c_try_link "$LINENO"; then : | ||
14003 | - 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' | ||
14004 | - | ||
14005 | + lt_cv_irix_exported_symbol=yes | ||
14006 | +else | ||
14007 | + lt_cv_irix_exported_symbol=no | ||
14008 | fi | ||
14009 | rm -f core conftest.err conftest.$ac_objext \ | ||
14010 | conftest$ac_exeext conftest.$ac_ext | ||
14011 | - LDFLAGS="$save_LDFLAGS" | ||
14012 | + LDFLAGS="$save_LDFLAGS" | ||
14013 | +fi | ||
14014 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 | ||
14015 | +$as_echo "$lt_cv_irix_exported_symbol" >&6; } | ||
14016 | + if test "$lt_cv_irix_exported_symbol" = yes; then | ||
14017 | + 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' | ||
14018 | + fi | ||
14019 | else | ||
14020 | 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' | ||
14021 | 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' | ||
14022 | @@ -9676,7 +10272,7 @@ | ||
14023 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
14024 | if test "$GCC" = yes; then | ||
14025 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
14026 | - 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' | ||
14027 | + 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' | ||
14028 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
14029 | else | ||
14030 | allow_undefined_flag=' -expect_unresolved \*' | ||
14031 | @@ -9695,9 +10291,9 @@ | ||
14032 | no_undefined_flag=' -z defs' | ||
14033 | if test "$GCC" = yes; then | ||
14034 | wlarc='${wl}' | ||
14035 | - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14036 | + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14037 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
14038 | - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
14039 | + $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' | ||
14040 | else | ||
14041 | case `$CC -V 2>&1` in | ||
14042 | *"Compilers 5.0"*) | ||
14043 | @@ -10273,8 +10869,9 @@ | ||
14044 | need_version=no | ||
14045 | need_lib_prefix=no | ||
14046 | |||
14047 | - case $GCC,$host_os in | ||
14048 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
14049 | + case $GCC,$cc_basename in | ||
14050 | + yes,*) | ||
14051 | + # gcc | ||
14052 | library_names_spec='$libname.dll.a' | ||
14053 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
14054 | postinstall_cmds='base_file=`basename \${file}`~ | ||
14055 | @@ -10307,13 +10904,71 @@ | ||
14056 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
14057 | ;; | ||
14058 | esac | ||
14059 | + dynamic_linker='Win32 ld.exe' | ||
14060 | + ;; | ||
14061 | + | ||
14062 | + *,cl*) | ||
14063 | + # Native MSVC | ||
14064 | + libname_spec='$name' | ||
14065 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
14066 | + library_names_spec='${libname}.dll.lib' | ||
14067 | + | ||
14068 | + case $build_os in | ||
14069 | + mingw*) | ||
14070 | + sys_lib_search_path_spec= | ||
14071 | + lt_save_ifs=$IFS | ||
14072 | + IFS=';' | ||
14073 | + for lt_path in $LIB | ||
14074 | + do | ||
14075 | + IFS=$lt_save_ifs | ||
14076 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
14077 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
14078 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
14079 | + done | ||
14080 | + IFS=$lt_save_ifs | ||
14081 | + # Convert to MSYS style. | ||
14082 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
14083 | + ;; | ||
14084 | + cygwin*) | ||
14085 | + # Convert to unix form, then to dos form, then back to unix form | ||
14086 | + # but this time dos style (no spaces!) so that the unix form looks | ||
14087 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
14088 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
14089 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
14090 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
14091 | + ;; | ||
14092 | + *) | ||
14093 | + sys_lib_search_path_spec="$LIB" | ||
14094 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
14095 | + # It is most probably a Windows format PATH. | ||
14096 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
14097 | + else | ||
14098 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
14099 | + fi | ||
14100 | + # FIXME: find the short name or the path components, as spaces are | ||
14101 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
14102 | + ;; | ||
14103 | + esac | ||
14104 | + | ||
14105 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
14106 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
14107 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
14108 | + dldir=$destdir/`dirname \$dlpath`~ | ||
14109 | + test -d \$dldir || mkdir -p \$dldir~ | ||
14110 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
14111 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
14112 | + dlpath=$dir/\$dldll~ | ||
14113 | + $RM \$dlpath' | ||
14114 | + shlibpath_overrides_runpath=yes | ||
14115 | + dynamic_linker='Win32 link.exe' | ||
14116 | ;; | ||
14117 | |||
14118 | *) | ||
14119 | + # Assume MSVC wrapper | ||
14120 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
14121 | + dynamic_linker='Win32 ld.exe' | ||
14122 | ;; | ||
14123 | esac | ||
14124 | - dynamic_linker='Win32 ld.exe' | ||
14125 | # FIXME: first we should search . and the directory the executable is in | ||
14126 | shlibpath_var=PATH | ||
14127 | ;; | ||
14128 | @@ -10405,7 +11060,7 @@ | ||
14129 | soname_spec='${libname}${release}${shared_ext}$major' | ||
14130 | shlibpath_var=LIBRARY_PATH | ||
14131 | shlibpath_overrides_runpath=yes | ||
14132 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
14133 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
14134 | hardcode_into_libs=yes | ||
14135 | ;; | ||
14136 | |||
14137 | @@ -11245,10 +11900,10 @@ | ||
14138 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
14139 | correspondingly for the symbols needed. */ | ||
14140 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
14141 | -void fnord () __attribute__((visibility("default"))); | ||
14142 | +int fnord () __attribute__((visibility("default"))); | ||
14143 | #endif | ||
14144 | |||
14145 | -void fnord () { int i=42; } | ||
14146 | +int fnord () { return 42; } | ||
14147 | int main () | ||
14148 | { | ||
14149 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
14150 | @@ -11351,10 +12006,10 @@ | ||
14151 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
14152 | correspondingly for the symbols needed. */ | ||
14153 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
14154 | -void fnord () __attribute__((visibility("default"))); | ||
14155 | +int fnord () __attribute__((visibility("default"))); | ||
14156 | #endif | ||
14157 | |||
14158 | -void fnord () { int i=42; } | ||
14159 | +int fnord () { return 42; } | ||
14160 | int main () | ||
14161 | { | ||
14162 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
14163 | @@ -15064,13 +15719,20 @@ | ||
14164 | lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' | ||
14165 | lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' | ||
14166 | lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' | ||
14167 | +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
14168 | +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
14169 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' | ||
14170 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' | ||
14171 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' | ||
14172 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' | ||
14173 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' | ||
14174 | +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' | ||
14175 | +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' | ||
14176 | +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' | ||
14177 | +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' | ||
14178 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' | ||
14179 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' | ||
14180 | +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' | ||
14181 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' | ||
14182 | RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' | ||
14183 | old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' | ||
14184 | @@ -15085,14 +15747,17 @@ | ||
14185 | lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' | ||
14186 | lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' | ||
14187 | 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"`' | ||
14188 | +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
14189 | +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' | ||
14190 | objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' | ||
14191 | MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' | ||
14192 | lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' | ||
14193 | -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
14194 | lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' | ||
14195 | +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
14196 | lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' | ||
14197 | lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' | ||
14198 | need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' | ||
14199 | +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' | ||
14200 | DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' | ||
14201 | NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' | ||
14202 | LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' | ||
14203 | @@ -15125,12 +15790,12 @@ | ||
14204 | hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' | ||
14205 | inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' | ||
14206 | link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' | ||
14207 | -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' | ||
14208 | always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' | ||
14209 | export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' | ||
14210 | exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' | ||
14211 | include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' | ||
14212 | prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' | ||
14213 | +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' | ||
14214 | file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
14215 | variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' | ||
14216 | need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' | ||
14217 | @@ -15185,8 +15850,13 @@ | ||
14218 | OBJDUMP \ | ||
14219 | deplibs_check_method \ | ||
14220 | file_magic_cmd \ | ||
14221 | +file_magic_glob \ | ||
14222 | +want_nocaseglob \ | ||
14223 | +DLLTOOL \ | ||
14224 | +sharedlib_from_linklib_cmd \ | ||
14225 | AR \ | ||
14226 | AR_FLAGS \ | ||
14227 | +archiver_list_spec \ | ||
14228 | STRIP \ | ||
14229 | RANLIB \ | ||
14230 | CC \ | ||
14231 | @@ -15196,12 +15866,14 @@ | ||
14232 | lt_cv_sys_global_symbol_to_cdecl \ | ||
14233 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
14234 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ | ||
14235 | +nm_file_list_spec \ | ||
14236 | lt_prog_compiler_no_builtin_flag \ | ||
14237 | -lt_prog_compiler_wl \ | ||
14238 | lt_prog_compiler_pic \ | ||
14239 | +lt_prog_compiler_wl \ | ||
14240 | lt_prog_compiler_static \ | ||
14241 | lt_cv_prog_compiler_c_o \ | ||
14242 | need_locks \ | ||
14243 | +MANIFEST_TOOL \ | ||
14244 | DSYMUTIL \ | ||
14245 | NMEDIT \ | ||
14246 | LIPO \ | ||
14247 | @@ -15217,7 +15889,6 @@ | ||
14248 | hardcode_libdir_flag_spec \ | ||
14249 | hardcode_libdir_flag_spec_ld \ | ||
14250 | hardcode_libdir_separator \ | ||
14251 | -fix_srcfile_path \ | ||
14252 | exclude_expsyms \ | ||
14253 | include_expsyms \ | ||
14254 | file_list_spec \ | ||
14255 | @@ -15253,6 +15924,7 @@ | ||
14256 | module_expsym_cmds \ | ||
14257 | export_symbols_cmds \ | ||
14258 | prelink_cmds \ | ||
14259 | +postlink_cmds \ | ||
14260 | postinstall_cmds \ | ||
14261 | postuninstall_cmds \ | ||
14262 | finish_cmds \ | ||
14263 | @@ -16017,7 +16689,8 @@ | ||
14264 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
14265 | # | ||
14266 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
14267 | -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
14268 | +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, | ||
14269 | +# Inc. | ||
14270 | # Written by Gordon Matzigkeit, 1996 | ||
14271 | # | ||
14272 | # This file is part of GNU Libtool. | ||
14273 | @@ -16120,19 +16793,42 @@ | ||
14274 | # turn newlines into spaces. | ||
14275 | NL2SP=$lt_lt_NL2SP | ||
14276 | |||
14277 | +# convert \$build file names to \$host format. | ||
14278 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
14279 | + | ||
14280 | +# convert \$build files to toolchain format. | ||
14281 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
14282 | + | ||
14283 | # An object symbol dumper. | ||
14284 | OBJDUMP=$lt_OBJDUMP | ||
14285 | |||
14286 | # Method to check whether dependent libraries are shared objects. | ||
14287 | deplibs_check_method=$lt_deplibs_check_method | ||
14288 | |||
14289 | -# Command to use when deplibs_check_method == "file_magic". | ||
14290 | +# Command to use when deplibs_check_method = "file_magic". | ||
14291 | file_magic_cmd=$lt_file_magic_cmd | ||
14292 | |||
14293 | +# How to find potential files when deplibs_check_method = "file_magic". | ||
14294 | +file_magic_glob=$lt_file_magic_glob | ||
14295 | + | ||
14296 | +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". | ||
14297 | +want_nocaseglob=$lt_want_nocaseglob | ||
14298 | + | ||
14299 | +# DLL creation program. | ||
14300 | +DLLTOOL=$lt_DLLTOOL | ||
14301 | + | ||
14302 | +# Command to associate shared and link libraries. | ||
14303 | +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd | ||
14304 | + | ||
14305 | # The archiver. | ||
14306 | AR=$lt_AR | ||
14307 | + | ||
14308 | +# Flags to create an archive. | ||
14309 | AR_FLAGS=$lt_AR_FLAGS | ||
14310 | |||
14311 | +# How to feed a file listing to the archiver. | ||
14312 | +archiver_list_spec=$lt_archiver_list_spec | ||
14313 | + | ||
14314 | # A symbol stripping program. | ||
14315 | STRIP=$lt_STRIP | ||
14316 | |||
14317 | @@ -16162,6 +16858,12 @@ | ||
14318 | # Transform the output of nm in a C name address pair when lib prefix is needed. | ||
14319 | global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix | ||
14320 | |||
14321 | +# Specify filename containing input files for \$NM. | ||
14322 | +nm_file_list_spec=$lt_nm_file_list_spec | ||
14323 | + | ||
14324 | +# The root where to search for dependent libraries,and in which our libraries should be installed. | ||
14325 | +lt_sysroot=$lt_sysroot | ||
14326 | + | ||
14327 | # The name of the directory that contains temporary libtool files. | ||
14328 | objdir=$objdir | ||
14329 | |||
14330 | @@ -16171,6 +16873,9 @@ | ||
14331 | # Must we lock files when doing compilation? | ||
14332 | need_locks=$lt_need_locks | ||
14333 | |||
14334 | +# Manifest tool. | ||
14335 | +MANIFEST_TOOL=$lt_MANIFEST_TOOL | ||
14336 | + | ||
14337 | # Tool to manipulate archived DWARF debug symbol files on Mac OS X. | ||
14338 | DSYMUTIL=$lt_DSYMUTIL | ||
14339 | |||
14340 | @@ -16285,12 +16990,12 @@ | ||
14341 | # Compiler flag to turn off builtin functions. | ||
14342 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
14343 | |||
14344 | -# How to pass a linker flag through the compiler. | ||
14345 | -wl=$lt_lt_prog_compiler_wl | ||
14346 | - | ||
14347 | # Additional compiler flags for building library objects. | ||
14348 | pic_flag=$lt_lt_prog_compiler_pic | ||
14349 | |||
14350 | +# How to pass a linker flag through the compiler. | ||
14351 | +wl=$lt_lt_prog_compiler_wl | ||
14352 | + | ||
14353 | # Compiler flag to prevent dynamic linking. | ||
14354 | link_static_flag=$lt_lt_prog_compiler_static | ||
14355 | |||
14356 | @@ -16377,9 +17082,6 @@ | ||
14357 | # Whether libtool must link a program against all its dependency libraries. | ||
14358 | link_all_deplibs=$link_all_deplibs | ||
14359 | |||
14360 | -# Fix the shell variable \$srcfile for the compiler. | ||
14361 | -fix_srcfile_path=$lt_fix_srcfile_path | ||
14362 | - | ||
14363 | # Set to "yes" if exported symbols are required. | ||
14364 | always_export_symbols=$always_export_symbols | ||
14365 | |||
14366 | @@ -16395,6 +17097,9 @@ | ||
14367 | # Commands necessary for linking programs (against libraries) with templates. | ||
14368 | prelink_cmds=$lt_prelink_cmds | ||
14369 | |||
14370 | +# Commands necessary for finishing linking programs. | ||
14371 | +postlink_cmds=$lt_postlink_cmds | ||
14372 | + | ||
14373 | # Specify filename containing input files. | ||
14374 | file_list_spec=$lt_file_list_spec | ||
14375 | |||
14376 | @@ -16427,210 +17132,169 @@ | ||
14377 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
14378 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
14379 | # is reportedly fixed, but why not run on old versions too? | ||
14380 | - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | ||
14381 | - || (rm -f "$cfgfile"; exit 1) | ||
14382 | - | ||
14383 | - case $xsi_shell in | ||
14384 | - yes) | ||
14385 | - cat << \_LT_EOF >> "$cfgfile" | ||
14386 | - | ||
14387 | -# func_dirname file append nondir_replacement | ||
14388 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
14389 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
14390 | -func_dirname () | ||
14391 | -{ | ||
14392 | - case ${1} in | ||
14393 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
14394 | - * ) func_dirname_result="${3}" ;; | ||
14395 | - esac | ||
14396 | -} | ||
14397 | - | ||
14398 | -# func_basename file | ||
14399 | -func_basename () | ||
14400 | -{ | ||
14401 | - func_basename_result="${1##*/}" | ||
14402 | -} | ||
14403 | - | ||
14404 | -# func_dirname_and_basename file append nondir_replacement | ||
14405 | -# perform func_basename and func_dirname in a single function | ||
14406 | -# call: | ||
14407 | -# dirname: Compute the dirname of FILE. If nonempty, | ||
14408 | -# add APPEND to the result, otherwise set result | ||
14409 | -# to NONDIR_REPLACEMENT. | ||
14410 | -# value returned in "$func_dirname_result" | ||
14411 | -# basename: Compute filename of FILE. | ||
14412 | -# value retuned in "$func_basename_result" | ||
14413 | -# Implementation must be kept synchronized with func_dirname | ||
14414 | -# and func_basename. For efficiency, we do not delegate to | ||
14415 | -# those functions but instead duplicate the functionality here. | ||
14416 | -func_dirname_and_basename () | ||
14417 | -{ | ||
14418 | - case ${1} in | ||
14419 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
14420 | - * ) func_dirname_result="${3}" ;; | ||
14421 | - esac | ||
14422 | - func_basename_result="${1##*/}" | ||
14423 | -} | ||
14424 | - | ||
14425 | -# func_stripname prefix suffix name | ||
14426 | -# strip PREFIX and SUFFIX off of NAME. | ||
14427 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
14428 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
14429 | -# dot (in which case that matches only a dot). | ||
14430 | -func_stripname () | ||
14431 | -{ | ||
14432 | - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
14433 | - # positional parameters, so assign one to ordinary parameter first. | ||
14434 | - func_stripname_result=${3} | ||
14435 | - func_stripname_result=${func_stripname_result#"${1}"} | ||
14436 | - func_stripname_result=${func_stripname_result%"${2}"} | ||
14437 | -} | ||
14438 | - | ||
14439 | -# func_opt_split | ||
14440 | -func_opt_split () | ||
14441 | -{ | ||
14442 | - func_opt_split_opt=${1%%=*} | ||
14443 | - func_opt_split_arg=${1#*=} | ||
14444 | -} | ||
14445 | - | ||
14446 | -# func_lo2o object | ||
14447 | -func_lo2o () | ||
14448 | -{ | ||
14449 | - case ${1} in | ||
14450 | - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
14451 | - *) func_lo2o_result=${1} ;; | ||
14452 | - esac | ||
14453 | -} | ||
14454 | - | ||
14455 | -# func_xform libobj-or-source | ||
14456 | -func_xform () | ||
14457 | -{ | ||
14458 | - func_xform_result=${1%.*}.lo | ||
14459 | -} | ||
14460 | - | ||
14461 | -# func_arith arithmetic-term... | ||
14462 | -func_arith () | ||
14463 | -{ | ||
14464 | - func_arith_result=$(( $* )) | ||
14465 | -} | ||
14466 | - | ||
14467 | -# func_len string | ||
14468 | -# STRING may not start with a hyphen. | ||
14469 | -func_len () | ||
14470 | -{ | ||
14471 | - func_len_result=${#1} | ||
14472 | -} | ||
14473 | - | ||
14474 | -_LT_EOF | ||
14475 | - ;; | ||
14476 | - *) # Bourne compatible functions. | ||
14477 | - cat << \_LT_EOF >> "$cfgfile" | ||
14478 | - | ||
14479 | -# func_dirname file append nondir_replacement | ||
14480 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
14481 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
14482 | -func_dirname () | ||
14483 | -{ | ||
14484 | - # Extract subdirectory from the argument. | ||
14485 | - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | ||
14486 | - if test "X$func_dirname_result" = "X${1}"; then | ||
14487 | - func_dirname_result="${3}" | ||
14488 | - else | ||
14489 | - func_dirname_result="$func_dirname_result${2}" | ||
14490 | - fi | ||
14491 | -} | ||
14492 | - | ||
14493 | -# func_basename file | ||
14494 | -func_basename () | ||
14495 | -{ | ||
14496 | - func_basename_result=`$ECHO "${1}" | $SED "$basename"` | ||
14497 | -} | ||
14498 | - | ||
14499 | - | ||
14500 | -# func_stripname prefix suffix name | ||
14501 | -# strip PREFIX and SUFFIX off of NAME. | ||
14502 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
14503 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
14504 | -# dot (in which case that matches only a dot). | ||
14505 | -# func_strip_suffix prefix name | ||
14506 | -func_stripname () | ||
14507 | -{ | ||
14508 | - case ${2} in | ||
14509 | - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
14510 | - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
14511 | - esac | ||
14512 | -} | ||
14513 | - | ||
14514 | -# sed scripts: | ||
14515 | -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' | ||
14516 | -my_sed_long_arg='1s/^-[^=]*=//' | ||
14517 | - | ||
14518 | -# func_opt_split | ||
14519 | -func_opt_split () | ||
14520 | -{ | ||
14521 | - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` | ||
14522 | - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` | ||
14523 | -} | ||
14524 | - | ||
14525 | -# func_lo2o object | ||
14526 | -func_lo2o () | ||
14527 | -{ | ||
14528 | - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | ||
14529 | -} | ||
14530 | - | ||
14531 | -# func_xform libobj-or-source | ||
14532 | -func_xform () | ||
14533 | -{ | ||
14534 | - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | ||
14535 | -} | ||
14536 | - | ||
14537 | -# func_arith arithmetic-term... | ||
14538 | -func_arith () | ||
14539 | -{ | ||
14540 | - func_arith_result=`expr "$@"` | ||
14541 | -} | ||
14542 | - | ||
14543 | -# func_len string | ||
14544 | -# STRING may not start with a hyphen. | ||
14545 | -func_len () | ||
14546 | -{ | ||
14547 | - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` | ||
14548 | -} | ||
14549 | - | ||
14550 | -_LT_EOF | ||
14551 | -esac | ||
14552 | - | ||
14553 | -case $lt_shell_append in | ||
14554 | - yes) | ||
14555 | - cat << \_LT_EOF >> "$cfgfile" | ||
14556 | - | ||
14557 | -# func_append var value | ||
14558 | -# Append VALUE to the end of shell variable VAR. | ||
14559 | -func_append () | ||
14560 | -{ | ||
14561 | - eval "$1+=\$2" | ||
14562 | -} | ||
14563 | -_LT_EOF | ||
14564 | - ;; | ||
14565 | - *) | ||
14566 | - cat << \_LT_EOF >> "$cfgfile" | ||
14567 | - | ||
14568 | -# func_append var value | ||
14569 | -# Append VALUE to the end of shell variable VAR. | ||
14570 | -func_append () | ||
14571 | -{ | ||
14572 | - eval "$1=\$$1\$2" | ||
14573 | -} | ||
14574 | - | ||
14575 | -_LT_EOF | ||
14576 | - ;; | ||
14577 | - esac | ||
14578 | + sed '$q' "$ltmain" >> "$cfgfile" \ | ||
14579 | + || (rm -f "$cfgfile"; exit 1) | ||
14580 | |||
14581 | + if test x"$xsi_shell" = xyes; then | ||
14582 | + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ | ||
14583 | +func_dirname ()\ | ||
14584 | +{\ | ||
14585 | +\ case ${1} in\ | ||
14586 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
14587 | +\ * ) func_dirname_result="${3}" ;;\ | ||
14588 | +\ esac\ | ||
14589 | +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14590 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14591 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14592 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14593 | + | ||
14594 | + | ||
14595 | + sed -e '/^func_basename ()$/,/^} # func_basename /c\ | ||
14596 | +func_basename ()\ | ||
14597 | +{\ | ||
14598 | +\ func_basename_result="${1##*/}"\ | ||
14599 | +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14600 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14601 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14602 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14603 | + | ||
14604 | + | ||
14605 | + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ | ||
14606 | +func_dirname_and_basename ()\ | ||
14607 | +{\ | ||
14608 | +\ case ${1} in\ | ||
14609 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
14610 | +\ * ) func_dirname_result="${3}" ;;\ | ||
14611 | +\ esac\ | ||
14612 | +\ func_basename_result="${1##*/}"\ | ||
14613 | +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14614 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14615 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14616 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14617 | + | ||
14618 | + | ||
14619 | + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ | ||
14620 | +func_stripname ()\ | ||
14621 | +{\ | ||
14622 | +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ | ||
14623 | +\ # positional parameters, so assign one to ordinary parameter first.\ | ||
14624 | +\ func_stripname_result=${3}\ | ||
14625 | +\ func_stripname_result=${func_stripname_result#"${1}"}\ | ||
14626 | +\ func_stripname_result=${func_stripname_result%"${2}"}\ | ||
14627 | +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14628 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14629 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14630 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14631 | + | ||
14632 | + | ||
14633 | + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ | ||
14634 | +func_split_long_opt ()\ | ||
14635 | +{\ | ||
14636 | +\ func_split_long_opt_name=${1%%=*}\ | ||
14637 | +\ func_split_long_opt_arg=${1#*=}\ | ||
14638 | +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14639 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14640 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14641 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14642 | + | ||
14643 | + | ||
14644 | + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ | ||
14645 | +func_split_short_opt ()\ | ||
14646 | +{\ | ||
14647 | +\ func_split_short_opt_arg=${1#??}\ | ||
14648 | +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ | ||
14649 | +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14650 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14651 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14652 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14653 | + | ||
14654 | + | ||
14655 | + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ | ||
14656 | +func_lo2o ()\ | ||
14657 | +{\ | ||
14658 | +\ case ${1} in\ | ||
14659 | +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ | ||
14660 | +\ *) func_lo2o_result=${1} ;;\ | ||
14661 | +\ esac\ | ||
14662 | +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14663 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14664 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14665 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14666 | + | ||
14667 | + | ||
14668 | + sed -e '/^func_xform ()$/,/^} # func_xform /c\ | ||
14669 | +func_xform ()\ | ||
14670 | +{\ | ||
14671 | + func_xform_result=${1%.*}.lo\ | ||
14672 | +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14673 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14674 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14675 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14676 | + | ||
14677 | + | ||
14678 | + sed -e '/^func_arith ()$/,/^} # func_arith /c\ | ||
14679 | +func_arith ()\ | ||
14680 | +{\ | ||
14681 | + func_arith_result=$(( $* ))\ | ||
14682 | +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14683 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14684 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14685 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14686 | + | ||
14687 | + | ||
14688 | + sed -e '/^func_len ()$/,/^} # func_len /c\ | ||
14689 | +func_len ()\ | ||
14690 | +{\ | ||
14691 | + func_len_result=${#1}\ | ||
14692 | +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14693 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14694 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14695 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14696 | + | ||
14697 | +fi | ||
14698 | + | ||
14699 | +if test x"$lt_shell_append" = xyes; then | ||
14700 | + sed -e '/^func_append ()$/,/^} # func_append /c\ | ||
14701 | +func_append ()\ | ||
14702 | +{\ | ||
14703 | + eval "${1}+=\\${2}"\ | ||
14704 | +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14705 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14706 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14707 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14708 | + | ||
14709 | + | ||
14710 | + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ | ||
14711 | +func_append_quoted ()\ | ||
14712 | +{\ | ||
14713 | +\ func_quote_for_eval "${2}"\ | ||
14714 | +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ | ||
14715 | +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ | ||
14716 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14717 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14718 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
14719 | + | ||
14720 | + | ||
14721 | + # Save a `func_append' function call where possible by direct use of '+=' | ||
14722 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
14723 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14724 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14725 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
14726 | +else | ||
14727 | + # Save a `func_append' function call even when '+=' is not available | ||
14728 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | ||
14729 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
14730 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
14731 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
14732 | +fi | ||
14733 | + | ||
14734 | +if test x"$_lt_function_replace_fail" = x":"; then | ||
14735 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 | ||
14736 | +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} | ||
14737 | +fi | ||
14738 | |||
14739 | - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ | ||
14740 | - || (rm -f "$cfgfile"; exit 1) | ||
14741 | |||
14742 | - mv -f "$cfgfile" "$ofile" || | ||
14743 | + mv -f "$cfgfile" "$ofile" || | ||
14744 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
14745 | chmod +x "$ofile" | ||
14746 | |||
14747 | Index: binutils-2.24/gprof/configure | ||
14748 | =================================================================== | ||
14749 | --- binutils-2.24.orig/gprof/configure 2013-12-15 11:09:51.443785606 -0800 | ||
14750 | +++ binutils-2.24/gprof/configure 2013-12-15 11:10:23.880452030 -0800 | ||
14751 | @@ -629,8 +629,11 @@ | ||
14752 | LIPO | ||
14753 | NMEDIT | ||
14754 | DSYMUTIL | ||
14755 | +MANIFEST_TOOL | ||
14756 | RANLIB | ||
14757 | +ac_ct_AR | ||
14758 | AR | ||
14759 | +DLLTOOL | ||
14760 | OBJDUMP | ||
14761 | LN_S | ||
14762 | NM | ||
14763 | @@ -743,6 +746,7 @@ | ||
14764 | with_pic | ||
14765 | enable_fast_install | ||
14766 | with_gnu_ld | ||
14767 | +with_libtool_sysroot | ||
14768 | enable_libtool_lock | ||
14769 | enable_nls | ||
14770 | enable_maintainer_mode | ||
14771 | @@ -1397,6 +1401,8 @@ | ||
14772 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
14773 | both] | ||
14774 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
14775 | + --with-libtool-sysroot=DIR Search for dependent libraries within DIR | ||
14776 | + (or the compiler's sysroot if not specified). | ||
14777 | |||
14778 | Some influential environment variables: | ||
14779 | CC C compiler command | ||
14780 | @@ -5065,8 +5071,8 @@ | ||
14781 | |||
14782 | |||
14783 | |||
14784 | -macro_version='2.2.7a' | ||
14785 | -macro_revision='1.3134' | ||
14786 | +macro_version='2.4' | ||
14787 | +macro_revision='1.3293' | ||
14788 | |||
14789 | |||
14790 | |||
14791 | @@ -5106,7 +5112,7 @@ | ||
14792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | ||
14793 | $as_echo_n "checking how to print strings... " >&6; } | ||
14794 | # Test print first, because it will be a builtin if present. | ||
14795 | -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | ||
14796 | +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
14797 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
14798 | ECHO='print -r --' | ||
14799 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
14800 | @@ -5792,8 +5798,8 @@ | ||
14801 | # Try some XSI features | ||
14802 | xsi_shell=no | ||
14803 | ( _lt_dummy="a/b/c" | ||
14804 | - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | ||
14805 | - = c,a/b,, \ | ||
14806 | + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
14807 | + = c,a/b,b/c, \ | ||
14808 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
14809 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
14810 | && xsi_shell=yes | ||
14811 | @@ -5842,6 +5848,80 @@ | ||
14812 | |||
14813 | |||
14814 | |||
14815 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 | ||
14816 | +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } | ||
14817 | +if test "${lt_cv_to_host_file_cmd+set}" = set; then : | ||
14818 | + $as_echo_n "(cached) " >&6 | ||
14819 | +else | ||
14820 | + case $host in | ||
14821 | + *-*-mingw* ) | ||
14822 | + case $build in | ||
14823 | + *-*-mingw* ) # actually msys | ||
14824 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
14825 | + ;; | ||
14826 | + *-*-cygwin* ) | ||
14827 | + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
14828 | + ;; | ||
14829 | + * ) # otherwise, assume *nix | ||
14830 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
14831 | + ;; | ||
14832 | + esac | ||
14833 | + ;; | ||
14834 | + *-*-cygwin* ) | ||
14835 | + case $build in | ||
14836 | + *-*-mingw* ) # actually msys | ||
14837 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
14838 | + ;; | ||
14839 | + *-*-cygwin* ) | ||
14840 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
14841 | + ;; | ||
14842 | + * ) # otherwise, assume *nix | ||
14843 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
14844 | + ;; | ||
14845 | + esac | ||
14846 | + ;; | ||
14847 | + * ) # unhandled hosts (and "normal" native builds) | ||
14848 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
14849 | + ;; | ||
14850 | +esac | ||
14851 | + | ||
14852 | +fi | ||
14853 | + | ||
14854 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
14855 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 | ||
14856 | +$as_echo "$lt_cv_to_host_file_cmd" >&6; } | ||
14857 | + | ||
14858 | + | ||
14859 | + | ||
14860 | + | ||
14861 | + | ||
14862 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 | ||
14863 | +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } | ||
14864 | +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : | ||
14865 | + $as_echo_n "(cached) " >&6 | ||
14866 | +else | ||
14867 | + #assume ordinary cross tools, or native build. | ||
14868 | +lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
14869 | +case $host in | ||
14870 | + *-*-mingw* ) | ||
14871 | + case $build in | ||
14872 | + *-*-mingw* ) # actually msys | ||
14873 | + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
14874 | + ;; | ||
14875 | + esac | ||
14876 | + ;; | ||
14877 | +esac | ||
14878 | + | ||
14879 | +fi | ||
14880 | + | ||
14881 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
14882 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 | ||
14883 | +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } | ||
14884 | + | ||
14885 | + | ||
14886 | + | ||
14887 | + | ||
14888 | + | ||
14889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 | ||
14890 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | ||
14891 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | ||
14892 | @@ -5858,6 +5938,11 @@ | ||
14893 | esac | ||
14894 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
14895 | case $host_os in | ||
14896 | + cygwin* | mingw* | pw32* | cegcc*) | ||
14897 | + if test "$GCC" != yes; then | ||
14898 | + reload_cmds=false | ||
14899 | + fi | ||
14900 | + ;; | ||
14901 | darwin*) | ||
14902 | if test "$GCC" = yes; then | ||
14903 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
14904 | @@ -6026,7 +6111,8 @@ | ||
14905 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
14906 | lt_cv_file_magic_cmd='func_win32_libid' | ||
14907 | else | ||
14908 | - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
14909 | + # Keep this pattern in sync with the one in func_win32_libid. | ||
14910 | + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
14911 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
14912 | fi | ||
14913 | ;; | ||
14914 | @@ -6103,11 +6189,6 @@ | ||
14915 | lt_cv_deplibs_check_method=pass_all | ||
14916 | ;; | ||
14917 | |||
14918 | -linux-uclibc*) | ||
14919 | - lt_cv_deplibs_check_method=pass_all | ||
14920 | - lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
14921 | - ;; | ||
14922 | - | ||
14923 | netbsd*) | ||
14924 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | ||
14925 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | ||
14926 | @@ -6185,6 +6266,21 @@ | ||
14927 | fi | ||
14928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 | ||
14929 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | ||
14930 | + | ||
14931 | +file_magic_glob= | ||
14932 | +want_nocaseglob=no | ||
14933 | +if test "$build" = "$host"; then | ||
14934 | + case $host_os in | ||
14935 | + mingw* | pw32*) | ||
14936 | + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
14937 | + want_nocaseglob=yes | ||
14938 | + else | ||
14939 | + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` | ||
14940 | + fi | ||
14941 | + ;; | ||
14942 | + esac | ||
14943 | +fi | ||
14944 | + | ||
14945 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
14946 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
14947 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
14948 | @@ -6200,9 +6296,162 @@ | ||
14949 | |||
14950 | |||
14951 | |||
14952 | + | ||
14953 | + | ||
14954 | + | ||
14955 | + | ||
14956 | + | ||
14957 | + | ||
14958 | + | ||
14959 | + | ||
14960 | + | ||
14961 | + | ||
14962 | if test -n "$ac_tool_prefix"; then | ||
14963 | - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
14964 | -set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
14965 | + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
14966 | +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
14967 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
14968 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
14969 | +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | ||
14970 | + $as_echo_n "(cached) " >&6 | ||
14971 | +else | ||
14972 | + if test -n "$DLLTOOL"; then | ||
14973 | + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
14974 | +else | ||
14975 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
14976 | +for as_dir in $PATH | ||
14977 | +do | ||
14978 | + IFS=$as_save_IFS | ||
14979 | + test -z "$as_dir" && as_dir=. | ||
14980 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
14981 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
14982 | + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
14983 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
14984 | + break 2 | ||
14985 | + fi | ||
14986 | +done | ||
14987 | + done | ||
14988 | +IFS=$as_save_IFS | ||
14989 | + | ||
14990 | +fi | ||
14991 | +fi | ||
14992 | +DLLTOOL=$ac_cv_prog_DLLTOOL | ||
14993 | +if test -n "$DLLTOOL"; then | ||
14994 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 | ||
14995 | +$as_echo "$DLLTOOL" >&6; } | ||
14996 | +else | ||
14997 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
14998 | +$as_echo "no" >&6; } | ||
14999 | +fi | ||
15000 | + | ||
15001 | + | ||
15002 | +fi | ||
15003 | +if test -z "$ac_cv_prog_DLLTOOL"; then | ||
15004 | + ac_ct_DLLTOOL=$DLLTOOL | ||
15005 | + # Extract the first word of "dlltool", so it can be a program name with args. | ||
15006 | +set dummy dlltool; ac_word=$2 | ||
15007 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
15008 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
15009 | +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | ||
15010 | + $as_echo_n "(cached) " >&6 | ||
15011 | +else | ||
15012 | + if test -n "$ac_ct_DLLTOOL"; then | ||
15013 | + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
15014 | +else | ||
15015 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
15016 | +for as_dir in $PATH | ||
15017 | +do | ||
15018 | + IFS=$as_save_IFS | ||
15019 | + test -z "$as_dir" && as_dir=. | ||
15020 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
15021 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
15022 | + ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
15023 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
15024 | + break 2 | ||
15025 | + fi | ||
15026 | +done | ||
15027 | + done | ||
15028 | +IFS=$as_save_IFS | ||
15029 | + | ||
15030 | +fi | ||
15031 | +fi | ||
15032 | +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
15033 | +if test -n "$ac_ct_DLLTOOL"; then | ||
15034 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 | ||
15035 | +$as_echo "$ac_ct_DLLTOOL" >&6; } | ||
15036 | +else | ||
15037 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
15038 | +$as_echo "no" >&6; } | ||
15039 | +fi | ||
15040 | + | ||
15041 | + if test "x$ac_ct_DLLTOOL" = x; then | ||
15042 | + DLLTOOL="false" | ||
15043 | + else | ||
15044 | + case $cross_compiling:$ac_tool_warned in | ||
15045 | +yes:) | ||
15046 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
15047 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
15048 | +ac_tool_warned=yes ;; | ||
15049 | +esac | ||
15050 | + DLLTOOL=$ac_ct_DLLTOOL | ||
15051 | + fi | ||
15052 | +else | ||
15053 | + DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
15054 | +fi | ||
15055 | + | ||
15056 | +test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
15057 | + | ||
15058 | + | ||
15059 | + | ||
15060 | + | ||
15061 | + | ||
15062 | + | ||
15063 | + | ||
15064 | + | ||
15065 | + | ||
15066 | + | ||
15067 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 | ||
15068 | +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } | ||
15069 | +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : | ||
15070 | + $as_echo_n "(cached) " >&6 | ||
15071 | +else | ||
15072 | + lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
15073 | + | ||
15074 | +case $host_os in | ||
15075 | +cygwin* | mingw* | pw32* | cegcc*) | ||
15076 | + # two different shell functions defined in ltmain.sh | ||
15077 | + # decide which to use based on capabilities of $DLLTOOL | ||
15078 | + case `$DLLTOOL --help 2>&1` in | ||
15079 | + *--identify-strict*) | ||
15080 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
15081 | + ;; | ||
15082 | + *) | ||
15083 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
15084 | + ;; | ||
15085 | + esac | ||
15086 | + ;; | ||
15087 | +*) | ||
15088 | + # fallback: assume linklib IS sharedlib | ||
15089 | + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
15090 | + ;; | ||
15091 | +esac | ||
15092 | + | ||
15093 | +fi | ||
15094 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 | ||
15095 | +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } | ||
15096 | +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
15097 | +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
15098 | + | ||
15099 | + | ||
15100 | + | ||
15101 | + | ||
15102 | + | ||
15103 | + | ||
15104 | + | ||
15105 | +if test -n "$ac_tool_prefix"; then | ||
15106 | + for ac_prog in ar | ||
15107 | + do | ||
15108 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
15109 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
15110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
15111 | $as_echo_n "checking for $ac_word... " >&6; } | ||
15112 | if test "${ac_cv_prog_AR+set}" = set; then : | ||
15113 | @@ -6218,7 +6467,7 @@ | ||
15114 | test -z "$as_dir" && as_dir=. | ||
15115 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
15116 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
15117 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
15118 | + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | ||
15119 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
15120 | break 2 | ||
15121 | fi | ||
15122 | @@ -6238,11 +6487,15 @@ | ||
15123 | fi | ||
15124 | |||
15125 | |||
15126 | + test -n "$AR" && break | ||
15127 | + done | ||
15128 | fi | ||
15129 | -if test -z "$ac_cv_prog_AR"; then | ||
15130 | +if test -z "$AR"; then | ||
15131 | ac_ct_AR=$AR | ||
15132 | - # Extract the first word of "ar", so it can be a program name with args. | ||
15133 | -set dummy ar; ac_word=$2 | ||
15134 | + for ac_prog in ar | ||
15135 | +do | ||
15136 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
15137 | +set dummy $ac_prog; ac_word=$2 | ||
15138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
15139 | $as_echo_n "checking for $ac_word... " >&6; } | ||
15140 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | ||
15141 | @@ -6258,7 +6511,7 @@ | ||
15142 | test -z "$as_dir" && as_dir=. | ||
15143 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
15144 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
15145 | - ac_cv_prog_ac_ct_AR="ar" | ||
15146 | + ac_cv_prog_ac_ct_AR="$ac_prog" | ||
15147 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
15148 | break 2 | ||
15149 | fi | ||
15150 | @@ -6277,6 +6530,10 @@ | ||
15151 | $as_echo "no" >&6; } | ||
15152 | fi | ||
15153 | |||
15154 | + | ||
15155 | + test -n "$ac_ct_AR" && break | ||
15156 | +done | ||
15157 | + | ||
15158 | if test "x$ac_ct_AR" = x; then | ||
15159 | AR="false" | ||
15160 | else | ||
15161 | @@ -6288,16 +6545,72 @@ | ||
15162 | esac | ||
15163 | AR=$ac_ct_AR | ||
15164 | fi | ||
15165 | -else | ||
15166 | - AR="$ac_cv_prog_AR" | ||
15167 | fi | ||
15168 | |||
15169 | -test -z "$AR" && AR=ar | ||
15170 | -test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
15171 | +: ${AR=ar} | ||
15172 | +: ${AR_FLAGS=cru} | ||
15173 | + | ||
15174 | + | ||
15175 | + | ||
15176 | + | ||
15177 | + | ||
15178 | + | ||
15179 | + | ||
15180 | + | ||
15181 | + | ||
15182 | + | ||
15183 | + | ||
15184 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 | ||
15185 | +$as_echo_n "checking for archiver @FILE support... " >&6; } | ||
15186 | +if test "${lt_cv_ar_at_file+set}" = set; then : | ||
15187 | + $as_echo_n "(cached) " >&6 | ||
15188 | +else | ||
15189 | + lt_cv_ar_at_file=no | ||
15190 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15191 | +/* end confdefs.h. */ | ||
15192 | + | ||
15193 | +int | ||
15194 | +main () | ||
15195 | +{ | ||
15196 | |||
15197 | + ; | ||
15198 | + return 0; | ||
15199 | +} | ||
15200 | +_ACEOF | ||
15201 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
15202 | + echo conftest.$ac_objext > conftest.lst | ||
15203 | + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' | ||
15204 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
15205 | + (eval $lt_ar_try) 2>&5 | ||
15206 | + ac_status=$? | ||
15207 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
15208 | + test $ac_status = 0; } | ||
15209 | + if test "$ac_status" -eq 0; then | ||
15210 | + # Ensure the archiver fails upon bogus file names. | ||
15211 | + rm -f conftest.$ac_objext libconftest.a | ||
15212 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
15213 | + (eval $lt_ar_try) 2>&5 | ||
15214 | + ac_status=$? | ||
15215 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
15216 | + test $ac_status = 0; } | ||
15217 | + if test "$ac_status" -ne 0; then | ||
15218 | + lt_cv_ar_at_file=@ | ||
15219 | + fi | ||
15220 | + fi | ||
15221 | + rm -f conftest.* libconftest.a | ||
15222 | |||
15223 | +fi | ||
15224 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
15225 | |||
15226 | +fi | ||
15227 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 | ||
15228 | +$as_echo "$lt_cv_ar_at_file" >&6; } | ||
15229 | |||
15230 | +if test "x$lt_cv_ar_at_file" = xno; then | ||
15231 | + archiver_list_spec= | ||
15232 | +else | ||
15233 | + archiver_list_spec=$lt_cv_ar_at_file | ||
15234 | +fi | ||
15235 | |||
15236 | |||
15237 | |||
15238 | @@ -6639,8 +6952,8 @@ | ||
15239 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
15240 | |||
15241 | # Transform an extracted symbol line into symbol name and symbol address | ||
15242 | -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
15243 | -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'" | ||
15244 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
15245 | +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'" | ||
15246 | |||
15247 | # Handle CRLF in mingw tool chain | ||
15248 | opt_cr= | ||
15249 | @@ -6676,6 +6989,7 @@ | ||
15250 | else | ||
15251 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
15252 | fi | ||
15253 | + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
15254 | |||
15255 | # Check to see that the pipe works correctly. | ||
15256 | pipe_works=no | ||
15257 | @@ -6717,6 +7031,18 @@ | ||
15258 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
15259 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
15260 | cat <<_LT_EOF > conftest.$ac_ext | ||
15261 | +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
15262 | +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
15263 | +/* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
15264 | + relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
15265 | +# define LT_DLSYM_CONST | ||
15266 | +#elif defined(__osf__) | ||
15267 | +/* This system does not cope well with relocations in const data. */ | ||
15268 | +# define LT_DLSYM_CONST | ||
15269 | +#else | ||
15270 | +# define LT_DLSYM_CONST const | ||
15271 | +#endif | ||
15272 | + | ||
15273 | #ifdef __cplusplus | ||
15274 | extern "C" { | ||
15275 | #endif | ||
15276 | @@ -6728,7 +7054,7 @@ | ||
15277 | cat <<_LT_EOF >> conftest.$ac_ext | ||
15278 | |||
15279 | /* The mapping between symbol names and symbols. */ | ||
15280 | -const struct { | ||
15281 | +LT_DLSYM_CONST struct { | ||
15282 | const char *name; | ||
15283 | void *address; | ||
15284 | } | ||
15285 | @@ -6754,8 +7080,8 @@ | ||
15286 | _LT_EOF | ||
15287 | # Now try linking the two files. | ||
15288 | mv conftest.$ac_objext conftstm.$ac_objext | ||
15289 | - lt_save_LIBS="$LIBS" | ||
15290 | - lt_save_CFLAGS="$CFLAGS" | ||
15291 | + lt_globsym_save_LIBS=$LIBS | ||
15292 | + lt_globsym_save_CFLAGS=$CFLAGS | ||
15293 | LIBS="conftstm.$ac_objext" | ||
15294 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
15295 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | ||
15296 | @@ -6765,8 +7091,8 @@ | ||
15297 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | ||
15298 | pipe_works=yes | ||
15299 | fi | ||
15300 | - LIBS="$lt_save_LIBS" | ||
15301 | - CFLAGS="$lt_save_CFLAGS" | ||
15302 | + LIBS=$lt_globsym_save_LIBS | ||
15303 | + CFLAGS=$lt_globsym_save_CFLAGS | ||
15304 | else | ||
15305 | echo "cannot find nm_test_func in $nlist" >&5 | ||
15306 | fi | ||
15307 | @@ -6803,6 +7129,17 @@ | ||
15308 | $as_echo "ok" >&6; } | ||
15309 | fi | ||
15310 | |||
15311 | +# Response file support. | ||
15312 | +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
15313 | + nm_file_list_spec='@' | ||
15314 | +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then | ||
15315 | + nm_file_list_spec='@' | ||
15316 | +fi | ||
15317 | + | ||
15318 | + | ||
15319 | + | ||
15320 | + | ||
15321 | + | ||
15322 | |||
15323 | |||
15324 | |||
15325 | @@ -6824,6 +7161,44 @@ | ||
15326 | |||
15327 | |||
15328 | |||
15329 | + | ||
15330 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 | ||
15331 | +$as_echo_n "checking for sysroot... " >&6; } | ||
15332 | + | ||
15333 | +# Check whether --with-libtool-sysroot was given. | ||
15334 | +if test "${with_libtool_sysroot+set}" = set; then : | ||
15335 | + withval=$with_libtool_sysroot; | ||
15336 | +else | ||
15337 | + with_libtool_sysroot=no | ||
15338 | +fi | ||
15339 | + | ||
15340 | + | ||
15341 | +lt_sysroot= | ||
15342 | +case ${with_libtool_sysroot} in #( | ||
15343 | + yes) | ||
15344 | + if test "$GCC" = yes; then | ||
15345 | + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
15346 | + fi | ||
15347 | + ;; #( | ||
15348 | + /*) | ||
15349 | + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
15350 | + ;; #( | ||
15351 | + no|'') | ||
15352 | + ;; #( | ||
15353 | + *) | ||
15354 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 | ||
15355 | +$as_echo "${with_libtool_sysroot}" >&6; } | ||
15356 | + as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 | ||
15357 | + ;; | ||
15358 | +esac | ||
15359 | + | ||
15360 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 | ||
15361 | +$as_echo "${lt_sysroot:-no}" >&6; } | ||
15362 | + | ||
15363 | + | ||
15364 | + | ||
15365 | + | ||
15366 | + | ||
15367 | # Check whether --enable-libtool-lock was given. | ||
15368 | if test "${enable_libtool_lock+set}" = set; then : | ||
15369 | enableval=$enable_libtool_lock; | ||
15370 | @@ -7030,6 +7405,123 @@ | ||
15371 | |||
15372 | need_locks="$enable_libtool_lock" | ||
15373 | |||
15374 | +if test -n "$ac_tool_prefix"; then | ||
15375 | + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. | ||
15376 | +set dummy ${ac_tool_prefix}mt; ac_word=$2 | ||
15377 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
15378 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
15379 | +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : | ||
15380 | + $as_echo_n "(cached) " >&6 | ||
15381 | +else | ||
15382 | + if test -n "$MANIFEST_TOOL"; then | ||
15383 | + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. | ||
15384 | +else | ||
15385 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
15386 | +for as_dir in $PATH | ||
15387 | +do | ||
15388 | + IFS=$as_save_IFS | ||
15389 | + test -z "$as_dir" && as_dir=. | ||
15390 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
15391 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
15392 | + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" | ||
15393 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
15394 | + break 2 | ||
15395 | + fi | ||
15396 | +done | ||
15397 | + done | ||
15398 | +IFS=$as_save_IFS | ||
15399 | + | ||
15400 | +fi | ||
15401 | +fi | ||
15402 | +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL | ||
15403 | +if test -n "$MANIFEST_TOOL"; then | ||
15404 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 | ||
15405 | +$as_echo "$MANIFEST_TOOL" >&6; } | ||
15406 | +else | ||
15407 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
15408 | +$as_echo "no" >&6; } | ||
15409 | +fi | ||
15410 | + | ||
15411 | + | ||
15412 | +fi | ||
15413 | +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then | ||
15414 | + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL | ||
15415 | + # Extract the first word of "mt", so it can be a program name with args. | ||
15416 | +set dummy mt; ac_word=$2 | ||
15417 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
15418 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
15419 | +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : | ||
15420 | + $as_echo_n "(cached) " >&6 | ||
15421 | +else | ||
15422 | + if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
15423 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. | ||
15424 | +else | ||
15425 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
15426 | +for as_dir in $PATH | ||
15427 | +do | ||
15428 | + IFS=$as_save_IFS | ||
15429 | + test -z "$as_dir" && as_dir=. | ||
15430 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
15431 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
15432 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" | ||
15433 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
15434 | + break 2 | ||
15435 | + fi | ||
15436 | +done | ||
15437 | + done | ||
15438 | +IFS=$as_save_IFS | ||
15439 | + | ||
15440 | +fi | ||
15441 | +fi | ||
15442 | +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL | ||
15443 | +if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
15444 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 | ||
15445 | +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } | ||
15446 | +else | ||
15447 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
15448 | +$as_echo "no" >&6; } | ||
15449 | +fi | ||
15450 | + | ||
15451 | + if test "x$ac_ct_MANIFEST_TOOL" = x; then | ||
15452 | + MANIFEST_TOOL=":" | ||
15453 | + else | ||
15454 | + case $cross_compiling:$ac_tool_warned in | ||
15455 | +yes:) | ||
15456 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
15457 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
15458 | +ac_tool_warned=yes ;; | ||
15459 | +esac | ||
15460 | + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL | ||
15461 | + fi | ||
15462 | +else | ||
15463 | + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" | ||
15464 | +fi | ||
15465 | + | ||
15466 | +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
15467 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 | ||
15468 | +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } | ||
15469 | +if test "${lt_cv_path_mainfest_tool+set}" = set; then : | ||
15470 | + $as_echo_n "(cached) " >&6 | ||
15471 | +else | ||
15472 | + lt_cv_path_mainfest_tool=no | ||
15473 | + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 | ||
15474 | + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
15475 | + cat conftest.err >&5 | ||
15476 | + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
15477 | + lt_cv_path_mainfest_tool=yes | ||
15478 | + fi | ||
15479 | + rm -f conftest* | ||
15480 | +fi | ||
15481 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 | ||
15482 | +$as_echo "$lt_cv_path_mainfest_tool" >&6; } | ||
15483 | +if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
15484 | + MANIFEST_TOOL=: | ||
15485 | +fi | ||
15486 | + | ||
15487 | + | ||
15488 | + | ||
15489 | + | ||
15490 | + | ||
15491 | |||
15492 | case $host_os in | ||
15493 | rhapsody* | darwin*) | ||
15494 | @@ -7593,6 +8085,8 @@ | ||
15495 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | ||
15496 | echo "$AR cru libconftest.a conftest.o" >&5 | ||
15497 | $AR cru libconftest.a conftest.o 2>&5 | ||
15498 | + echo "$RANLIB libconftest.a" >&5 | ||
15499 | + $RANLIB libconftest.a 2>&5 | ||
15500 | cat > conftest.c << _LT_EOF | ||
15501 | int main() { return 0;} | ||
15502 | _LT_EOF | ||
15503 | @@ -7788,7 +8282,8 @@ | ||
15504 | LIBTOOL_DEPS="$ltmain" | ||
15505 | |||
15506 | # Always use our own libtool. | ||
15507 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
15508 | +LIBTOOL='$(SHELL) $(top_builddir)' | ||
15509 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | ||
15510 | |||
15511 | |||
15512 | |||
15513 | @@ -7877,7 +8372,7 @@ | ||
15514 | esac | ||
15515 | |||
15516 | # Global variables: | ||
15517 | -ofile=libtool | ||
15518 | +ofile=${host_alias}-libtool | ||
15519 | can_build_shared=yes | ||
15520 | |||
15521 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
15522 | @@ -8175,8 +8670,6 @@ | ||
15523 | lt_prog_compiler_pic= | ||
15524 | lt_prog_compiler_static= | ||
15525 | |||
15526 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
15527 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
15528 | |||
15529 | if test "$GCC" = yes; then | ||
15530 | lt_prog_compiler_wl='-Wl,' | ||
15531 | @@ -8342,6 +8835,12 @@ | ||
15532 | lt_prog_compiler_pic='--shared' | ||
15533 | lt_prog_compiler_static='--static' | ||
15534 | ;; | ||
15535 | + nagfor*) | ||
15536 | + # NAG Fortran compiler | ||
15537 | + lt_prog_compiler_wl='-Wl,-Wl,,' | ||
15538 | + lt_prog_compiler_pic='-PIC' | ||
15539 | + lt_prog_compiler_static='-Bstatic' | ||
15540 | + ;; | ||
15541 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
15542 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
15543 | # which looks to be a dead project) | ||
15544 | @@ -8404,7 +8903,7 @@ | ||
15545 | lt_prog_compiler_pic='-KPIC' | ||
15546 | lt_prog_compiler_static='-Bstatic' | ||
15547 | case $cc_basename in | ||
15548 | - f77* | f90* | f95*) | ||
15549 | + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
15550 | lt_prog_compiler_wl='-Qoption ld ';; | ||
15551 | *) | ||
15552 | lt_prog_compiler_wl='-Wl,';; | ||
15553 | @@ -8461,13 +8960,17 @@ | ||
15554 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
15555 | ;; | ||
15556 | esac | ||
15557 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 | ||
15558 | -$as_echo "$lt_prog_compiler_pic" >&6; } | ||
15559 | - | ||
15560 | - | ||
15561 | - | ||
15562 | - | ||
15563 | |||
15564 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
15565 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
15566 | +if test "${lt_cv_prog_compiler_pic+set}" = set; then : | ||
15567 | + $as_echo_n "(cached) " >&6 | ||
15568 | +else | ||
15569 | + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic | ||
15570 | +fi | ||
15571 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 | ||
15572 | +$as_echo "$lt_cv_prog_compiler_pic" >&6; } | ||
15573 | +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic | ||
15574 | |||
15575 | # | ||
15576 | # Check to make sure the PIC flag actually works. | ||
15577 | @@ -8528,6 +9031,11 @@ | ||
15578 | |||
15579 | |||
15580 | |||
15581 | + | ||
15582 | + | ||
15583 | + | ||
15584 | + | ||
15585 | + | ||
15586 | # | ||
15587 | # Check to make sure the static flag actually works. | ||
15588 | # | ||
15589 | @@ -8878,7 +9386,8 @@ | ||
15590 | allow_undefined_flag=unsupported | ||
15591 | always_export_symbols=no | ||
15592 | enable_shared_with_static_runtimes=yes | ||
15593 | - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
15594 | + 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' | ||
15595 | + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
15596 | |||
15597 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
15598 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
15599 | @@ -8926,7 +9435,7 @@ | ||
15600 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
15601 | && test "$tmp_diet" = no | ||
15602 | then | ||
15603 | - tmp_addflag= | ||
15604 | + tmp_addflag=' $pic_flag' | ||
15605 | tmp_sharedflag='-shared' | ||
15606 | case $cc_basename,$host_cpu in | ||
15607 | pgcc*) # Portland Group C compiler | ||
15608 | @@ -8977,12 +9486,12 @@ | ||
15609 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | ||
15610 | hardcode_libdir_flag_spec= | ||
15611 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
15612 | - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | ||
15613 | + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
15614 | if test "x$supports_anon_versioning" = xyes; then | ||
15615 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | ||
15616 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
15617 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
15618 | - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
15619 | + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
15620 | fi | ||
15621 | ;; | ||
15622 | esac | ||
15623 | @@ -8996,8 +9505,8 @@ | ||
15624 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
15625 | wlarc= | ||
15626 | else | ||
15627 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
15628 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
15629 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
15630 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
15631 | fi | ||
15632 | ;; | ||
15633 | |||
15634 | @@ -9015,8 +9524,8 @@ | ||
15635 | |||
15636 | _LT_EOF | ||
15637 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
15638 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
15639 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
15640 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
15641 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
15642 | else | ||
15643 | ld_shlibs=no | ||
15644 | fi | ||
15645 | @@ -9062,8 +9571,8 @@ | ||
15646 | |||
15647 | *) | ||
15648 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
15649 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
15650 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
15651 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
15652 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
15653 | else | ||
15654 | ld_shlibs=no | ||
15655 | fi | ||
15656 | @@ -9193,7 +9702,13 @@ | ||
15657 | allow_undefined_flag='-berok' | ||
15658 | # Determine the default libpath from the value encoded in an | ||
15659 | # empty executable. | ||
15660 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15661 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
15662 | + aix_libpath=$lt_cv_aix_libpath | ||
15663 | +else | ||
15664 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
15665 | + $as_echo_n "(cached) " >&6 | ||
15666 | +else | ||
15667 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15668 | /* end confdefs.h. */ | ||
15669 | |||
15670 | int | ||
15671 | @@ -9206,22 +9721,29 @@ | ||
15672 | _ACEOF | ||
15673 | if ac_fn_c_try_link "$LINENO"; then : | ||
15674 | |||
15675 | -lt_aix_libpath_sed=' | ||
15676 | - /Import File Strings/,/^$/ { | ||
15677 | - /^0/ { | ||
15678 | - s/^0 *\(.*\)$/\1/ | ||
15679 | - p | ||
15680 | - } | ||
15681 | - }' | ||
15682 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15683 | -# Check for a 64-bit object if we didn't find anything. | ||
15684 | -if test -z "$aix_libpath"; then | ||
15685 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15686 | -fi | ||
15687 | + lt_aix_libpath_sed=' | ||
15688 | + /Import File Strings/,/^$/ { | ||
15689 | + /^0/ { | ||
15690 | + s/^0 *\([^ ]*\) *$/\1/ | ||
15691 | + p | ||
15692 | + } | ||
15693 | + }' | ||
15694 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15695 | + # Check for a 64-bit object if we didn't find anything. | ||
15696 | + if test -z "$lt_cv_aix_libpath_"; then | ||
15697 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15698 | + fi | ||
15699 | fi | ||
15700 | rm -f core conftest.err conftest.$ac_objext \ | ||
15701 | conftest$ac_exeext conftest.$ac_ext | ||
15702 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
15703 | + if test -z "$lt_cv_aix_libpath_"; then | ||
15704 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
15705 | + fi | ||
15706 | + | ||
15707 | +fi | ||
15708 | + | ||
15709 | + aix_libpath=$lt_cv_aix_libpath_ | ||
15710 | +fi | ||
15711 | |||
15712 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
15713 | 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" | ||
15714 | @@ -9233,7 +9755,13 @@ | ||
15715 | else | ||
15716 | # Determine the default libpath from the value encoded in an | ||
15717 | # empty executable. | ||
15718 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15719 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
15720 | + aix_libpath=$lt_cv_aix_libpath | ||
15721 | +else | ||
15722 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
15723 | + $as_echo_n "(cached) " >&6 | ||
15724 | +else | ||
15725 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15726 | /* end confdefs.h. */ | ||
15727 | |||
15728 | int | ||
15729 | @@ -9246,22 +9774,29 @@ | ||
15730 | _ACEOF | ||
15731 | if ac_fn_c_try_link "$LINENO"; then : | ||
15732 | |||
15733 | -lt_aix_libpath_sed=' | ||
15734 | - /Import File Strings/,/^$/ { | ||
15735 | - /^0/ { | ||
15736 | - s/^0 *\(.*\)$/\1/ | ||
15737 | - p | ||
15738 | - } | ||
15739 | - }' | ||
15740 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15741 | -# Check for a 64-bit object if we didn't find anything. | ||
15742 | -if test -z "$aix_libpath"; then | ||
15743 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15744 | -fi | ||
15745 | + lt_aix_libpath_sed=' | ||
15746 | + /Import File Strings/,/^$/ { | ||
15747 | + /^0/ { | ||
15748 | + s/^0 *\([^ ]*\) *$/\1/ | ||
15749 | + p | ||
15750 | + } | ||
15751 | + }' | ||
15752 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15753 | + # Check for a 64-bit object if we didn't find anything. | ||
15754 | + if test -z "$lt_cv_aix_libpath_"; then | ||
15755 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
15756 | + fi | ||
15757 | fi | ||
15758 | rm -f core conftest.err conftest.$ac_objext \ | ||
15759 | conftest$ac_exeext conftest.$ac_ext | ||
15760 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
15761 | + if test -z "$lt_cv_aix_libpath_"; then | ||
15762 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
15763 | + fi | ||
15764 | + | ||
15765 | +fi | ||
15766 | + | ||
15767 | + aix_libpath=$lt_cv_aix_libpath_ | ||
15768 | +fi | ||
15769 | |||
15770 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
15771 | # Warning - without using the other run time loading flags, | ||
15772 | @@ -9306,20 +9841,63 @@ | ||
15773 | # Microsoft Visual C++. | ||
15774 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
15775 | # no search path for DLLs. | ||
15776 | - hardcode_libdir_flag_spec=' ' | ||
15777 | - allow_undefined_flag=unsupported | ||
15778 | - # Tell ltmain to make .lib files, not .a files. | ||
15779 | - libext=lib | ||
15780 | - # Tell ltmain to make .dll files, not .so files. | ||
15781 | - shrext_cmds=".dll" | ||
15782 | - # FIXME: Setting linknames here is a bad hack. | ||
15783 | - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
15784 | - # The linker will automatically build a .lib file if we build a DLL. | ||
15785 | - old_archive_from_new_cmds='true' | ||
15786 | - # FIXME: Should let the user specify the lib program. | ||
15787 | - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
15788 | - fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
15789 | - enable_shared_with_static_runtimes=yes | ||
15790 | + case $cc_basename in | ||
15791 | + cl*) | ||
15792 | + # Native MSVC | ||
15793 | + hardcode_libdir_flag_spec=' ' | ||
15794 | + allow_undefined_flag=unsupported | ||
15795 | + always_export_symbols=yes | ||
15796 | + file_list_spec='@' | ||
15797 | + # Tell ltmain to make .lib files, not .a files. | ||
15798 | + libext=lib | ||
15799 | + # Tell ltmain to make .dll files, not .so files. | ||
15800 | + shrext_cmds=".dll" | ||
15801 | + # FIXME: Setting linknames here is a bad hack. | ||
15802 | + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
15803 | + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
15804 | + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
15805 | + else | ||
15806 | + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
15807 | + fi~ | ||
15808 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
15809 | + linknames=' | ||
15810 | + # The linker will not automatically build a static lib if we build a DLL. | ||
15811 | + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' | ||
15812 | + enable_shared_with_static_runtimes=yes | ||
15813 | + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
15814 | + # Don't use ranlib | ||
15815 | + old_postinstall_cmds='chmod 644 $oldlib' | ||
15816 | + postlink_cmds='lt_outputfile="@OUTPUT@"~ | ||
15817 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
15818 | + case $lt_outputfile in | ||
15819 | + *.exe|*.EXE) ;; | ||
15820 | + *) | ||
15821 | + lt_outputfile="$lt_outputfile.exe" | ||
15822 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
15823 | + ;; | ||
15824 | + esac~ | ||
15825 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
15826 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
15827 | + $RM "$lt_outputfile.manifest"; | ||
15828 | + fi' | ||
15829 | + ;; | ||
15830 | + *) | ||
15831 | + # Assume MSVC wrapper | ||
15832 | + hardcode_libdir_flag_spec=' ' | ||
15833 | + allow_undefined_flag=unsupported | ||
15834 | + # Tell ltmain to make .lib files, not .a files. | ||
15835 | + libext=lib | ||
15836 | + # Tell ltmain to make .dll files, not .so files. | ||
15837 | + shrext_cmds=".dll" | ||
15838 | + # FIXME: Setting linknames here is a bad hack. | ||
15839 | + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
15840 | + # The linker will automatically build a .lib file if we build a DLL. | ||
15841 | + old_archive_from_new_cmds='true' | ||
15842 | + # FIXME: Should let the user specify the lib program. | ||
15843 | + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
15844 | + enable_shared_with_static_runtimes=yes | ||
15845 | + ;; | ||
15846 | + esac | ||
15847 | ;; | ||
15848 | |||
15849 | darwin* | rhapsody*) | ||
15850 | @@ -9380,7 +9958,7 @@ | ||
15851 | |||
15852 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
15853 | freebsd* | dragonfly*) | ||
15854 | - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
15855 | + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
15856 | hardcode_libdir_flag_spec='-R$libdir' | ||
15857 | hardcode_direct=yes | ||
15858 | hardcode_shlibpath_var=no | ||
15859 | @@ -9388,7 +9966,7 @@ | ||
15860 | |||
15861 | hpux9*) | ||
15862 | if test "$GCC" = yes; then | ||
15863 | - 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' | ||
15864 | + 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' | ||
15865 | else | ||
15866 | 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' | ||
15867 | fi | ||
15868 | @@ -9404,7 +9982,7 @@ | ||
15869 | |||
15870 | hpux10*) | ||
15871 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
15872 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
15873 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
15874 | else | ||
15875 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
15876 | fi | ||
15877 | @@ -9428,10 +10006,10 @@ | ||
15878 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
15879 | ;; | ||
15880 | ia64*) | ||
15881 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
15882 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
15883 | ;; | ||
15884 | *) | ||
15885 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
15886 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
15887 | ;; | ||
15888 | esac | ||
15889 | else | ||
15890 | @@ -9510,23 +10088,36 @@ | ||
15891 | |||
15892 | irix5* | irix6* | nonstopux*) | ||
15893 | if test "$GCC" = yes; then | ||
15894 | - 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' | ||
15895 | + 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' | ||
15896 | # Try to use the -exported_symbol ld option, if it does not | ||
15897 | # work, assume that -exports_file does not work either and | ||
15898 | # implicitly export all symbols. | ||
15899 | - save_LDFLAGS="$LDFLAGS" | ||
15900 | - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
15901 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15902 | + # This should be the same for all languages, so no per-tag cache variable. | ||
15903 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 | ||
15904 | +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } | ||
15905 | +if test "${lt_cv_irix_exported_symbol+set}" = set; then : | ||
15906 | + $as_echo_n "(cached) " >&6 | ||
15907 | +else | ||
15908 | + save_LDFLAGS="$LDFLAGS" | ||
15909 | + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
15910 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
15911 | /* end confdefs.h. */ | ||
15912 | -int foo(void) {} | ||
15913 | +int foo (void) { return 0; } | ||
15914 | _ACEOF | ||
15915 | if ac_fn_c_try_link "$LINENO"; then : | ||
15916 | - 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' | ||
15917 | - | ||
15918 | + lt_cv_irix_exported_symbol=yes | ||
15919 | +else | ||
15920 | + lt_cv_irix_exported_symbol=no | ||
15921 | fi | ||
15922 | rm -f core conftest.err conftest.$ac_objext \ | ||
15923 | conftest$ac_exeext conftest.$ac_ext | ||
15924 | - LDFLAGS="$save_LDFLAGS" | ||
15925 | + LDFLAGS="$save_LDFLAGS" | ||
15926 | +fi | ||
15927 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 | ||
15928 | +$as_echo "$lt_cv_irix_exported_symbol" >&6; } | ||
15929 | + if test "$lt_cv_irix_exported_symbol" = yes; then | ||
15930 | + 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' | ||
15931 | + fi | ||
15932 | else | ||
15933 | 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' | ||
15934 | 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' | ||
15935 | @@ -9611,7 +10202,7 @@ | ||
15936 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
15937 | if test "$GCC" = yes; then | ||
15938 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
15939 | - 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' | ||
15940 | + 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' | ||
15941 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
15942 | else | ||
15943 | allow_undefined_flag=' -expect_unresolved \*' | ||
15944 | @@ -9630,9 +10221,9 @@ | ||
15945 | no_undefined_flag=' -z defs' | ||
15946 | if test "$GCC" = yes; then | ||
15947 | wlarc='${wl}' | ||
15948 | - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
15949 | + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
15950 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
15951 | - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
15952 | + $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' | ||
15953 | else | ||
15954 | case `$CC -V 2>&1` in | ||
15955 | *"Compilers 5.0"*) | ||
15956 | @@ -10208,8 +10799,9 @@ | ||
15957 | need_version=no | ||
15958 | need_lib_prefix=no | ||
15959 | |||
15960 | - case $GCC,$host_os in | ||
15961 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
15962 | + case $GCC,$cc_basename in | ||
15963 | + yes,*) | ||
15964 | + # gcc | ||
15965 | library_names_spec='$libname.dll.a' | ||
15966 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
15967 | postinstall_cmds='base_file=`basename \${file}`~ | ||
15968 | @@ -10242,13 +10834,71 @@ | ||
15969 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
15970 | ;; | ||
15971 | esac | ||
15972 | + dynamic_linker='Win32 ld.exe' | ||
15973 | + ;; | ||
15974 | + | ||
15975 | + *,cl*) | ||
15976 | + # Native MSVC | ||
15977 | + libname_spec='$name' | ||
15978 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
15979 | + library_names_spec='${libname}.dll.lib' | ||
15980 | + | ||
15981 | + case $build_os in | ||
15982 | + mingw*) | ||
15983 | + sys_lib_search_path_spec= | ||
15984 | + lt_save_ifs=$IFS | ||
15985 | + IFS=';' | ||
15986 | + for lt_path in $LIB | ||
15987 | + do | ||
15988 | + IFS=$lt_save_ifs | ||
15989 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
15990 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
15991 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
15992 | + done | ||
15993 | + IFS=$lt_save_ifs | ||
15994 | + # Convert to MSYS style. | ||
15995 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
15996 | + ;; | ||
15997 | + cygwin*) | ||
15998 | + # Convert to unix form, then to dos form, then back to unix form | ||
15999 | + # but this time dos style (no spaces!) so that the unix form looks | ||
16000 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
16001 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
16002 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
16003 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
16004 | + ;; | ||
16005 | + *) | ||
16006 | + sys_lib_search_path_spec="$LIB" | ||
16007 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
16008 | + # It is most probably a Windows format PATH. | ||
16009 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
16010 | + else | ||
16011 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
16012 | + fi | ||
16013 | + # FIXME: find the short name or the path components, as spaces are | ||
16014 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
16015 | + ;; | ||
16016 | + esac | ||
16017 | + | ||
16018 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
16019 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
16020 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
16021 | + dldir=$destdir/`dirname \$dlpath`~ | ||
16022 | + test -d \$dldir || mkdir -p \$dldir~ | ||
16023 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
16024 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
16025 | + dlpath=$dir/\$dldll~ | ||
16026 | + $RM \$dlpath' | ||
16027 | + shlibpath_overrides_runpath=yes | ||
16028 | + dynamic_linker='Win32 link.exe' | ||
16029 | ;; | ||
16030 | |||
16031 | *) | ||
16032 | + # Assume MSVC wrapper | ||
16033 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
16034 | + dynamic_linker='Win32 ld.exe' | ||
16035 | ;; | ||
16036 | esac | ||
16037 | - dynamic_linker='Win32 ld.exe' | ||
16038 | # FIXME: first we should search . and the directory the executable is in | ||
16039 | shlibpath_var=PATH | ||
16040 | ;; | ||
16041 | @@ -10340,7 +10990,7 @@ | ||
16042 | soname_spec='${libname}${release}${shared_ext}$major' | ||
16043 | shlibpath_var=LIBRARY_PATH | ||
16044 | shlibpath_overrides_runpath=yes | ||
16045 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
16046 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
16047 | hardcode_into_libs=yes | ||
16048 | ;; | ||
16049 | |||
16050 | @@ -11180,10 +11830,10 @@ | ||
16051 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
16052 | correspondingly for the symbols needed. */ | ||
16053 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
16054 | -void fnord () __attribute__((visibility("default"))); | ||
16055 | +int fnord () __attribute__((visibility("default"))); | ||
16056 | #endif | ||
16057 | |||
16058 | -void fnord () { int i=42; } | ||
16059 | +int fnord () { return 42; } | ||
16060 | int main () | ||
16061 | { | ||
16062 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
16063 | @@ -11286,10 +11936,10 @@ | ||
16064 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
16065 | correspondingly for the symbols needed. */ | ||
16066 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
16067 | -void fnord () __attribute__((visibility("default"))); | ||
16068 | +int fnord () __attribute__((visibility("default"))); | ||
16069 | #endif | ||
16070 | |||
16071 | -void fnord () { int i=42; } | ||
16072 | +int fnord () { return 42; } | ||
16073 | int main () | ||
16074 | { | ||
16075 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
16076 | @@ -12831,13 +13481,20 @@ | ||
16077 | lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' | ||
16078 | lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' | ||
16079 | lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' | ||
16080 | +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
16081 | +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
16082 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' | ||
16083 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' | ||
16084 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' | ||
16085 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' | ||
16086 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' | ||
16087 | +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' | ||
16088 | +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' | ||
16089 | +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' | ||
16090 | +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' | ||
16091 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' | ||
16092 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' | ||
16093 | +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' | ||
16094 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' | ||
16095 | RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' | ||
16096 | old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' | ||
16097 | @@ -12852,14 +13509,17 @@ | ||
16098 | lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' | ||
16099 | lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' | ||
16100 | 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"`' | ||
16101 | +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
16102 | +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' | ||
16103 | objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' | ||
16104 | MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' | ||
16105 | lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' | ||
16106 | -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
16107 | lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' | ||
16108 | +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
16109 | lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' | ||
16110 | lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' | ||
16111 | need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' | ||
16112 | +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' | ||
16113 | DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' | ||
16114 | NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' | ||
16115 | LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' | ||
16116 | @@ -12892,12 +13552,12 @@ | ||
16117 | hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' | ||
16118 | inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' | ||
16119 | link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' | ||
16120 | -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' | ||
16121 | always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' | ||
16122 | export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' | ||
16123 | exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' | ||
16124 | include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' | ||
16125 | prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' | ||
16126 | +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' | ||
16127 | file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
16128 | variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' | ||
16129 | need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' | ||
16130 | @@ -12952,8 +13612,13 @@ | ||
16131 | OBJDUMP \ | ||
16132 | deplibs_check_method \ | ||
16133 | file_magic_cmd \ | ||
16134 | +file_magic_glob \ | ||
16135 | +want_nocaseglob \ | ||
16136 | +DLLTOOL \ | ||
16137 | +sharedlib_from_linklib_cmd \ | ||
16138 | AR \ | ||
16139 | AR_FLAGS \ | ||
16140 | +archiver_list_spec \ | ||
16141 | STRIP \ | ||
16142 | RANLIB \ | ||
16143 | CC \ | ||
16144 | @@ -12963,12 +13628,14 @@ | ||
16145 | lt_cv_sys_global_symbol_to_cdecl \ | ||
16146 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
16147 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ | ||
16148 | +nm_file_list_spec \ | ||
16149 | lt_prog_compiler_no_builtin_flag \ | ||
16150 | -lt_prog_compiler_wl \ | ||
16151 | lt_prog_compiler_pic \ | ||
16152 | +lt_prog_compiler_wl \ | ||
16153 | lt_prog_compiler_static \ | ||
16154 | lt_cv_prog_compiler_c_o \ | ||
16155 | need_locks \ | ||
16156 | +MANIFEST_TOOL \ | ||
16157 | DSYMUTIL \ | ||
16158 | NMEDIT \ | ||
16159 | LIPO \ | ||
16160 | @@ -12984,7 +13651,6 @@ | ||
16161 | hardcode_libdir_flag_spec \ | ||
16162 | hardcode_libdir_flag_spec_ld \ | ||
16163 | hardcode_libdir_separator \ | ||
16164 | -fix_srcfile_path \ | ||
16165 | exclude_expsyms \ | ||
16166 | include_expsyms \ | ||
16167 | file_list_spec \ | ||
16168 | @@ -13020,6 +13686,7 @@ | ||
16169 | module_expsym_cmds \ | ||
16170 | export_symbols_cmds \ | ||
16171 | prelink_cmds \ | ||
16172 | +postlink_cmds \ | ||
16173 | postinstall_cmds \ | ||
16174 | postuninstall_cmds \ | ||
16175 | finish_cmds \ | ||
16176 | @@ -13776,7 +14443,8 @@ | ||
16177 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
16178 | # | ||
16179 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
16180 | -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
16181 | +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, | ||
16182 | +# Inc. | ||
16183 | # Written by Gordon Matzigkeit, 1996 | ||
16184 | # | ||
16185 | # This file is part of GNU Libtool. | ||
16186 | @@ -13879,19 +14547,42 @@ | ||
16187 | # turn newlines into spaces. | ||
16188 | NL2SP=$lt_lt_NL2SP | ||
16189 | |||
16190 | +# convert \$build file names to \$host format. | ||
16191 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
16192 | + | ||
16193 | +# convert \$build files to toolchain format. | ||
16194 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
16195 | + | ||
16196 | # An object symbol dumper. | ||
16197 | OBJDUMP=$lt_OBJDUMP | ||
16198 | |||
16199 | # Method to check whether dependent libraries are shared objects. | ||
16200 | deplibs_check_method=$lt_deplibs_check_method | ||
16201 | |||
16202 | -# Command to use when deplibs_check_method == "file_magic". | ||
16203 | +# Command to use when deplibs_check_method = "file_magic". | ||
16204 | file_magic_cmd=$lt_file_magic_cmd | ||
16205 | |||
16206 | +# How to find potential files when deplibs_check_method = "file_magic". | ||
16207 | +file_magic_glob=$lt_file_magic_glob | ||
16208 | + | ||
16209 | +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". | ||
16210 | +want_nocaseglob=$lt_want_nocaseglob | ||
16211 | + | ||
16212 | +# DLL creation program. | ||
16213 | +DLLTOOL=$lt_DLLTOOL | ||
16214 | + | ||
16215 | +# Command to associate shared and link libraries. | ||
16216 | +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd | ||
16217 | + | ||
16218 | # The archiver. | ||
16219 | AR=$lt_AR | ||
16220 | + | ||
16221 | +# Flags to create an archive. | ||
16222 | AR_FLAGS=$lt_AR_FLAGS | ||
16223 | |||
16224 | +# How to feed a file listing to the archiver. | ||
16225 | +archiver_list_spec=$lt_archiver_list_spec | ||
16226 | + | ||
16227 | # A symbol stripping program. | ||
16228 | STRIP=$lt_STRIP | ||
16229 | |||
16230 | @@ -13921,6 +14612,12 @@ | ||
16231 | # Transform the output of nm in a C name address pair when lib prefix is needed. | ||
16232 | global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix | ||
16233 | |||
16234 | +# Specify filename containing input files for \$NM. | ||
16235 | +nm_file_list_spec=$lt_nm_file_list_spec | ||
16236 | + | ||
16237 | +# The root where to search for dependent libraries,and in which our libraries should be installed. | ||
16238 | +lt_sysroot=$lt_sysroot | ||
16239 | + | ||
16240 | # The name of the directory that contains temporary libtool files. | ||
16241 | objdir=$objdir | ||
16242 | |||
16243 | @@ -13930,6 +14627,9 @@ | ||
16244 | # Must we lock files when doing compilation? | ||
16245 | need_locks=$lt_need_locks | ||
16246 | |||
16247 | +# Manifest tool. | ||
16248 | +MANIFEST_TOOL=$lt_MANIFEST_TOOL | ||
16249 | + | ||
16250 | # Tool to manipulate archived DWARF debug symbol files on Mac OS X. | ||
16251 | DSYMUTIL=$lt_DSYMUTIL | ||
16252 | |||
16253 | @@ -14044,12 +14744,12 @@ | ||
16254 | # Compiler flag to turn off builtin functions. | ||
16255 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
16256 | |||
16257 | -# How to pass a linker flag through the compiler. | ||
16258 | -wl=$lt_lt_prog_compiler_wl | ||
16259 | - | ||
16260 | # Additional compiler flags for building library objects. | ||
16261 | pic_flag=$lt_lt_prog_compiler_pic | ||
16262 | |||
16263 | +# How to pass a linker flag through the compiler. | ||
16264 | +wl=$lt_lt_prog_compiler_wl | ||
16265 | + | ||
16266 | # Compiler flag to prevent dynamic linking. | ||
16267 | link_static_flag=$lt_lt_prog_compiler_static | ||
16268 | |||
16269 | @@ -14136,9 +14836,6 @@ | ||
16270 | # Whether libtool must link a program against all its dependency libraries. | ||
16271 | link_all_deplibs=$link_all_deplibs | ||
16272 | |||
16273 | -# Fix the shell variable \$srcfile for the compiler. | ||
16274 | -fix_srcfile_path=$lt_fix_srcfile_path | ||
16275 | - | ||
16276 | # Set to "yes" if exported symbols are required. | ||
16277 | always_export_symbols=$always_export_symbols | ||
16278 | |||
16279 | @@ -14154,6 +14851,9 @@ | ||
16280 | # Commands necessary for linking programs (against libraries) with templates. | ||
16281 | prelink_cmds=$lt_prelink_cmds | ||
16282 | |||
16283 | +# Commands necessary for finishing linking programs. | ||
16284 | +postlink_cmds=$lt_postlink_cmds | ||
16285 | + | ||
16286 | # Specify filename containing input files. | ||
16287 | file_list_spec=$lt_file_list_spec | ||
16288 | |||
16289 | @@ -14186,210 +14886,169 @@ | ||
16290 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
16291 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
16292 | # is reportedly fixed, but why not run on old versions too? | ||
16293 | - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | ||
16294 | - || (rm -f "$cfgfile"; exit 1) | ||
16295 | - | ||
16296 | - case $xsi_shell in | ||
16297 | - yes) | ||
16298 | - cat << \_LT_EOF >> "$cfgfile" | ||
16299 | - | ||
16300 | -# func_dirname file append nondir_replacement | ||
16301 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
16302 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
16303 | -func_dirname () | ||
16304 | -{ | ||
16305 | - case ${1} in | ||
16306 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
16307 | - * ) func_dirname_result="${3}" ;; | ||
16308 | - esac | ||
16309 | -} | ||
16310 | - | ||
16311 | -# func_basename file | ||
16312 | -func_basename () | ||
16313 | -{ | ||
16314 | - func_basename_result="${1##*/}" | ||
16315 | -} | ||
16316 | - | ||
16317 | -# func_dirname_and_basename file append nondir_replacement | ||
16318 | -# perform func_basename and func_dirname in a single function | ||
16319 | -# call: | ||
16320 | -# dirname: Compute the dirname of FILE. If nonempty, | ||
16321 | -# add APPEND to the result, otherwise set result | ||
16322 | -# to NONDIR_REPLACEMENT. | ||
16323 | -# value returned in "$func_dirname_result" | ||
16324 | -# basename: Compute filename of FILE. | ||
16325 | -# value retuned in "$func_basename_result" | ||
16326 | -# Implementation must be kept synchronized with func_dirname | ||
16327 | -# and func_basename. For efficiency, we do not delegate to | ||
16328 | -# those functions but instead duplicate the functionality here. | ||
16329 | -func_dirname_and_basename () | ||
16330 | -{ | ||
16331 | - case ${1} in | ||
16332 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
16333 | - * ) func_dirname_result="${3}" ;; | ||
16334 | - esac | ||
16335 | - func_basename_result="${1##*/}" | ||
16336 | -} | ||
16337 | - | ||
16338 | -# func_stripname prefix suffix name | ||
16339 | -# strip PREFIX and SUFFIX off of NAME. | ||
16340 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
16341 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
16342 | -# dot (in which case that matches only a dot). | ||
16343 | -func_stripname () | ||
16344 | -{ | ||
16345 | - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
16346 | - # positional parameters, so assign one to ordinary parameter first. | ||
16347 | - func_stripname_result=${3} | ||
16348 | - func_stripname_result=${func_stripname_result#"${1}"} | ||
16349 | - func_stripname_result=${func_stripname_result%"${2}"} | ||
16350 | -} | ||
16351 | - | ||
16352 | -# func_opt_split | ||
16353 | -func_opt_split () | ||
16354 | -{ | ||
16355 | - func_opt_split_opt=${1%%=*} | ||
16356 | - func_opt_split_arg=${1#*=} | ||
16357 | -} | ||
16358 | - | ||
16359 | -# func_lo2o object | ||
16360 | -func_lo2o () | ||
16361 | -{ | ||
16362 | - case ${1} in | ||
16363 | - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
16364 | - *) func_lo2o_result=${1} ;; | ||
16365 | - esac | ||
16366 | -} | ||
16367 | - | ||
16368 | -# func_xform libobj-or-source | ||
16369 | -func_xform () | ||
16370 | -{ | ||
16371 | - func_xform_result=${1%.*}.lo | ||
16372 | -} | ||
16373 | - | ||
16374 | -# func_arith arithmetic-term... | ||
16375 | -func_arith () | ||
16376 | -{ | ||
16377 | - func_arith_result=$(( $* )) | ||
16378 | -} | ||
16379 | - | ||
16380 | -# func_len string | ||
16381 | -# STRING may not start with a hyphen. | ||
16382 | -func_len () | ||
16383 | -{ | ||
16384 | - func_len_result=${#1} | ||
16385 | -} | ||
16386 | - | ||
16387 | -_LT_EOF | ||
16388 | - ;; | ||
16389 | - *) # Bourne compatible functions. | ||
16390 | - cat << \_LT_EOF >> "$cfgfile" | ||
16391 | - | ||
16392 | -# func_dirname file append nondir_replacement | ||
16393 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
16394 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
16395 | -func_dirname () | ||
16396 | -{ | ||
16397 | - # Extract subdirectory from the argument. | ||
16398 | - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | ||
16399 | - if test "X$func_dirname_result" = "X${1}"; then | ||
16400 | - func_dirname_result="${3}" | ||
16401 | - else | ||
16402 | - func_dirname_result="$func_dirname_result${2}" | ||
16403 | - fi | ||
16404 | -} | ||
16405 | - | ||
16406 | -# func_basename file | ||
16407 | -func_basename () | ||
16408 | -{ | ||
16409 | - func_basename_result=`$ECHO "${1}" | $SED "$basename"` | ||
16410 | -} | ||
16411 | - | ||
16412 | - | ||
16413 | -# func_stripname prefix suffix name | ||
16414 | -# strip PREFIX and SUFFIX off of NAME. | ||
16415 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
16416 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
16417 | -# dot (in which case that matches only a dot). | ||
16418 | -# func_strip_suffix prefix name | ||
16419 | -func_stripname () | ||
16420 | -{ | ||
16421 | - case ${2} in | ||
16422 | - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
16423 | - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
16424 | - esac | ||
16425 | -} | ||
16426 | - | ||
16427 | -# sed scripts: | ||
16428 | -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' | ||
16429 | -my_sed_long_arg='1s/^-[^=]*=//' | ||
16430 | - | ||
16431 | -# func_opt_split | ||
16432 | -func_opt_split () | ||
16433 | -{ | ||
16434 | - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` | ||
16435 | - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` | ||
16436 | -} | ||
16437 | - | ||
16438 | -# func_lo2o object | ||
16439 | -func_lo2o () | ||
16440 | -{ | ||
16441 | - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | ||
16442 | -} | ||
16443 | - | ||
16444 | -# func_xform libobj-or-source | ||
16445 | -func_xform () | ||
16446 | -{ | ||
16447 | - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | ||
16448 | -} | ||
16449 | - | ||
16450 | -# func_arith arithmetic-term... | ||
16451 | -func_arith () | ||
16452 | -{ | ||
16453 | - func_arith_result=`expr "$@"` | ||
16454 | -} | ||
16455 | - | ||
16456 | -# func_len string | ||
16457 | -# STRING may not start with a hyphen. | ||
16458 | -func_len () | ||
16459 | -{ | ||
16460 | - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` | ||
16461 | -} | ||
16462 | - | ||
16463 | -_LT_EOF | ||
16464 | -esac | ||
16465 | - | ||
16466 | -case $lt_shell_append in | ||
16467 | - yes) | ||
16468 | - cat << \_LT_EOF >> "$cfgfile" | ||
16469 | - | ||
16470 | -# func_append var value | ||
16471 | -# Append VALUE to the end of shell variable VAR. | ||
16472 | -func_append () | ||
16473 | -{ | ||
16474 | - eval "$1+=\$2" | ||
16475 | -} | ||
16476 | -_LT_EOF | ||
16477 | - ;; | ||
16478 | - *) | ||
16479 | - cat << \_LT_EOF >> "$cfgfile" | ||
16480 | - | ||
16481 | -# func_append var value | ||
16482 | -# Append VALUE to the end of shell variable VAR. | ||
16483 | -func_append () | ||
16484 | -{ | ||
16485 | - eval "$1=\$$1\$2" | ||
16486 | -} | ||
16487 | - | ||
16488 | -_LT_EOF | ||
16489 | - ;; | ||
16490 | - esac | ||
16491 | + sed '$q' "$ltmain" >> "$cfgfile" \ | ||
16492 | + || (rm -f "$cfgfile"; exit 1) | ||
16493 | |||
16494 | + if test x"$xsi_shell" = xyes; then | ||
16495 | + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ | ||
16496 | +func_dirname ()\ | ||
16497 | +{\ | ||
16498 | +\ case ${1} in\ | ||
16499 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
16500 | +\ * ) func_dirname_result="${3}" ;;\ | ||
16501 | +\ esac\ | ||
16502 | +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16503 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16504 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16505 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16506 | + | ||
16507 | + | ||
16508 | + sed -e '/^func_basename ()$/,/^} # func_basename /c\ | ||
16509 | +func_basename ()\ | ||
16510 | +{\ | ||
16511 | +\ func_basename_result="${1##*/}"\ | ||
16512 | +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16513 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16514 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16515 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16516 | + | ||
16517 | + | ||
16518 | + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ | ||
16519 | +func_dirname_and_basename ()\ | ||
16520 | +{\ | ||
16521 | +\ case ${1} in\ | ||
16522 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
16523 | +\ * ) func_dirname_result="${3}" ;;\ | ||
16524 | +\ esac\ | ||
16525 | +\ func_basename_result="${1##*/}"\ | ||
16526 | +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16527 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16528 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16529 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16530 | + | ||
16531 | + | ||
16532 | + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ | ||
16533 | +func_stripname ()\ | ||
16534 | +{\ | ||
16535 | +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ | ||
16536 | +\ # positional parameters, so assign one to ordinary parameter first.\ | ||
16537 | +\ func_stripname_result=${3}\ | ||
16538 | +\ func_stripname_result=${func_stripname_result#"${1}"}\ | ||
16539 | +\ func_stripname_result=${func_stripname_result%"${2}"}\ | ||
16540 | +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16541 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16542 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16543 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16544 | + | ||
16545 | + | ||
16546 | + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ | ||
16547 | +func_split_long_opt ()\ | ||
16548 | +{\ | ||
16549 | +\ func_split_long_opt_name=${1%%=*}\ | ||
16550 | +\ func_split_long_opt_arg=${1#*=}\ | ||
16551 | +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16552 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16553 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16554 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16555 | + | ||
16556 | + | ||
16557 | + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ | ||
16558 | +func_split_short_opt ()\ | ||
16559 | +{\ | ||
16560 | +\ func_split_short_opt_arg=${1#??}\ | ||
16561 | +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ | ||
16562 | +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16563 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16564 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16565 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16566 | + | ||
16567 | + | ||
16568 | + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ | ||
16569 | +func_lo2o ()\ | ||
16570 | +{\ | ||
16571 | +\ case ${1} in\ | ||
16572 | +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ | ||
16573 | +\ *) func_lo2o_result=${1} ;;\ | ||
16574 | +\ esac\ | ||
16575 | +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16576 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16577 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16578 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16579 | + | ||
16580 | + | ||
16581 | + sed -e '/^func_xform ()$/,/^} # func_xform /c\ | ||
16582 | +func_xform ()\ | ||
16583 | +{\ | ||
16584 | + func_xform_result=${1%.*}.lo\ | ||
16585 | +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16586 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16587 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16588 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16589 | + | ||
16590 | + | ||
16591 | + sed -e '/^func_arith ()$/,/^} # func_arith /c\ | ||
16592 | +func_arith ()\ | ||
16593 | +{\ | ||
16594 | + func_arith_result=$(( $* ))\ | ||
16595 | +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16596 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16597 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16598 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16599 | + | ||
16600 | + | ||
16601 | + sed -e '/^func_len ()$/,/^} # func_len /c\ | ||
16602 | +func_len ()\ | ||
16603 | +{\ | ||
16604 | + func_len_result=${#1}\ | ||
16605 | +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16606 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16607 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16608 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16609 | + | ||
16610 | +fi | ||
16611 | + | ||
16612 | +if test x"$lt_shell_append" = xyes; then | ||
16613 | + sed -e '/^func_append ()$/,/^} # func_append /c\ | ||
16614 | +func_append ()\ | ||
16615 | +{\ | ||
16616 | + eval "${1}+=\\${2}"\ | ||
16617 | +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16618 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16619 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16620 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16621 | + | ||
16622 | + | ||
16623 | + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ | ||
16624 | +func_append_quoted ()\ | ||
16625 | +{\ | ||
16626 | +\ func_quote_for_eval "${2}"\ | ||
16627 | +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ | ||
16628 | +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ | ||
16629 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16630 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16631 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
16632 | + | ||
16633 | + | ||
16634 | + # Save a `func_append' function call where possible by direct use of '+=' | ||
16635 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
16636 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
16637 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
16638 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
16639 | +else | ||
16640 | + # Save a `func_append' function call even when '+=' is not available | ||
16641 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $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 | +fi | ||
16646 | + | ||
16647 | +if test x"$_lt_function_replace_fail" = x":"; then | ||
16648 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 | ||
16649 | +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} | ||
16650 | +fi | ||
16651 | |||
16652 | - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ | ||
16653 | - || (rm -f "$cfgfile"; exit 1) | ||
16654 | |||
16655 | - mv -f "$cfgfile" "$ofile" || | ||
16656 | + mv -f "$cfgfile" "$ofile" || | ||
16657 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
16658 | chmod +x "$ofile" | ||
16659 | |||
16660 | Index: binutils-2.24/ld/configure | ||
16661 | =================================================================== | ||
16662 | --- binutils-2.24.orig/ld/configure 2013-11-04 07:33:39.000000000 -0800 | ||
16663 | +++ binutils-2.24/ld/configure 2013-12-15 11:12:06.120451266 -0800 | ||
16664 | @@ -646,8 +646,11 @@ | ||
16665 | LIPO | ||
16666 | NMEDIT | ||
16667 | DSYMUTIL | ||
16668 | +MANIFEST_TOOL | ||
16669 | RANLIB | ||
16670 | +ac_ct_AR | ||
16671 | AR | ||
16672 | +DLLTOOL | ||
16673 | OBJDUMP | ||
16674 | LN_S | ||
16675 | NM | ||
16676 | @@ -785,6 +788,7 @@ | ||
16677 | with_pic | ||
16678 | enable_fast_install | ||
16679 | with_gnu_ld | ||
16680 | +with_libtool_sysroot | ||
16681 | enable_libtool_lock | ||
16682 | enable_nls | ||
16683 | enable_initfini_array | ||
16684 | @@ -1452,6 +1456,8 @@ | ||
16685 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
16686 | both] | ||
16687 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
16688 | + --with-libtool-sysroot=DIR Search for dependent libraries within DIR | ||
16689 | + (or the compiler's sysroot if not specified). | ||
16690 | --with-zlib include zlib support (auto/yes/no) default=auto | ||
16691 | |||
16692 | Some influential environment variables: | ||
16693 | @@ -6125,8 +6131,8 @@ | ||
16694 | |||
16695 | |||
16696 | |||
16697 | -macro_version='2.2.7a' | ||
16698 | -macro_revision='1.3134' | ||
16699 | +macro_version='2.4' | ||
16700 | +macro_revision='1.3293' | ||
16701 | |||
16702 | |||
16703 | |||
16704 | @@ -6166,7 +6172,7 @@ | ||
16705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 | ||
16706 | $as_echo_n "checking how to print strings... " >&6; } | ||
16707 | # Test print first, because it will be a builtin if present. | ||
16708 | -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ | ||
16709 | +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
16710 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
16711 | ECHO='print -r --' | ||
16712 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
16713 | @@ -6852,8 +6858,8 @@ | ||
16714 | # Try some XSI features | ||
16715 | xsi_shell=no | ||
16716 | ( _lt_dummy="a/b/c" | ||
16717 | - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | ||
16718 | - = c,a/b,, \ | ||
16719 | + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
16720 | + = c,a/b,b/c, \ | ||
16721 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
16722 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
16723 | && xsi_shell=yes | ||
16724 | @@ -6902,6 +6908,80 @@ | ||
16725 | |||
16726 | |||
16727 | |||
16728 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 | ||
16729 | +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } | ||
16730 | +if test "${lt_cv_to_host_file_cmd+set}" = set; then : | ||
16731 | + $as_echo_n "(cached) " >&6 | ||
16732 | +else | ||
16733 | + case $host in | ||
16734 | + *-*-mingw* ) | ||
16735 | + case $build in | ||
16736 | + *-*-mingw* ) # actually msys | ||
16737 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
16738 | + ;; | ||
16739 | + *-*-cygwin* ) | ||
16740 | + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
16741 | + ;; | ||
16742 | + * ) # otherwise, assume *nix | ||
16743 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
16744 | + ;; | ||
16745 | + esac | ||
16746 | + ;; | ||
16747 | + *-*-cygwin* ) | ||
16748 | + case $build in | ||
16749 | + *-*-mingw* ) # actually msys | ||
16750 | + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
16751 | + ;; | ||
16752 | + *-*-cygwin* ) | ||
16753 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
16754 | + ;; | ||
16755 | + * ) # otherwise, assume *nix | ||
16756 | + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
16757 | + ;; | ||
16758 | + esac | ||
16759 | + ;; | ||
16760 | + * ) # unhandled hosts (and "normal" native builds) | ||
16761 | + lt_cv_to_host_file_cmd=func_convert_file_noop | ||
16762 | + ;; | ||
16763 | +esac | ||
16764 | + | ||
16765 | +fi | ||
16766 | + | ||
16767 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
16768 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 | ||
16769 | +$as_echo "$lt_cv_to_host_file_cmd" >&6; } | ||
16770 | + | ||
16771 | + | ||
16772 | + | ||
16773 | + | ||
16774 | + | ||
16775 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 | ||
16776 | +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } | ||
16777 | +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : | ||
16778 | + $as_echo_n "(cached) " >&6 | ||
16779 | +else | ||
16780 | + #assume ordinary cross tools, or native build. | ||
16781 | +lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
16782 | +case $host in | ||
16783 | + *-*-mingw* ) | ||
16784 | + case $build in | ||
16785 | + *-*-mingw* ) # actually msys | ||
16786 | + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
16787 | + ;; | ||
16788 | + esac | ||
16789 | + ;; | ||
16790 | +esac | ||
16791 | + | ||
16792 | +fi | ||
16793 | + | ||
16794 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
16795 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 | ||
16796 | +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } | ||
16797 | + | ||
16798 | + | ||
16799 | + | ||
16800 | + | ||
16801 | + | ||
16802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 | ||
16803 | $as_echo_n "checking for $LD option to reload object files... " >&6; } | ||
16804 | if test "${lt_cv_ld_reload_flag+set}" = set; then : | ||
16805 | @@ -6918,6 +6998,11 @@ | ||
16806 | esac | ||
16807 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
16808 | case $host_os in | ||
16809 | + cygwin* | mingw* | pw32* | cegcc*) | ||
16810 | + if test "$GCC" != yes; then | ||
16811 | + reload_cmds=false | ||
16812 | + fi | ||
16813 | + ;; | ||
16814 | darwin*) | ||
16815 | if test "$GCC" = yes; then | ||
16816 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
16817 | @@ -7086,7 +7171,8 @@ | ||
16818 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
16819 | lt_cv_file_magic_cmd='func_win32_libid' | ||
16820 | else | ||
16821 | - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
16822 | + # Keep this pattern in sync with the one in func_win32_libid. | ||
16823 | + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
16824 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
16825 | fi | ||
16826 | ;; | ||
16827 | @@ -7240,6 +7326,21 @@ | ||
16828 | fi | ||
16829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 | ||
16830 | $as_echo "$lt_cv_deplibs_check_method" >&6; } | ||
16831 | + | ||
16832 | +file_magic_glob= | ||
16833 | +want_nocaseglob=no | ||
16834 | +if test "$build" = "$host"; then | ||
16835 | + case $host_os in | ||
16836 | + mingw* | pw32*) | ||
16837 | + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
16838 | + want_nocaseglob=yes | ||
16839 | + else | ||
16840 | + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` | ||
16841 | + fi | ||
16842 | + ;; | ||
16843 | + esac | ||
16844 | +fi | ||
16845 | + | ||
16846 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
16847 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
16848 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
16849 | @@ -7255,9 +7356,162 @@ | ||
16850 | |||
16851 | |||
16852 | |||
16853 | + | ||
16854 | + | ||
16855 | + | ||
16856 | + | ||
16857 | + | ||
16858 | + | ||
16859 | + | ||
16860 | + | ||
16861 | + | ||
16862 | + | ||
16863 | if test -n "$ac_tool_prefix"; then | ||
16864 | - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
16865 | -set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
16866 | + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
16867 | +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
16868 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
16869 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
16870 | +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | ||
16871 | + $as_echo_n "(cached) " >&6 | ||
16872 | +else | ||
16873 | + if test -n "$DLLTOOL"; then | ||
16874 | + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
16875 | +else | ||
16876 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
16877 | +for as_dir in $PATH | ||
16878 | +do | ||
16879 | + IFS=$as_save_IFS | ||
16880 | + test -z "$as_dir" && as_dir=. | ||
16881 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
16882 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
16883 | + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
16884 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
16885 | + break 2 | ||
16886 | + fi | ||
16887 | +done | ||
16888 | + done | ||
16889 | +IFS=$as_save_IFS | ||
16890 | + | ||
16891 | +fi | ||
16892 | +fi | ||
16893 | +DLLTOOL=$ac_cv_prog_DLLTOOL | ||
16894 | +if test -n "$DLLTOOL"; then | ||
16895 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 | ||
16896 | +$as_echo "$DLLTOOL" >&6; } | ||
16897 | +else | ||
16898 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
16899 | +$as_echo "no" >&6; } | ||
16900 | +fi | ||
16901 | + | ||
16902 | + | ||
16903 | +fi | ||
16904 | +if test -z "$ac_cv_prog_DLLTOOL"; then | ||
16905 | + ac_ct_DLLTOOL=$DLLTOOL | ||
16906 | + # Extract the first word of "dlltool", so it can be a program name with args. | ||
16907 | +set dummy dlltool; ac_word=$2 | ||
16908 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
16909 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
16910 | +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | ||
16911 | + $as_echo_n "(cached) " >&6 | ||
16912 | +else | ||
16913 | + if test -n "$ac_ct_DLLTOOL"; then | ||
16914 | + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
16915 | +else | ||
16916 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
16917 | +for as_dir in $PATH | ||
16918 | +do | ||
16919 | + IFS=$as_save_IFS | ||
16920 | + test -z "$as_dir" && as_dir=. | ||
16921 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
16922 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
16923 | + ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
16924 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
16925 | + break 2 | ||
16926 | + fi | ||
16927 | +done | ||
16928 | + done | ||
16929 | +IFS=$as_save_IFS | ||
16930 | + | ||
16931 | +fi | ||
16932 | +fi | ||
16933 | +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
16934 | +if test -n "$ac_ct_DLLTOOL"; then | ||
16935 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 | ||
16936 | +$as_echo "$ac_ct_DLLTOOL" >&6; } | ||
16937 | +else | ||
16938 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
16939 | +$as_echo "no" >&6; } | ||
16940 | +fi | ||
16941 | + | ||
16942 | + if test "x$ac_ct_DLLTOOL" = x; then | ||
16943 | + DLLTOOL="false" | ||
16944 | + else | ||
16945 | + case $cross_compiling:$ac_tool_warned in | ||
16946 | +yes:) | ||
16947 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
16948 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
16949 | +ac_tool_warned=yes ;; | ||
16950 | +esac | ||
16951 | + DLLTOOL=$ac_ct_DLLTOOL | ||
16952 | + fi | ||
16953 | +else | ||
16954 | + DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
16955 | +fi | ||
16956 | + | ||
16957 | +test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
16958 | + | ||
16959 | + | ||
16960 | + | ||
16961 | + | ||
16962 | + | ||
16963 | + | ||
16964 | + | ||
16965 | + | ||
16966 | + | ||
16967 | + | ||
16968 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 | ||
16969 | +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } | ||
16970 | +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : | ||
16971 | + $as_echo_n "(cached) " >&6 | ||
16972 | +else | ||
16973 | + lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
16974 | + | ||
16975 | +case $host_os in | ||
16976 | +cygwin* | mingw* | pw32* | cegcc*) | ||
16977 | + # two different shell functions defined in ltmain.sh | ||
16978 | + # decide which to use based on capabilities of $DLLTOOL | ||
16979 | + case `$DLLTOOL --help 2>&1` in | ||
16980 | + *--identify-strict*) | ||
16981 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
16982 | + ;; | ||
16983 | + *) | ||
16984 | + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
16985 | + ;; | ||
16986 | + esac | ||
16987 | + ;; | ||
16988 | +*) | ||
16989 | + # fallback: assume linklib IS sharedlib | ||
16990 | + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
16991 | + ;; | ||
16992 | +esac | ||
16993 | + | ||
16994 | +fi | ||
16995 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 | ||
16996 | +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } | ||
16997 | +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
16998 | +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
16999 | + | ||
17000 | + | ||
17001 | + | ||
17002 | + | ||
17003 | + | ||
17004 | + | ||
17005 | + | ||
17006 | +if test -n "$ac_tool_prefix"; then | ||
17007 | + for ac_prog in ar | ||
17008 | + do | ||
17009 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
17010 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
17011 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
17012 | $as_echo_n "checking for $ac_word... " >&6; } | ||
17013 | if test "${ac_cv_prog_AR+set}" = set; then : | ||
17014 | @@ -7273,7 +7527,7 @@ | ||
17015 | test -z "$as_dir" && as_dir=. | ||
17016 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
17017 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
17018 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
17019 | + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" | ||
17020 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
17021 | break 2 | ||
17022 | fi | ||
17023 | @@ -7293,11 +7547,15 @@ | ||
17024 | fi | ||
17025 | |||
17026 | |||
17027 | + test -n "$AR" && break | ||
17028 | + done | ||
17029 | fi | ||
17030 | -if test -z "$ac_cv_prog_AR"; then | ||
17031 | +if test -z "$AR"; then | ||
17032 | ac_ct_AR=$AR | ||
17033 | - # Extract the first word of "ar", so it can be a program name with args. | ||
17034 | -set dummy ar; ac_word=$2 | ||
17035 | + for ac_prog in ar | ||
17036 | +do | ||
17037 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
17038 | +set dummy $ac_prog; ac_word=$2 | ||
17039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
17040 | $as_echo_n "checking for $ac_word... " >&6; } | ||
17041 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | ||
17042 | @@ -7313,7 +7571,7 @@ | ||
17043 | test -z "$as_dir" && as_dir=. | ||
17044 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
17045 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
17046 | - ac_cv_prog_ac_ct_AR="ar" | ||
17047 | + ac_cv_prog_ac_ct_AR="$ac_prog" | ||
17048 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
17049 | break 2 | ||
17050 | fi | ||
17051 | @@ -7332,6 +7590,10 @@ | ||
17052 | $as_echo "no" >&6; } | ||
17053 | fi | ||
17054 | |||
17055 | + | ||
17056 | + test -n "$ac_ct_AR" && break | ||
17057 | +done | ||
17058 | + | ||
17059 | if test "x$ac_ct_AR" = x; then | ||
17060 | AR="false" | ||
17061 | else | ||
17062 | @@ -7343,12 +7605,10 @@ | ||
17063 | esac | ||
17064 | AR=$ac_ct_AR | ||
17065 | fi | ||
17066 | -else | ||
17067 | - AR="$ac_cv_prog_AR" | ||
17068 | fi | ||
17069 | |||
17070 | -test -z "$AR" && AR=ar | ||
17071 | -test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
17072 | +: ${AR=ar} | ||
17073 | +: ${AR_FLAGS=cru} | ||
17074 | |||
17075 | |||
17076 | |||
17077 | @@ -7360,6 +7620,64 @@ | ||
17078 | |||
17079 | |||
17080 | |||
17081 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 | ||
17082 | +$as_echo_n "checking for archiver @FILE support... " >&6; } | ||
17083 | +if test "${lt_cv_ar_at_file+set}" = set; then : | ||
17084 | + $as_echo_n "(cached) " >&6 | ||
17085 | +else | ||
17086 | + lt_cv_ar_at_file=no | ||
17087 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17088 | +/* end confdefs.h. */ | ||
17089 | + | ||
17090 | +int | ||
17091 | +main () | ||
17092 | +{ | ||
17093 | + | ||
17094 | + ; | ||
17095 | + return 0; | ||
17096 | +} | ||
17097 | +_ACEOF | ||
17098 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
17099 | + echo conftest.$ac_objext > conftest.lst | ||
17100 | + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' | ||
17101 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
17102 | + (eval $lt_ar_try) 2>&5 | ||
17103 | + ac_status=$? | ||
17104 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
17105 | + test $ac_status = 0; } | ||
17106 | + if test "$ac_status" -eq 0; then | ||
17107 | + # Ensure the archiver fails upon bogus file names. | ||
17108 | + rm -f conftest.$ac_objext libconftest.a | ||
17109 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 | ||
17110 | + (eval $lt_ar_try) 2>&5 | ||
17111 | + ac_status=$? | ||
17112 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
17113 | + test $ac_status = 0; } | ||
17114 | + if test "$ac_status" -ne 0; then | ||
17115 | + lt_cv_ar_at_file=@ | ||
17116 | + fi | ||
17117 | + fi | ||
17118 | + rm -f conftest.* libconftest.a | ||
17119 | + | ||
17120 | +fi | ||
17121 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
17122 | + | ||
17123 | +fi | ||
17124 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 | ||
17125 | +$as_echo "$lt_cv_ar_at_file" >&6; } | ||
17126 | + | ||
17127 | +if test "x$lt_cv_ar_at_file" = xno; then | ||
17128 | + archiver_list_spec= | ||
17129 | +else | ||
17130 | + archiver_list_spec=$lt_cv_ar_at_file | ||
17131 | +fi | ||
17132 | + | ||
17133 | + | ||
17134 | + | ||
17135 | + | ||
17136 | + | ||
17137 | + | ||
17138 | + | ||
17139 | if test -n "$ac_tool_prefix"; then | ||
17140 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | ||
17141 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | ||
17142 | @@ -7694,8 +8012,8 @@ | ||
17143 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
17144 | |||
17145 | # Transform an extracted symbol line into symbol name and symbol address | ||
17146 | -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
17147 | -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'" | ||
17148 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
17149 | +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'" | ||
17150 | |||
17151 | # Handle CRLF in mingw tool chain | ||
17152 | opt_cr= | ||
17153 | @@ -7731,6 +8049,7 @@ | ||
17154 | else | ||
17155 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
17156 | fi | ||
17157 | + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
17158 | |||
17159 | # Check to see that the pipe works correctly. | ||
17160 | pipe_works=no | ||
17161 | @@ -7772,6 +8091,18 @@ | ||
17162 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
17163 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
17164 | cat <<_LT_EOF > conftest.$ac_ext | ||
17165 | +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
17166 | +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
17167 | +/* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
17168 | + relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
17169 | +# define LT_DLSYM_CONST | ||
17170 | +#elif defined(__osf__) | ||
17171 | +/* This system does not cope well with relocations in const data. */ | ||
17172 | +# define LT_DLSYM_CONST | ||
17173 | +#else | ||
17174 | +# define LT_DLSYM_CONST const | ||
17175 | +#endif | ||
17176 | + | ||
17177 | #ifdef __cplusplus | ||
17178 | extern "C" { | ||
17179 | #endif | ||
17180 | @@ -7783,7 +8114,7 @@ | ||
17181 | cat <<_LT_EOF >> conftest.$ac_ext | ||
17182 | |||
17183 | /* The mapping between symbol names and symbols. */ | ||
17184 | -const struct { | ||
17185 | +LT_DLSYM_CONST struct { | ||
17186 | const char *name; | ||
17187 | void *address; | ||
17188 | } | ||
17189 | @@ -7809,8 +8140,8 @@ | ||
17190 | _LT_EOF | ||
17191 | # Now try linking the two files. | ||
17192 | mv conftest.$ac_objext conftstm.$ac_objext | ||
17193 | - lt_save_LIBS="$LIBS" | ||
17194 | - lt_save_CFLAGS="$CFLAGS" | ||
17195 | + lt_globsym_save_LIBS=$LIBS | ||
17196 | + lt_globsym_save_CFLAGS=$CFLAGS | ||
17197 | LIBS="conftstm.$ac_objext" | ||
17198 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
17199 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 | ||
17200 | @@ -7820,8 +8151,8 @@ | ||
17201 | test $ac_status = 0; } && test -s conftest${ac_exeext}; then | ||
17202 | pipe_works=yes | ||
17203 | fi | ||
17204 | - LIBS="$lt_save_LIBS" | ||
17205 | - CFLAGS="$lt_save_CFLAGS" | ||
17206 | + LIBS=$lt_globsym_save_LIBS | ||
17207 | + CFLAGS=$lt_globsym_save_CFLAGS | ||
17208 | else | ||
17209 | echo "cannot find nm_test_func in $nlist" >&5 | ||
17210 | fi | ||
17211 | @@ -7858,6 +8189,23 @@ | ||
17212 | $as_echo "ok" >&6; } | ||
17213 | fi | ||
17214 | |||
17215 | +# Response file support. | ||
17216 | +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
17217 | + nm_file_list_spec='@' | ||
17218 | +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then | ||
17219 | + nm_file_list_spec='@' | ||
17220 | +fi | ||
17221 | + | ||
17222 | + | ||
17223 | + | ||
17224 | + | ||
17225 | + | ||
17226 | + | ||
17227 | + | ||
17228 | + | ||
17229 | + | ||
17230 | + | ||
17231 | + | ||
17232 | |||
17233 | |||
17234 | |||
17235 | @@ -7874,6 +8222,38 @@ | ||
17236 | |||
17237 | |||
17238 | |||
17239 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 | ||
17240 | +$as_echo_n "checking for sysroot... " >&6; } | ||
17241 | + | ||
17242 | +# Check whether --with-libtool-sysroot was given. | ||
17243 | +if test "${with_libtool_sysroot+set}" = set; then : | ||
17244 | + withval=$with_libtool_sysroot; | ||
17245 | +else | ||
17246 | + with_libtool_sysroot=no | ||
17247 | +fi | ||
17248 | + | ||
17249 | + | ||
17250 | +lt_sysroot= | ||
17251 | +case ${with_libtool_sysroot} in #( | ||
17252 | + yes) | ||
17253 | + if test "$GCC" = yes; then | ||
17254 | + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
17255 | + fi | ||
17256 | + ;; #( | ||
17257 | + /*) | ||
17258 | + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
17259 | + ;; #( | ||
17260 | + no|'') | ||
17261 | + ;; #( | ||
17262 | + *) | ||
17263 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 | ||
17264 | +$as_echo "${with_libtool_sysroot}" >&6; } | ||
17265 | + as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 | ||
17266 | + ;; | ||
17267 | +esac | ||
17268 | + | ||
17269 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 | ||
17270 | +$as_echo "${lt_sysroot:-no}" >&6; } | ||
17271 | |||
17272 | |||
17273 | |||
17274 | @@ -8085,6 +8465,123 @@ | ||
17275 | |||
17276 | need_locks="$enable_libtool_lock" | ||
17277 | |||
17278 | +if test -n "$ac_tool_prefix"; then | ||
17279 | + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. | ||
17280 | +set dummy ${ac_tool_prefix}mt; ac_word=$2 | ||
17281 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
17282 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
17283 | +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : | ||
17284 | + $as_echo_n "(cached) " >&6 | ||
17285 | +else | ||
17286 | + if test -n "$MANIFEST_TOOL"; then | ||
17287 | + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. | ||
17288 | +else | ||
17289 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
17290 | +for as_dir in $PATH | ||
17291 | +do | ||
17292 | + IFS=$as_save_IFS | ||
17293 | + test -z "$as_dir" && as_dir=. | ||
17294 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
17295 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
17296 | + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" | ||
17297 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
17298 | + break 2 | ||
17299 | + fi | ||
17300 | +done | ||
17301 | + done | ||
17302 | +IFS=$as_save_IFS | ||
17303 | + | ||
17304 | +fi | ||
17305 | +fi | ||
17306 | +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL | ||
17307 | +if test -n "$MANIFEST_TOOL"; then | ||
17308 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 | ||
17309 | +$as_echo "$MANIFEST_TOOL" >&6; } | ||
17310 | +else | ||
17311 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
17312 | +$as_echo "no" >&6; } | ||
17313 | +fi | ||
17314 | + | ||
17315 | + | ||
17316 | +fi | ||
17317 | +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then | ||
17318 | + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL | ||
17319 | + # Extract the first word of "mt", so it can be a program name with args. | ||
17320 | +set dummy mt; ac_word=$2 | ||
17321 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
17322 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
17323 | +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : | ||
17324 | + $as_echo_n "(cached) " >&6 | ||
17325 | +else | ||
17326 | + if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
17327 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. | ||
17328 | +else | ||
17329 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
17330 | +for as_dir in $PATH | ||
17331 | +do | ||
17332 | + IFS=$as_save_IFS | ||
17333 | + test -z "$as_dir" && as_dir=. | ||
17334 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
17335 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
17336 | + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" | ||
17337 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
17338 | + break 2 | ||
17339 | + fi | ||
17340 | +done | ||
17341 | + done | ||
17342 | +IFS=$as_save_IFS | ||
17343 | + | ||
17344 | +fi | ||
17345 | +fi | ||
17346 | +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL | ||
17347 | +if test -n "$ac_ct_MANIFEST_TOOL"; then | ||
17348 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 | ||
17349 | +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } | ||
17350 | +else | ||
17351 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
17352 | +$as_echo "no" >&6; } | ||
17353 | +fi | ||
17354 | + | ||
17355 | + if test "x$ac_ct_MANIFEST_TOOL" = x; then | ||
17356 | + MANIFEST_TOOL=":" | ||
17357 | + else | ||
17358 | + case $cross_compiling:$ac_tool_warned in | ||
17359 | +yes:) | ||
17360 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | ||
17361 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | ||
17362 | +ac_tool_warned=yes ;; | ||
17363 | +esac | ||
17364 | + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL | ||
17365 | + fi | ||
17366 | +else | ||
17367 | + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" | ||
17368 | +fi | ||
17369 | + | ||
17370 | +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
17371 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 | ||
17372 | +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } | ||
17373 | +if test "${lt_cv_path_mainfest_tool+set}" = set; then : | ||
17374 | + $as_echo_n "(cached) " >&6 | ||
17375 | +else | ||
17376 | + lt_cv_path_mainfest_tool=no | ||
17377 | + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 | ||
17378 | + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
17379 | + cat conftest.err >&5 | ||
17380 | + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
17381 | + lt_cv_path_mainfest_tool=yes | ||
17382 | + fi | ||
17383 | + rm -f conftest* | ||
17384 | +fi | ||
17385 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 | ||
17386 | +$as_echo "$lt_cv_path_mainfest_tool" >&6; } | ||
17387 | +if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
17388 | + MANIFEST_TOOL=: | ||
17389 | +fi | ||
17390 | + | ||
17391 | + | ||
17392 | + | ||
17393 | + | ||
17394 | + | ||
17395 | |||
17396 | case $host_os in | ||
17397 | rhapsody* | darwin*) | ||
17398 | @@ -8648,6 +9145,8 @@ | ||
17399 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 | ||
17400 | echo "$AR cru libconftest.a conftest.o" >&5 | ||
17401 | $AR cru libconftest.a conftest.o 2>&5 | ||
17402 | + echo "$RANLIB libconftest.a" >&5 | ||
17403 | + $RANLIB libconftest.a 2>&5 | ||
17404 | cat > conftest.c << _LT_EOF | ||
17405 | int main() { return 0;} | ||
17406 | _LT_EOF | ||
17407 | @@ -8716,6 +9215,16 @@ | ||
17408 | |||
17409 | |||
17410 | |||
17411 | +func_stripname_cnf () | ||
17412 | +{ | ||
17413 | + case ${2} in | ||
17414 | + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
17415 | + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
17416 | + esac | ||
17417 | +} # func_stripname_cnf | ||
17418 | + | ||
17419 | + | ||
17420 | + | ||
17421 | |||
17422 | |||
17423 | # Set options | ||
17424 | @@ -8844,7 +9353,8 @@ | ||
17425 | LIBTOOL_DEPS="$ltmain" | ||
17426 | |||
17427 | # Always use our own libtool. | ||
17428 | -LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
17429 | +LIBTOOL='$(SHELL) $(top_builddir)' | ||
17430 | +LIBTOOL="$LIBTOOL/${host_alias}-libtool" | ||
17431 | |||
17432 | |||
17433 | |||
17434 | @@ -8933,7 +9443,7 @@ | ||
17435 | esac | ||
17436 | |||
17437 | # Global variables: | ||
17438 | -ofile=libtool | ||
17439 | +ofile=${host_alias}-libtool | ||
17440 | can_build_shared=yes | ||
17441 | |||
17442 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
17443 | @@ -9231,8 +9741,6 @@ | ||
17444 | lt_prog_compiler_pic= | ||
17445 | lt_prog_compiler_static= | ||
17446 | |||
17447 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
17448 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
17449 | |||
17450 | if test "$GCC" = yes; then | ||
17451 | lt_prog_compiler_wl='-Wl,' | ||
17452 | @@ -9398,6 +9906,12 @@ | ||
17453 | lt_prog_compiler_pic='--shared' | ||
17454 | lt_prog_compiler_static='--static' | ||
17455 | ;; | ||
17456 | + nagfor*) | ||
17457 | + # NAG Fortran compiler | ||
17458 | + lt_prog_compiler_wl='-Wl,-Wl,,' | ||
17459 | + lt_prog_compiler_pic='-PIC' | ||
17460 | + lt_prog_compiler_static='-Bstatic' | ||
17461 | + ;; | ||
17462 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
17463 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
17464 | # which looks to be a dead project) | ||
17465 | @@ -9460,7 +9974,7 @@ | ||
17466 | lt_prog_compiler_pic='-KPIC' | ||
17467 | lt_prog_compiler_static='-Bstatic' | ||
17468 | case $cc_basename in | ||
17469 | - f77* | f90* | f95*) | ||
17470 | + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
17471 | lt_prog_compiler_wl='-Qoption ld ';; | ||
17472 | *) | ||
17473 | lt_prog_compiler_wl='-Wl,';; | ||
17474 | @@ -9517,13 +10031,17 @@ | ||
17475 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
17476 | ;; | ||
17477 | esac | ||
17478 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 | ||
17479 | -$as_echo "$lt_prog_compiler_pic" >&6; } | ||
17480 | - | ||
17481 | - | ||
17482 | - | ||
17483 | - | ||
17484 | |||
17485 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
17486 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
17487 | +if test "${lt_cv_prog_compiler_pic+set}" = set; then : | ||
17488 | + $as_echo_n "(cached) " >&6 | ||
17489 | +else | ||
17490 | + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic | ||
17491 | +fi | ||
17492 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 | ||
17493 | +$as_echo "$lt_cv_prog_compiler_pic" >&6; } | ||
17494 | +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic | ||
17495 | |||
17496 | # | ||
17497 | # Check to make sure the PIC flag actually works. | ||
17498 | @@ -9584,6 +10102,11 @@ | ||
17499 | |||
17500 | |||
17501 | |||
17502 | + | ||
17503 | + | ||
17504 | + | ||
17505 | + | ||
17506 | + | ||
17507 | # | ||
17508 | # Check to make sure the static flag actually works. | ||
17509 | # | ||
17510 | @@ -9934,7 +10457,8 @@ | ||
17511 | allow_undefined_flag=unsupported | ||
17512 | always_export_symbols=no | ||
17513 | enable_shared_with_static_runtimes=yes | ||
17514 | - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
17515 | + 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' | ||
17516 | + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
17517 | |||
17518 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
17519 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
17520 | @@ -9982,7 +10506,7 @@ | ||
17521 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
17522 | && test "$tmp_diet" = no | ||
17523 | then | ||
17524 | - tmp_addflag= | ||
17525 | + tmp_addflag=' $pic_flag' | ||
17526 | tmp_sharedflag='-shared' | ||
17527 | case $cc_basename,$host_cpu in | ||
17528 | pgcc*) # Portland Group C compiler | ||
17529 | @@ -10033,12 +10557,12 @@ | ||
17530 | whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' | ||
17531 | hardcode_libdir_flag_spec= | ||
17532 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
17533 | - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | ||
17534 | + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
17535 | if test "x$supports_anon_versioning" = xyes; then | ||
17536 | archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ | ||
17537 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
17538 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
17539 | - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
17540 | + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
17541 | fi | ||
17542 | ;; | ||
17543 | esac | ||
17544 | @@ -10052,8 +10576,8 @@ | ||
17545 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
17546 | wlarc= | ||
17547 | else | ||
17548 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
17549 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
17550 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
17551 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
17552 | fi | ||
17553 | ;; | ||
17554 | |||
17555 | @@ -10071,8 +10595,8 @@ | ||
17556 | |||
17557 | _LT_EOF | ||
17558 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
17559 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
17560 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
17561 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
17562 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
17563 | else | ||
17564 | ld_shlibs=no | ||
17565 | fi | ||
17566 | @@ -10118,8 +10642,8 @@ | ||
17567 | |||
17568 | *) | ||
17569 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
17570 | - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
17571 | - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
17572 | + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
17573 | + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
17574 | else | ||
17575 | ld_shlibs=no | ||
17576 | fi | ||
17577 | @@ -10249,7 +10773,13 @@ | ||
17578 | allow_undefined_flag='-berok' | ||
17579 | # Determine the default libpath from the value encoded in an | ||
17580 | # empty executable. | ||
17581 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17582 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
17583 | + aix_libpath=$lt_cv_aix_libpath | ||
17584 | +else | ||
17585 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
17586 | + $as_echo_n "(cached) " >&6 | ||
17587 | +else | ||
17588 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17589 | /* end confdefs.h. */ | ||
17590 | |||
17591 | int | ||
17592 | @@ -10262,22 +10792,29 @@ | ||
17593 | _ACEOF | ||
17594 | if ac_fn_c_try_link "$LINENO"; then : | ||
17595 | |||
17596 | -lt_aix_libpath_sed=' | ||
17597 | - /Import File Strings/,/^$/ { | ||
17598 | - /^0/ { | ||
17599 | - s/^0 *\(.*\)$/\1/ | ||
17600 | - p | ||
17601 | - } | ||
17602 | - }' | ||
17603 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17604 | -# Check for a 64-bit object if we didn't find anything. | ||
17605 | -if test -z "$aix_libpath"; then | ||
17606 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17607 | -fi | ||
17608 | + lt_aix_libpath_sed=' | ||
17609 | + /Import File Strings/,/^$/ { | ||
17610 | + /^0/ { | ||
17611 | + s/^0 *\([^ ]*\) *$/\1/ | ||
17612 | + p | ||
17613 | + } | ||
17614 | + }' | ||
17615 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17616 | + # Check for a 64-bit object if we didn't find anything. | ||
17617 | + if test -z "$lt_cv_aix_libpath_"; then | ||
17618 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17619 | + fi | ||
17620 | fi | ||
17621 | rm -f core conftest.err conftest.$ac_objext \ | ||
17622 | conftest$ac_exeext conftest.$ac_ext | ||
17623 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
17624 | + if test -z "$lt_cv_aix_libpath_"; then | ||
17625 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
17626 | + fi | ||
17627 | + | ||
17628 | +fi | ||
17629 | + | ||
17630 | + aix_libpath=$lt_cv_aix_libpath_ | ||
17631 | +fi | ||
17632 | |||
17633 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
17634 | 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" | ||
17635 | @@ -10289,7 +10826,13 @@ | ||
17636 | else | ||
17637 | # Determine the default libpath from the value encoded in an | ||
17638 | # empty executable. | ||
17639 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17640 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
17641 | + aix_libpath=$lt_cv_aix_libpath | ||
17642 | +else | ||
17643 | + if test "${lt_cv_aix_libpath_+set}" = set; then : | ||
17644 | + $as_echo_n "(cached) " >&6 | ||
17645 | +else | ||
17646 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17647 | /* end confdefs.h. */ | ||
17648 | |||
17649 | int | ||
17650 | @@ -10302,22 +10845,29 @@ | ||
17651 | _ACEOF | ||
17652 | if ac_fn_c_try_link "$LINENO"; then : | ||
17653 | |||
17654 | -lt_aix_libpath_sed=' | ||
17655 | - /Import File Strings/,/^$/ { | ||
17656 | - /^0/ { | ||
17657 | - s/^0 *\(.*\)$/\1/ | ||
17658 | - p | ||
17659 | - } | ||
17660 | - }' | ||
17661 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17662 | -# Check for a 64-bit object if we didn't find anything. | ||
17663 | -if test -z "$aix_libpath"; then | ||
17664 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17665 | -fi | ||
17666 | + lt_aix_libpath_sed=' | ||
17667 | + /Import File Strings/,/^$/ { | ||
17668 | + /^0/ { | ||
17669 | + s/^0 *\([^ ]*\) *$/\1/ | ||
17670 | + p | ||
17671 | + } | ||
17672 | + }' | ||
17673 | + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17674 | + # Check for a 64-bit object if we didn't find anything. | ||
17675 | + if test -z "$lt_cv_aix_libpath_"; then | ||
17676 | + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
17677 | + fi | ||
17678 | fi | ||
17679 | rm -f core conftest.err conftest.$ac_objext \ | ||
17680 | conftest$ac_exeext conftest.$ac_ext | ||
17681 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
17682 | + if test -z "$lt_cv_aix_libpath_"; then | ||
17683 | + lt_cv_aix_libpath_="/usr/lib:/lib" | ||
17684 | + fi | ||
17685 | + | ||
17686 | +fi | ||
17687 | + | ||
17688 | + aix_libpath=$lt_cv_aix_libpath_ | ||
17689 | +fi | ||
17690 | |||
17691 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
17692 | # Warning - without using the other run time loading flags, | ||
17693 | @@ -10362,20 +10912,63 @@ | ||
17694 | # Microsoft Visual C++. | ||
17695 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
17696 | # no search path for DLLs. | ||
17697 | - hardcode_libdir_flag_spec=' ' | ||
17698 | - allow_undefined_flag=unsupported | ||
17699 | - # Tell ltmain to make .lib files, not .a files. | ||
17700 | - libext=lib | ||
17701 | - # Tell ltmain to make .dll files, not .so files. | ||
17702 | - shrext_cmds=".dll" | ||
17703 | - # FIXME: Setting linknames here is a bad hack. | ||
17704 | - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
17705 | - # The linker will automatically build a .lib file if we build a DLL. | ||
17706 | - old_archive_from_new_cmds='true' | ||
17707 | - # FIXME: Should let the user specify the lib program. | ||
17708 | - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
17709 | - fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
17710 | - enable_shared_with_static_runtimes=yes | ||
17711 | + case $cc_basename in | ||
17712 | + cl*) | ||
17713 | + # Native MSVC | ||
17714 | + hardcode_libdir_flag_spec=' ' | ||
17715 | + allow_undefined_flag=unsupported | ||
17716 | + always_export_symbols=yes | ||
17717 | + file_list_spec='@' | ||
17718 | + # Tell ltmain to make .lib files, not .a files. | ||
17719 | + libext=lib | ||
17720 | + # Tell ltmain to make .dll files, not .so files. | ||
17721 | + shrext_cmds=".dll" | ||
17722 | + # FIXME: Setting linknames here is a bad hack. | ||
17723 | + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
17724 | + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
17725 | + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
17726 | + else | ||
17727 | + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
17728 | + fi~ | ||
17729 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
17730 | + linknames=' | ||
17731 | + # The linker will not automatically build a static lib if we build a DLL. | ||
17732 | + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' | ||
17733 | + enable_shared_with_static_runtimes=yes | ||
17734 | + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' | ||
17735 | + # Don't use ranlib | ||
17736 | + old_postinstall_cmds='chmod 644 $oldlib' | ||
17737 | + postlink_cmds='lt_outputfile="@OUTPUT@"~ | ||
17738 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
17739 | + case $lt_outputfile in | ||
17740 | + *.exe|*.EXE) ;; | ||
17741 | + *) | ||
17742 | + lt_outputfile="$lt_outputfile.exe" | ||
17743 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
17744 | + ;; | ||
17745 | + esac~ | ||
17746 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
17747 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
17748 | + $RM "$lt_outputfile.manifest"; | ||
17749 | + fi' | ||
17750 | + ;; | ||
17751 | + *) | ||
17752 | + # Assume MSVC wrapper | ||
17753 | + hardcode_libdir_flag_spec=' ' | ||
17754 | + allow_undefined_flag=unsupported | ||
17755 | + # Tell ltmain to make .lib files, not .a files. | ||
17756 | + libext=lib | ||
17757 | + # Tell ltmain to make .dll files, not .so files. | ||
17758 | + shrext_cmds=".dll" | ||
17759 | + # FIXME: Setting linknames here is a bad hack. | ||
17760 | + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
17761 | + # The linker will automatically build a .lib file if we build a DLL. | ||
17762 | + old_archive_from_new_cmds='true' | ||
17763 | + # FIXME: Should let the user specify the lib program. | ||
17764 | + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
17765 | + enable_shared_with_static_runtimes=yes | ||
17766 | + ;; | ||
17767 | + esac | ||
17768 | ;; | ||
17769 | |||
17770 | darwin* | rhapsody*) | ||
17771 | @@ -10436,7 +11029,7 @@ | ||
17772 | |||
17773 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
17774 | freebsd* | dragonfly*) | ||
17775 | - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
17776 | + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
17777 | hardcode_libdir_flag_spec='-R$libdir' | ||
17778 | hardcode_direct=yes | ||
17779 | hardcode_shlibpath_var=no | ||
17780 | @@ -10444,7 +11037,7 @@ | ||
17781 | |||
17782 | hpux9*) | ||
17783 | if test "$GCC" = yes; then | ||
17784 | - 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' | ||
17785 | + 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' | ||
17786 | else | ||
17787 | 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' | ||
17788 | fi | ||
17789 | @@ -10460,7 +11053,7 @@ | ||
17790 | |||
17791 | hpux10*) | ||
17792 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
17793 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
17794 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
17795 | else | ||
17796 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
17797 | fi | ||
17798 | @@ -10484,10 +11077,10 @@ | ||
17799 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17800 | ;; | ||
17801 | ia64*) | ||
17802 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
17803 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
17804 | ;; | ||
17805 | *) | ||
17806 | - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
17807 | + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
17808 | ;; | ||
17809 | esac | ||
17810 | else | ||
17811 | @@ -10566,23 +11159,36 @@ | ||
17812 | |||
17813 | irix5* | irix6* | nonstopux*) | ||
17814 | if test "$GCC" = yes; then | ||
17815 | - 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' | ||
17816 | + 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' | ||
17817 | # Try to use the -exported_symbol ld option, if it does not | ||
17818 | # work, assume that -exports_file does not work either and | ||
17819 | # implicitly export all symbols. | ||
17820 | - save_LDFLAGS="$LDFLAGS" | ||
17821 | - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
17822 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17823 | + # This should be the same for all languages, so no per-tag cache variable. | ||
17824 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 | ||
17825 | +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } | ||
17826 | +if test "${lt_cv_irix_exported_symbol+set}" = set; then : | ||
17827 | + $as_echo_n "(cached) " >&6 | ||
17828 | +else | ||
17829 | + save_LDFLAGS="$LDFLAGS" | ||
17830 | + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
17831 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
17832 | /* end confdefs.h. */ | ||
17833 | -int foo(void) {} | ||
17834 | +int foo (void) { return 0; } | ||
17835 | _ACEOF | ||
17836 | if ac_fn_c_try_link "$LINENO"; then : | ||
17837 | - 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' | ||
17838 | - | ||
17839 | + lt_cv_irix_exported_symbol=yes | ||
17840 | +else | ||
17841 | + lt_cv_irix_exported_symbol=no | ||
17842 | fi | ||
17843 | rm -f core conftest.err conftest.$ac_objext \ | ||
17844 | conftest$ac_exeext conftest.$ac_ext | ||
17845 | - LDFLAGS="$save_LDFLAGS" | ||
17846 | + LDFLAGS="$save_LDFLAGS" | ||
17847 | +fi | ||
17848 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 | ||
17849 | +$as_echo "$lt_cv_irix_exported_symbol" >&6; } | ||
17850 | + if test "$lt_cv_irix_exported_symbol" = yes; then | ||
17851 | + 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' | ||
17852 | + fi | ||
17853 | else | ||
17854 | 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' | ||
17855 | 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' | ||
17856 | @@ -10667,7 +11273,7 @@ | ||
17857 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
17858 | if test "$GCC" = yes; then | ||
17859 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
17860 | - 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' | ||
17861 | + 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' | ||
17862 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
17863 | else | ||
17864 | allow_undefined_flag=' -expect_unresolved \*' | ||
17865 | @@ -10686,9 +11292,9 @@ | ||
17866 | no_undefined_flag=' -z defs' | ||
17867 | if test "$GCC" = yes; then | ||
17868 | wlarc='${wl}' | ||
17869 | - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17870 | + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17871 | archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
17872 | - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
17873 | + $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' | ||
17874 | else | ||
17875 | case `$CC -V 2>&1` in | ||
17876 | *"Compilers 5.0"*) | ||
17877 | @@ -11264,8 +11870,9 @@ | ||
17878 | need_version=no | ||
17879 | need_lib_prefix=no | ||
17880 | |||
17881 | - case $GCC,$host_os in | ||
17882 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
17883 | + case $GCC,$cc_basename in | ||
17884 | + yes,*) | ||
17885 | + # gcc | ||
17886 | library_names_spec='$libname.dll.a' | ||
17887 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
17888 | postinstall_cmds='base_file=`basename \${file}`~ | ||
17889 | @@ -11298,13 +11905,71 @@ | ||
17890 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
17891 | ;; | ||
17892 | esac | ||
17893 | + dynamic_linker='Win32 ld.exe' | ||
17894 | + ;; | ||
17895 | + | ||
17896 | + *,cl*) | ||
17897 | + # Native MSVC | ||
17898 | + libname_spec='$name' | ||
17899 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
17900 | + library_names_spec='${libname}.dll.lib' | ||
17901 | + | ||
17902 | + case $build_os in | ||
17903 | + mingw*) | ||
17904 | + sys_lib_search_path_spec= | ||
17905 | + lt_save_ifs=$IFS | ||
17906 | + IFS=';' | ||
17907 | + for lt_path in $LIB | ||
17908 | + do | ||
17909 | + IFS=$lt_save_ifs | ||
17910 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
17911 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
17912 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
17913 | + done | ||
17914 | + IFS=$lt_save_ifs | ||
17915 | + # Convert to MSYS style. | ||
17916 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
17917 | + ;; | ||
17918 | + cygwin*) | ||
17919 | + # Convert to unix form, then to dos form, then back to unix form | ||
17920 | + # but this time dos style (no spaces!) so that the unix form looks | ||
17921 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
17922 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
17923 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
17924 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
17925 | + ;; | ||
17926 | + *) | ||
17927 | + sys_lib_search_path_spec="$LIB" | ||
17928 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
17929 | + # It is most probably a Windows format PATH. | ||
17930 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
17931 | + else | ||
17932 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
17933 | + fi | ||
17934 | + # FIXME: find the short name or the path components, as spaces are | ||
17935 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
17936 | + ;; | ||
17937 | + esac | ||
17938 | + | ||
17939 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
17940 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
17941 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
17942 | + dldir=$destdir/`dirname \$dlpath`~ | ||
17943 | + test -d \$dldir || mkdir -p \$dldir~ | ||
17944 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
17945 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
17946 | + dlpath=$dir/\$dldll~ | ||
17947 | + $RM \$dlpath' | ||
17948 | + shlibpath_overrides_runpath=yes | ||
17949 | + dynamic_linker='Win32 link.exe' | ||
17950 | ;; | ||
17951 | |||
17952 | *) | ||
17953 | + # Assume MSVC wrapper | ||
17954 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
17955 | + dynamic_linker='Win32 ld.exe' | ||
17956 | ;; | ||
17957 | esac | ||
17958 | - dynamic_linker='Win32 ld.exe' | ||
17959 | # FIXME: first we should search . and the directory the executable is in | ||
17960 | shlibpath_var=PATH | ||
17961 | ;; | ||
17962 | @@ -11396,7 +12061,7 @@ | ||
17963 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17964 | shlibpath_var=LIBRARY_PATH | ||
17965 | shlibpath_overrides_runpath=yes | ||
17966 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
17967 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
17968 | hardcode_into_libs=yes | ||
17969 | ;; | ||
17970 | |||
17971 | @@ -12192,7 +12857,7 @@ | ||
17972 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
17973 | lt_status=$lt_dlunknown | ||
17974 | cat > conftest.$ac_ext <<_LT_EOF | ||
17975 | -#line 12195 "configure" | ||
17976 | +#line $LINENO "configure" | ||
17977 | #include "confdefs.h" | ||
17978 | |||
17979 | #if HAVE_DLFCN_H | ||
17980 | @@ -12236,10 +12901,10 @@ | ||
17981 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
17982 | correspondingly for the symbols needed. */ | ||
17983 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
17984 | -void fnord () __attribute__((visibility("default"))); | ||
17985 | +int fnord () __attribute__((visibility("default"))); | ||
17986 | #endif | ||
17987 | |||
17988 | -void fnord () { int i=42; } | ||
17989 | +int fnord () { return 42; } | ||
17990 | int main () | ||
17991 | { | ||
17992 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
17993 | @@ -12298,7 +12963,7 @@ | ||
17994 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
17995 | lt_status=$lt_dlunknown | ||
17996 | cat > conftest.$ac_ext <<_LT_EOF | ||
17997 | -#line 12301 "configure" | ||
17998 | +#line $LINENO "configure" | ||
17999 | #include "confdefs.h" | ||
18000 | |||
18001 | #if HAVE_DLFCN_H | ||
18002 | @@ -12342,10 +13007,10 @@ | ||
18003 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
18004 | correspondingly for the symbols needed. */ | ||
18005 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
18006 | -void fnord () __attribute__((visibility("default"))); | ||
18007 | +int fnord () __attribute__((visibility("default"))); | ||
18008 | #endif | ||
18009 | |||
18010 | -void fnord () { int i=42; } | ||
18011 | +int fnord () { return 42; } | ||
18012 | int main () | ||
18013 | { | ||
18014 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
18015 | @@ -12737,6 +13402,7 @@ | ||
18016 | |||
18017 | # Allow CC to be a program name with arguments. | ||
18018 | lt_save_CC=$CC | ||
18019 | + lt_save_CFLAGS=$CFLAGS | ||
18020 | lt_save_LD=$LD | ||
18021 | lt_save_GCC=$GCC | ||
18022 | GCC=$GXX | ||
18023 | @@ -12754,6 +13420,7 @@ | ||
18024 | fi | ||
18025 | test -z "${LDCXX+set}" || LD=$LDCXX | ||
18026 | CC=${CXX-"c++"} | ||
18027 | + CFLAGS=$CXXFLAGS | ||
18028 | compiler=$CC | ||
18029 | compiler_CXX=$CC | ||
18030 | for cc_temp in $compiler""; do | ||
18031 | @@ -12893,8 +13560,8 @@ | ||
18032 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | ||
18033 | # archiving commands below assume that GNU ld is being used. | ||
18034 | if test "$with_gnu_ld" = yes; then | ||
18035 | - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
18036 | - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
18037 | + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
18038 | + archive_expsym_cmds_CXX='$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' | ||
18039 | |||
18040 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | ||
18041 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | ||
18042 | @@ -13036,7 +13703,13 @@ | ||
18043 | allow_undefined_flag_CXX='-berok' | ||
18044 | # Determine the default libpath from the value encoded in an empty | ||
18045 | # executable. | ||
18046 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
18047 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
18048 | + aix_libpath=$lt_cv_aix_libpath | ||
18049 | +else | ||
18050 | + if test "${lt_cv_aix_libpath__CXX+set}" = set; then : | ||
18051 | + $as_echo_n "(cached) " >&6 | ||
18052 | +else | ||
18053 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
18054 | /* end confdefs.h. */ | ||
18055 | |||
18056 | int | ||
18057 | @@ -13049,22 +13722,29 @@ | ||
18058 | _ACEOF | ||
18059 | if ac_fn_cxx_try_link "$LINENO"; then : | ||
18060 | |||
18061 | -lt_aix_libpath_sed=' | ||
18062 | - /Import File Strings/,/^$/ { | ||
18063 | - /^0/ { | ||
18064 | - s/^0 *\(.*\)$/\1/ | ||
18065 | - p | ||
18066 | - } | ||
18067 | - }' | ||
18068 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18069 | -# Check for a 64-bit object if we didn't find anything. | ||
18070 | -if test -z "$aix_libpath"; then | ||
18071 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18072 | -fi | ||
18073 | + lt_aix_libpath_sed=' | ||
18074 | + /Import File Strings/,/^$/ { | ||
18075 | + /^0/ { | ||
18076 | + s/^0 *\([^ ]*\) *$/\1/ | ||
18077 | + p | ||
18078 | + } | ||
18079 | + }' | ||
18080 | + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18081 | + # Check for a 64-bit object if we didn't find anything. | ||
18082 | + if test -z "$lt_cv_aix_libpath__CXX"; then | ||
18083 | + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18084 | + fi | ||
18085 | fi | ||
18086 | rm -f core conftest.err conftest.$ac_objext \ | ||
18087 | conftest$ac_exeext conftest.$ac_ext | ||
18088 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
18089 | + if test -z "$lt_cv_aix_libpath__CXX"; then | ||
18090 | + lt_cv_aix_libpath__CXX="/usr/lib:/lib" | ||
18091 | + fi | ||
18092 | + | ||
18093 | +fi | ||
18094 | + | ||
18095 | + aix_libpath=$lt_cv_aix_libpath__CXX | ||
18096 | +fi | ||
18097 | |||
18098 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
18099 | |||
18100 | @@ -13077,7 +13757,13 @@ | ||
18101 | else | ||
18102 | # Determine the default libpath from the value encoded in an | ||
18103 | # empty executable. | ||
18104 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
18105 | + if test "${lt_cv_aix_libpath+set}" = set; then | ||
18106 | + aix_libpath=$lt_cv_aix_libpath | ||
18107 | +else | ||
18108 | + if test "${lt_cv_aix_libpath__CXX+set}" = set; then : | ||
18109 | + $as_echo_n "(cached) " >&6 | ||
18110 | +else | ||
18111 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
18112 | /* end confdefs.h. */ | ||
18113 | |||
18114 | int | ||
18115 | @@ -13090,22 +13776,29 @@ | ||
18116 | _ACEOF | ||
18117 | if ac_fn_cxx_try_link "$LINENO"; then : | ||
18118 | |||
18119 | -lt_aix_libpath_sed=' | ||
18120 | - /Import File Strings/,/^$/ { | ||
18121 | - /^0/ { | ||
18122 | - s/^0 *\(.*\)$/\1/ | ||
18123 | - p | ||
18124 | - } | ||
18125 | - }' | ||
18126 | -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18127 | -# Check for a 64-bit object if we didn't find anything. | ||
18128 | -if test -z "$aix_libpath"; then | ||
18129 | - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18130 | -fi | ||
18131 | + lt_aix_libpath_sed=' | ||
18132 | + /Import File Strings/,/^$/ { | ||
18133 | + /^0/ { | ||
18134 | + s/^0 *\([^ ]*\) *$/\1/ | ||
18135 | + p | ||
18136 | + } | ||
18137 | + }' | ||
18138 | + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18139 | + # Check for a 64-bit object if we didn't find anything. | ||
18140 | + if test -z "$lt_cv_aix_libpath__CXX"; then | ||
18141 | + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
18142 | + fi | ||
18143 | fi | ||
18144 | rm -f core conftest.err conftest.$ac_objext \ | ||
18145 | conftest$ac_exeext conftest.$ac_ext | ||
18146 | -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
18147 | + if test -z "$lt_cv_aix_libpath__CXX"; then | ||
18148 | + lt_cv_aix_libpath__CXX="/usr/lib:/lib" | ||
18149 | + fi | ||
18150 | + | ||
18151 | +fi | ||
18152 | + | ||
18153 | + aix_libpath=$lt_cv_aix_libpath__CXX | ||
18154 | +fi | ||
18155 | |||
18156 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
18157 | # Warning - without using the other run time loading flags, | ||
18158 | @@ -13148,29 +13841,75 @@ | ||
18159 | ;; | ||
18160 | |||
18161 | cygwin* | mingw* | pw32* | cegcc*) | ||
18162 | - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, | ||
18163 | - # as there is no search path for DLLs. | ||
18164 | - hardcode_libdir_flag_spec_CXX='-L$libdir' | ||
18165 | - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' | ||
18166 | - allow_undefined_flag_CXX=unsupported | ||
18167 | - always_export_symbols_CXX=no | ||
18168 | - enable_shared_with_static_runtimes_CXX=yes | ||
18169 | - | ||
18170 | - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
18171 | - archive_cmds_CXX='$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' | ||
18172 | - # If the export-symbols file already is a .def file (1st line | ||
18173 | - # is EXPORTS), use it as is; otherwise, prepend... | ||
18174 | - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
18175 | - cp $export_symbols $output_objdir/$soname.def; | ||
18176 | - else | ||
18177 | - echo EXPORTS > $output_objdir/$soname.def; | ||
18178 | - cat $export_symbols >> $output_objdir/$soname.def; | ||
18179 | - fi~ | ||
18180 | - $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' | ||
18181 | - else | ||
18182 | - ld_shlibs_CXX=no | ||
18183 | - fi | ||
18184 | - ;; | ||
18185 | + case $GXX,$cc_basename in | ||
18186 | + ,cl* | no,cl*) | ||
18187 | + # Native MSVC | ||
18188 | + # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
18189 | + # no search path for DLLs. | ||
18190 | + hardcode_libdir_flag_spec_CXX=' ' | ||
18191 | + allow_undefined_flag_CXX=unsupported | ||
18192 | + always_export_symbols_CXX=yes | ||
18193 | + file_list_spec_CXX='@' | ||
18194 | + # Tell ltmain to make .lib files, not .a files. | ||
18195 | + libext=lib | ||
18196 | + # Tell ltmain to make .dll files, not .so files. | ||
18197 | + shrext_cmds=".dll" | ||
18198 | + # FIXME: Setting linknames here is a bad hack. | ||
18199 | + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
18200 | + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
18201 | + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
18202 | + else | ||
18203 | + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
18204 | + fi~ | ||
18205 | + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
18206 | + linknames=' | ||
18207 | + # The linker will not automatically build a static lib if we build a DLL. | ||
18208 | + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' | ||
18209 | + enable_shared_with_static_runtimes_CXX=yes | ||
18210 | + # Don't use ranlib | ||
18211 | + old_postinstall_cmds_CXX='chmod 644 $oldlib' | ||
18212 | + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ | ||
18213 | + lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
18214 | + case $lt_outputfile in | ||
18215 | + *.exe|*.EXE) ;; | ||
18216 | + *) | ||
18217 | + lt_outputfile="$lt_outputfile.exe" | ||
18218 | + lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
18219 | + ;; | ||
18220 | + esac~ | ||
18221 | + func_to_tool_file "$lt_outputfile"~ | ||
18222 | + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
18223 | + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
18224 | + $RM "$lt_outputfile.manifest"; | ||
18225 | + fi' | ||
18226 | + ;; | ||
18227 | + *) | ||
18228 | + # g++ | ||
18229 | + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, | ||
18230 | + # as there is no search path for DLLs. | ||
18231 | + hardcode_libdir_flag_spec_CXX='-L$libdir' | ||
18232 | + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' | ||
18233 | + allow_undefined_flag_CXX=unsupported | ||
18234 | + always_export_symbols_CXX=no | ||
18235 | + enable_shared_with_static_runtimes_CXX=yes | ||
18236 | + | ||
18237 | + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
18238 | + archive_cmds_CXX='$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' | ||
18239 | + # If the export-symbols file already is a .def file (1st line | ||
18240 | + # is EXPORTS), use it as is; otherwise, prepend... | ||
18241 | + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
18242 | + cp $export_symbols $output_objdir/$soname.def; | ||
18243 | + else | ||
18244 | + echo EXPORTS > $output_objdir/$soname.def; | ||
18245 | + cat $export_symbols >> $output_objdir/$soname.def; | ||
18246 | + fi~ | ||
18247 | + $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' | ||
18248 | + else | ||
18249 | + ld_shlibs_CXX=no | ||
18250 | + fi | ||
18251 | + ;; | ||
18252 | + esac | ||
18253 | + ;; | ||
18254 | darwin* | rhapsody*) | ||
18255 | |||
18256 | |||
18257 | @@ -13276,7 +14015,7 @@ | ||
18258 | ;; | ||
18259 | *) | ||
18260 | if test "$GXX" = yes; then | ||
18261 | - archive_cmds_CXX='$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' | ||
18262 | + archive_cmds_CXX='$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' | ||
18263 | else | ||
18264 | # FIXME: insert proper C++ library support | ||
18265 | ld_shlibs_CXX=no | ||
18266 | @@ -13347,10 +14086,10 @@ | ||
18267 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
18268 | ;; | ||
18269 | ia64*) | ||
18270 | - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
18271 | + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
18272 | ;; | ||
18273 | *) | ||
18274 | - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
18275 | + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
18276 | ;; | ||
18277 | esac | ||
18278 | fi | ||
18279 | @@ -13391,9 +14130,9 @@ | ||
18280 | *) | ||
18281 | if test "$GXX" = yes; then | ||
18282 | if test "$with_gnu_ld" = no; then | ||
18283 | - archive_cmds_CXX='$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' | ||
18284 | + archive_cmds_CXX='$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' | ||
18285 | else | ||
18286 | - archive_cmds_CXX='$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' | ||
18287 | + archive_cmds_CXX='$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' | ||
18288 | fi | ||
18289 | fi | ||
18290 | link_all_deplibs_CXX=yes | ||
18291 | @@ -13463,20 +14202,20 @@ | ||
18292 | prelink_cmds_CXX='tpldir=Template.dir~ | ||
18293 | rm -rf $tpldir~ | ||
18294 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | ||
18295 | - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' | ||
18296 | + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' | ||
18297 | old_archive_cmds_CXX='tpldir=Template.dir~ | ||
18298 | rm -rf $tpldir~ | ||
18299 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | ||
18300 | - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ | ||
18301 | + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ | ||
18302 | $RANLIB $oldlib' | ||
18303 | archive_cmds_CXX='tpldir=Template.dir~ | ||
18304 | rm -rf $tpldir~ | ||
18305 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | ||
18306 | - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | ||
18307 | + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | ||
18308 | archive_expsym_cmds_CXX='tpldir=Template.dir~ | ||
18309 | rm -rf $tpldir~ | ||
18310 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | ||
18311 | - $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' | ||
18312 | + $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' | ||
18313 | ;; | ||
18314 | *) # Version 6 and above use weak symbols | ||
18315 | archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | ||
18316 | @@ -13671,7 +14410,7 @@ | ||
18317 | archive_cmds_CXX='$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' | ||
18318 | ;; | ||
18319 | *) | ||
18320 | - archive_cmds_CXX='$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' | ||
18321 | + archive_cmds_CXX='$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' | ||
18322 | ;; | ||
18323 | esac | ||
18324 | |||
18325 | @@ -13717,7 +14456,7 @@ | ||
18326 | |||
18327 | solaris*) | ||
18328 | case $cc_basename in | ||
18329 | - CC*) | ||
18330 | + CC* | sunCC*) | ||
18331 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
18332 | archive_cmds_need_lc_CXX=yes | ||
18333 | no_undefined_flag_CXX=' -zdefs' | ||
18334 | @@ -13758,9 +14497,9 @@ | ||
18335 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
18336 | no_undefined_flag_CXX=' ${wl}-z ${wl}defs' | ||
18337 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then | ||
18338 | - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
18339 | + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
18340 | archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
18341 | - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
18342 | + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
18343 | |||
18344 | # Commands to make compiler produce verbose output that lists | ||
18345 | # what "hidden" libraries, object files and flags are used when | ||
18346 | @@ -13895,6 +14634,13 @@ | ||
18347 | }; | ||
18348 | _LT_EOF | ||
18349 | |||
18350 | + | ||
18351 | +_lt_libdeps_save_CFLAGS=$CFLAGS | ||
18352 | +case "$CC $CFLAGS " in #( | ||
18353 | +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; | ||
18354 | +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; | ||
18355 | +esac | ||
18356 | + | ||
18357 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | ||
18358 | (eval $ac_compile) 2>&5 | ||
18359 | ac_status=$? | ||
18360 | @@ -13908,7 +14654,7 @@ | ||
18361 | pre_test_object_deps_done=no | ||
18362 | |||
18363 | for p in `eval "$output_verbose_link_cmd"`; do | ||
18364 | - case $p in | ||
18365 | + case ${prev}${p} in | ||
18366 | |||
18367 | -L* | -R* | -l*) | ||
18368 | # Some compilers place space between "-{L,R}" and the path. | ||
18369 | @@ -13917,13 +14663,22 @@ | ||
18370 | test $p = "-R"; then | ||
18371 | prev=$p | ||
18372 | continue | ||
18373 | - else | ||
18374 | - prev= | ||
18375 | fi | ||
18376 | |||
18377 | + # Expand the sysroot to ease extracting the directories later. | ||
18378 | + if test -z "$prev"; then | ||
18379 | + case $p in | ||
18380 | + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; | ||
18381 | + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; | ||
18382 | + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; | ||
18383 | + esac | ||
18384 | + fi | ||
18385 | + case $p in | ||
18386 | + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; | ||
18387 | + esac | ||
18388 | if test "$pre_test_object_deps_done" = no; then | ||
18389 | - case $p in | ||
18390 | - -L* | -R*) | ||
18391 | + case ${prev} in | ||
18392 | + -L | -R) | ||
18393 | # Internal compiler library paths should come after those | ||
18394 | # provided the user. The postdeps already come after the | ||
18395 | # user supplied libs so there is no need to process them. | ||
18396 | @@ -13943,8 +14698,10 @@ | ||
18397 | postdeps_CXX="${postdeps_CXX} ${prev}${p}" | ||
18398 | fi | ||
18399 | fi | ||
18400 | + prev= | ||
18401 | ;; | ||
18402 | |||
18403 | + *.lto.$objext) ;; # Ignore GCC LTO objects | ||
18404 | *.$objext) | ||
18405 | # This assumes that the test object file only shows up | ||
18406 | # once in the compiler output. | ||
18407 | @@ -13980,6 +14737,7 @@ | ||
18408 | fi | ||
18409 | |||
18410 | $RM -f confest.$objext | ||
18411 | +CFLAGS=$_lt_libdeps_save_CFLAGS | ||
18412 | |||
18413 | # PORTME: override above test on systems where it is broken | ||
18414 | case $host_os in | ||
18415 | @@ -14015,7 +14773,7 @@ | ||
18416 | |||
18417 | solaris*) | ||
18418 | case $cc_basename in | ||
18419 | - CC*) | ||
18420 | + CC* | sunCC*) | ||
18421 | # The more standards-conforming stlport4 library is | ||
18422 | # incompatible with the Cstd library. Avoid specifying | ||
18423 | # it if it's in CXXFLAGS. Ignore libCrun as | ||
18424 | @@ -14080,8 +14838,6 @@ | ||
18425 | lt_prog_compiler_pic_CXX= | ||
18426 | lt_prog_compiler_static_CXX= | ||
18427 | |||
18428 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
18429 | -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
18430 | |||
18431 | # C++ specific cases for pic, static, wl, etc. | ||
18432 | if test "$GXX" = yes; then | ||
18433 | @@ -14186,6 +14942,11 @@ | ||
18434 | ;; | ||
18435 | esac | ||
18436 | ;; | ||
18437 | + mingw* | cygwin* | os2* | pw32* | cegcc*) | ||
18438 | + # This hack is so that the source file can tell whether it is being | ||
18439 | + # built for inclusion in a dll (and should export symbols for example). | ||
18440 | + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' | ||
18441 | + ;; | ||
18442 | dgux*) | ||
18443 | case $cc_basename in | ||
18444 | ec++*) | ||
18445 | @@ -14338,7 +15099,7 @@ | ||
18446 | ;; | ||
18447 | solaris*) | ||
18448 | case $cc_basename in | ||
18449 | - CC*) | ||
18450 | + CC* | sunCC*) | ||
18451 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
18452 | lt_prog_compiler_pic_CXX='-KPIC' | ||
18453 | lt_prog_compiler_static_CXX='-Bstatic' | ||
18454 | @@ -14403,10 +15164,17 @@ | ||
18455 | lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" | ||
18456 | ;; | ||
18457 | esac | ||
18458 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 | ||
18459 | -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } | ||
18460 | - | ||
18461 | |||
18462 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 | ||
18463 | +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } | ||
18464 | +if test "${lt_cv_prog_compiler_pic_CXX+set}" = set; then : | ||
18465 | + $as_echo_n "(cached) " >&6 | ||
18466 | +else | ||
18467 | + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX | ||
18468 | +fi | ||
18469 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 | ||
18470 | +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } | ||
18471 | +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX | ||
18472 | |||
18473 | # | ||
18474 | # Check to make sure the PIC flag actually works. | ||
18475 | @@ -14464,6 +15232,8 @@ | ||
18476 | |||
18477 | |||
18478 | |||
18479 | + | ||
18480 | + | ||
18481 | # | ||
18482 | # Check to make sure the static flag actually works. | ||
18483 | # | ||
18484 | @@ -14641,6 +15411,7 @@ | ||
18485 | $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } | ||
18486 | |||
18487 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
18488 | + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' | ||
18489 | case $host_os in | ||
18490 | aix[4-9]*) | ||
18491 | # If we're using GNU nm, then we don't want the "-C" option. | ||
18492 | @@ -14655,15 +15426,20 @@ | ||
18493 | ;; | ||
18494 | pw32*) | ||
18495 | export_symbols_cmds_CXX="$ltdll_cmds" | ||
18496 | - ;; | ||
18497 | + ;; | ||
18498 | cygwin* | mingw* | cegcc*) | ||
18499 | - export_symbols_cmds_CXX='$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' | ||
18500 | - ;; | ||
18501 | + case $cc_basename in | ||
18502 | + cl*) ;; | ||
18503 | + *) | ||
18504 | + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' | ||
18505 | + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' | ||
18506 | + ;; | ||
18507 | + esac | ||
18508 | + ;; | ||
18509 | *) | ||
18510 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
18511 | - ;; | ||
18512 | + ;; | ||
18513 | esac | ||
18514 | - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' | ||
18515 | |||
18516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 | ||
18517 | $as_echo "$ld_shlibs_CXX" >&6; } | ||
18518 | @@ -14926,8 +15702,9 @@ | ||
18519 | need_version=no | ||
18520 | need_lib_prefix=no | ||
18521 | |||
18522 | - case $GCC,$host_os in | ||
18523 | - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | ||
18524 | + case $GCC,$cc_basename in | ||
18525 | + yes,*) | ||
18526 | + # gcc | ||
18527 | library_names_spec='$libname.dll.a' | ||
18528 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
18529 | postinstall_cmds='base_file=`basename \${file}`~ | ||
18530 | @@ -14959,13 +15736,71 @@ | ||
18531 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
18532 | ;; | ||
18533 | esac | ||
18534 | + dynamic_linker='Win32 ld.exe' | ||
18535 | + ;; | ||
18536 | + | ||
18537 | + *,cl*) | ||
18538 | + # Native MSVC | ||
18539 | + libname_spec='$name' | ||
18540 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
18541 | + library_names_spec='${libname}.dll.lib' | ||
18542 | + | ||
18543 | + case $build_os in | ||
18544 | + mingw*) | ||
18545 | + sys_lib_search_path_spec= | ||
18546 | + lt_save_ifs=$IFS | ||
18547 | + IFS=';' | ||
18548 | + for lt_path in $LIB | ||
18549 | + do | ||
18550 | + IFS=$lt_save_ifs | ||
18551 | + # Let DOS variable expansion print the short 8.3 style file name. | ||
18552 | + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
18553 | + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
18554 | + done | ||
18555 | + IFS=$lt_save_ifs | ||
18556 | + # Convert to MSYS style. | ||
18557 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` | ||
18558 | + ;; | ||
18559 | + cygwin*) | ||
18560 | + # Convert to unix form, then to dos form, then back to unix form | ||
18561 | + # but this time dos style (no spaces!) so that the unix form looks | ||
18562 | + # like /cygdrive/c/PROGRA~1:/cygdr... | ||
18563 | + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
18564 | + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
18565 | + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
18566 | + ;; | ||
18567 | + *) | ||
18568 | + sys_lib_search_path_spec="$LIB" | ||
18569 | + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then | ||
18570 | + # It is most probably a Windows format PATH. | ||
18571 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
18572 | + else | ||
18573 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
18574 | + fi | ||
18575 | + # FIXME: find the short name or the path components, as spaces are | ||
18576 | + # common. (e.g. "Program Files" -> "PROGRA~1") | ||
18577 | + ;; | ||
18578 | + esac | ||
18579 | + | ||
18580 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
18581 | + postinstall_cmds='base_file=`basename \${file}`~ | ||
18582 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
18583 | + dldir=$destdir/`dirname \$dlpath`~ | ||
18584 | + test -d \$dldir || mkdir -p \$dldir~ | ||
18585 | + $install_prog $dir/$dlname \$dldir/$dlname' | ||
18586 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
18587 | + dlpath=$dir/\$dldll~ | ||
18588 | + $RM \$dlpath' | ||
18589 | + shlibpath_overrides_runpath=yes | ||
18590 | + dynamic_linker='Win32 link.exe' | ||
18591 | ;; | ||
18592 | |||
18593 | *) | ||
18594 | + # Assume MSVC wrapper | ||
18595 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
18596 | + dynamic_linker='Win32 ld.exe' | ||
18597 | ;; | ||
18598 | esac | ||
18599 | - dynamic_linker='Win32 ld.exe' | ||
18600 | # FIXME: first we should search . and the directory the executable is in | ||
18601 | shlibpath_var=PATH | ||
18602 | ;; | ||
18603 | @@ -15056,7 +15891,7 @@ | ||
18604 | soname_spec='${libname}${release}${shared_ext}$major' | ||
18605 | shlibpath_var=LIBRARY_PATH | ||
18606 | shlibpath_overrides_runpath=yes | ||
18607 | - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' | ||
18608 | + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
18609 | hardcode_into_libs=yes | ||
18610 | ;; | ||
18611 | |||
18612 | @@ -15515,6 +16350,7 @@ | ||
18613 | fi # test -n "$compiler" | ||
18614 | |||
18615 | CC=$lt_save_CC | ||
18616 | + CFLAGS=$lt_save_CFLAGS | ||
18617 | LDCXX=$LD | ||
18618 | LD=$lt_save_LD | ||
18619 | GCC=$lt_save_GCC | ||
18620 | @@ -17754,13 +18590,20 @@ | ||
18621 | lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' | ||
18622 | lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' | ||
18623 | lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' | ||
18624 | +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
18625 | +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' | ||
18626 | reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' | ||
18627 | reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' | ||
18628 | OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' | ||
18629 | deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' | ||
18630 | file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' | ||
18631 | +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' | ||
18632 | +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' | ||
18633 | +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' | ||
18634 | +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' | ||
18635 | AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' | ||
18636 | AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' | ||
18637 | +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' | ||
18638 | STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' | ||
18639 | RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' | ||
18640 | old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' | ||
18641 | @@ -17775,14 +18618,17 @@ | ||
18642 | lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' | ||
18643 | lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' | ||
18644 | 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"`' | ||
18645 | +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
18646 | +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' | ||
18647 | objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' | ||
18648 | MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' | ||
18649 | lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' | ||
18650 | -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
18651 | lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' | ||
18652 | +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' | ||
18653 | lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' | ||
18654 | lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' | ||
18655 | need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' | ||
18656 | +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' | ||
18657 | DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' | ||
18658 | NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' | ||
18659 | LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' | ||
18660 | @@ -17815,12 +18661,12 @@ | ||
18661 | hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' | ||
18662 | inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' | ||
18663 | link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' | ||
18664 | -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' | ||
18665 | always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' | ||
18666 | export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' | ||
18667 | exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' | ||
18668 | include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' | ||
18669 | prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' | ||
18670 | +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' | ||
18671 | file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' | ||
18672 | variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' | ||
18673 | need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' | ||
18674 | @@ -17859,8 +18705,8 @@ | ||
18675 | compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' | ||
18676 | GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' | ||
18677 | lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' | ||
18678 | -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' | ||
18679 | lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' | ||
18680 | +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' | ||
18681 | lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' | ||
18682 | lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' | ||
18683 | archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' | ||
18684 | @@ -17887,12 +18733,12 @@ | ||
18685 | hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' | ||
18686 | inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' | ||
18687 | link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' | ||
18688 | -fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`' | ||
18689 | always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' | ||
18690 | export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' | ||
18691 | exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' | ||
18692 | include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' | ||
18693 | prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' | ||
18694 | +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' | ||
18695 | file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' | ||
18696 | hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' | ||
18697 | compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' | ||
18698 | @@ -17930,8 +18776,13 @@ | ||
18699 | OBJDUMP \ | ||
18700 | deplibs_check_method \ | ||
18701 | file_magic_cmd \ | ||
18702 | +file_magic_glob \ | ||
18703 | +want_nocaseglob \ | ||
18704 | +DLLTOOL \ | ||
18705 | +sharedlib_from_linklib_cmd \ | ||
18706 | AR \ | ||
18707 | AR_FLAGS \ | ||
18708 | +archiver_list_spec \ | ||
18709 | STRIP \ | ||
18710 | RANLIB \ | ||
18711 | CC \ | ||
18712 | @@ -17941,12 +18792,14 @@ | ||
18713 | lt_cv_sys_global_symbol_to_cdecl \ | ||
18714 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
18715 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ | ||
18716 | +nm_file_list_spec \ | ||
18717 | lt_prog_compiler_no_builtin_flag \ | ||
18718 | -lt_prog_compiler_wl \ | ||
18719 | lt_prog_compiler_pic \ | ||
18720 | +lt_prog_compiler_wl \ | ||
18721 | lt_prog_compiler_static \ | ||
18722 | lt_cv_prog_compiler_c_o \ | ||
18723 | need_locks \ | ||
18724 | +MANIFEST_TOOL \ | ||
18725 | DSYMUTIL \ | ||
18726 | NMEDIT \ | ||
18727 | LIPO \ | ||
18728 | @@ -17962,7 +18815,6 @@ | ||
18729 | hardcode_libdir_flag_spec \ | ||
18730 | hardcode_libdir_flag_spec_ld \ | ||
18731 | hardcode_libdir_separator \ | ||
18732 | -fix_srcfile_path \ | ||
18733 | exclude_expsyms \ | ||
18734 | include_expsyms \ | ||
18735 | file_list_spec \ | ||
18736 | @@ -17984,8 +18836,8 @@ | ||
18737 | reload_flag_CXX \ | ||
18738 | compiler_CXX \ | ||
18739 | lt_prog_compiler_no_builtin_flag_CXX \ | ||
18740 | -lt_prog_compiler_wl_CXX \ | ||
18741 | lt_prog_compiler_pic_CXX \ | ||
18742 | +lt_prog_compiler_wl_CXX \ | ||
18743 | lt_prog_compiler_static_CXX \ | ||
18744 | lt_cv_prog_compiler_c_o_CXX \ | ||
18745 | export_dynamic_flag_spec_CXX \ | ||
18746 | @@ -17997,7 +18849,6 @@ | ||
18747 | hardcode_libdir_flag_spec_CXX \ | ||
18748 | hardcode_libdir_flag_spec_ld_CXX \ | ||
18749 | hardcode_libdir_separator_CXX \ | ||
18750 | -fix_srcfile_path_CXX \ | ||
18751 | exclude_expsyms_CXX \ | ||
18752 | include_expsyms_CXX \ | ||
18753 | file_list_spec_CXX \ | ||
18754 | @@ -18031,6 +18882,7 @@ | ||
18755 | module_expsym_cmds \ | ||
18756 | export_symbols_cmds \ | ||
18757 | prelink_cmds \ | ||
18758 | +postlink_cmds \ | ||
18759 | postinstall_cmds \ | ||
18760 | postuninstall_cmds \ | ||
18761 | finish_cmds \ | ||
18762 | @@ -18045,7 +18897,8 @@ | ||
18763 | module_cmds_CXX \ | ||
18764 | module_expsym_cmds_CXX \ | ||
18765 | export_symbols_cmds_CXX \ | ||
18766 | -prelink_cmds_CXX; do | ||
18767 | +prelink_cmds_CXX \ | ||
18768 | +postlink_cmds_CXX; do | ||
18769 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | ||
18770 | *[\\\\\\\`\\"\\\$]*) | ||
18771 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" | ||
18772 | @@ -18838,7 +19691,8 @@ | ||
18773 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
18774 | # | ||
18775 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
18776 | -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | ||
18777 | +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, | ||
18778 | +# Inc. | ||
18779 | # Written by Gordon Matzigkeit, 1996 | ||
18780 | # | ||
18781 | # This file is part of GNU Libtool. | ||
18782 | @@ -18941,19 +19795,42 @@ | ||
18783 | # turn newlines into spaces. | ||
18784 | NL2SP=$lt_lt_NL2SP | ||
18785 | |||
18786 | +# convert \$build file names to \$host format. | ||
18787 | +to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
18788 | + | ||
18789 | +# convert \$build files to toolchain format. | ||
18790 | +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
18791 | + | ||
18792 | # An object symbol dumper. | ||
18793 | OBJDUMP=$lt_OBJDUMP | ||
18794 | |||
18795 | # Method to check whether dependent libraries are shared objects. | ||
18796 | deplibs_check_method=$lt_deplibs_check_method | ||
18797 | |||
18798 | -# Command to use when deplibs_check_method == "file_magic". | ||
18799 | +# Command to use when deplibs_check_method = "file_magic". | ||
18800 | file_magic_cmd=$lt_file_magic_cmd | ||
18801 | |||
18802 | +# How to find potential files when deplibs_check_method = "file_magic". | ||
18803 | +file_magic_glob=$lt_file_magic_glob | ||
18804 | + | ||
18805 | +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". | ||
18806 | +want_nocaseglob=$lt_want_nocaseglob | ||
18807 | + | ||
18808 | +# DLL creation program. | ||
18809 | +DLLTOOL=$lt_DLLTOOL | ||
18810 | + | ||
18811 | +# Command to associate shared and link libraries. | ||
18812 | +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd | ||
18813 | + | ||
18814 | # The archiver. | ||
18815 | AR=$lt_AR | ||
18816 | + | ||
18817 | +# Flags to create an archive. | ||
18818 | AR_FLAGS=$lt_AR_FLAGS | ||
18819 | |||
18820 | +# How to feed a file listing to the archiver. | ||
18821 | +archiver_list_spec=$lt_archiver_list_spec | ||
18822 | + | ||
18823 | # A symbol stripping program. | ||
18824 | STRIP=$lt_STRIP | ||
18825 | |||
18826 | @@ -18983,6 +19860,12 @@ | ||
18827 | # Transform the output of nm in a C name address pair when lib prefix is needed. | ||
18828 | global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix | ||
18829 | |||
18830 | +# Specify filename containing input files for \$NM. | ||
18831 | +nm_file_list_spec=$lt_nm_file_list_spec | ||
18832 | + | ||
18833 | +# The root where to search for dependent libraries,and in which our libraries should be installed. | ||
18834 | +lt_sysroot=$lt_sysroot | ||
18835 | + | ||
18836 | # The name of the directory that contains temporary libtool files. | ||
18837 | objdir=$objdir | ||
18838 | |||
18839 | @@ -18992,6 +19875,9 @@ | ||
18840 | # Must we lock files when doing compilation? | ||
18841 | need_locks=$lt_need_locks | ||
18842 | |||
18843 | +# Manifest tool. | ||
18844 | +MANIFEST_TOOL=$lt_MANIFEST_TOOL | ||
18845 | + | ||
18846 | # Tool to manipulate archived DWARF debug symbol files on Mac OS X. | ||
18847 | DSYMUTIL=$lt_DSYMUTIL | ||
18848 | |||
18849 | @@ -19106,12 +19992,12 @@ | ||
18850 | # Compiler flag to turn off builtin functions. | ||
18851 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
18852 | |||
18853 | -# How to pass a linker flag through the compiler. | ||
18854 | -wl=$lt_lt_prog_compiler_wl | ||
18855 | - | ||
18856 | # Additional compiler flags for building library objects. | ||
18857 | pic_flag=$lt_lt_prog_compiler_pic | ||
18858 | |||
18859 | +# How to pass a linker flag through the compiler. | ||
18860 | +wl=$lt_lt_prog_compiler_wl | ||
18861 | + | ||
18862 | # Compiler flag to prevent dynamic linking. | ||
18863 | link_static_flag=$lt_lt_prog_compiler_static | ||
18864 | |||
18865 | @@ -19198,9 +20084,6 @@ | ||
18866 | # Whether libtool must link a program against all its dependency libraries. | ||
18867 | link_all_deplibs=$link_all_deplibs | ||
18868 | |||
18869 | -# Fix the shell variable \$srcfile for the compiler. | ||
18870 | -fix_srcfile_path=$lt_fix_srcfile_path | ||
18871 | - | ||
18872 | # Set to "yes" if exported symbols are required. | ||
18873 | always_export_symbols=$always_export_symbols | ||
18874 | |||
18875 | @@ -19216,6 +20099,9 @@ | ||
18876 | # Commands necessary for linking programs (against libraries) with templates. | ||
18877 | prelink_cmds=$lt_prelink_cmds | ||
18878 | |||
18879 | +# Commands necessary for finishing linking programs. | ||
18880 | +postlink_cmds=$lt_postlink_cmds | ||
18881 | + | ||
18882 | # Specify filename containing input files. | ||
18883 | file_list_spec=$lt_file_list_spec | ||
18884 | |||
18885 | @@ -19262,210 +20148,169 @@ | ||
18886 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
18887 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
18888 | # is reportedly fixed, but why not run on old versions too? | ||
18889 | - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | ||
18890 | - || (rm -f "$cfgfile"; exit 1) | ||
18891 | - | ||
18892 | - case $xsi_shell in | ||
18893 | - yes) | ||
18894 | - cat << \_LT_EOF >> "$cfgfile" | ||
18895 | - | ||
18896 | -# func_dirname file append nondir_replacement | ||
18897 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
18898 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
18899 | -func_dirname () | ||
18900 | -{ | ||
18901 | - case ${1} in | ||
18902 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
18903 | - * ) func_dirname_result="${3}" ;; | ||
18904 | - esac | ||
18905 | -} | ||
18906 | - | ||
18907 | -# func_basename file | ||
18908 | -func_basename () | ||
18909 | -{ | ||
18910 | - func_basename_result="${1##*/}" | ||
18911 | -} | ||
18912 | - | ||
18913 | -# func_dirname_and_basename file append nondir_replacement | ||
18914 | -# perform func_basename and func_dirname in a single function | ||
18915 | -# call: | ||
18916 | -# dirname: Compute the dirname of FILE. If nonempty, | ||
18917 | -# add APPEND to the result, otherwise set result | ||
18918 | -# to NONDIR_REPLACEMENT. | ||
18919 | -# value returned in "$func_dirname_result" | ||
18920 | -# basename: Compute filename of FILE. | ||
18921 | -# value retuned in "$func_basename_result" | ||
18922 | -# Implementation must be kept synchronized with func_dirname | ||
18923 | -# and func_basename. For efficiency, we do not delegate to | ||
18924 | -# those functions but instead duplicate the functionality here. | ||
18925 | -func_dirname_and_basename () | ||
18926 | -{ | ||
18927 | - case ${1} in | ||
18928 | - */*) func_dirname_result="${1%/*}${2}" ;; | ||
18929 | - * ) func_dirname_result="${3}" ;; | ||
18930 | - esac | ||
18931 | - func_basename_result="${1##*/}" | ||
18932 | -} | ||
18933 | - | ||
18934 | -# func_stripname prefix suffix name | ||
18935 | -# strip PREFIX and SUFFIX off of NAME. | ||
18936 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
18937 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
18938 | -# dot (in which case that matches only a dot). | ||
18939 | -func_stripname () | ||
18940 | -{ | ||
18941 | - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
18942 | - # positional parameters, so assign one to ordinary parameter first. | ||
18943 | - func_stripname_result=${3} | ||
18944 | - func_stripname_result=${func_stripname_result#"${1}"} | ||
18945 | - func_stripname_result=${func_stripname_result%"${2}"} | ||
18946 | -} | ||
18947 | - | ||
18948 | -# func_opt_split | ||
18949 | -func_opt_split () | ||
18950 | -{ | ||
18951 | - func_opt_split_opt=${1%%=*} | ||
18952 | - func_opt_split_arg=${1#*=} | ||
18953 | -} | ||
18954 | - | ||
18955 | -# func_lo2o object | ||
18956 | -func_lo2o () | ||
18957 | -{ | ||
18958 | - case ${1} in | ||
18959 | - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
18960 | - *) func_lo2o_result=${1} ;; | ||
18961 | - esac | ||
18962 | -} | ||
18963 | - | ||
18964 | -# func_xform libobj-or-source | ||
18965 | -func_xform () | ||
18966 | -{ | ||
18967 | - func_xform_result=${1%.*}.lo | ||
18968 | -} | ||
18969 | - | ||
18970 | -# func_arith arithmetic-term... | ||
18971 | -func_arith () | ||
18972 | -{ | ||
18973 | - func_arith_result=$(( $* )) | ||
18974 | -} | ||
18975 | - | ||
18976 | -# func_len string | ||
18977 | -# STRING may not start with a hyphen. | ||
18978 | -func_len () | ||
18979 | -{ | ||
18980 | - func_len_result=${#1} | ||
18981 | -} | ||
18982 | - | ||
18983 | -_LT_EOF | ||
18984 | - ;; | ||
18985 | - *) # Bourne compatible functions. | ||
18986 | - cat << \_LT_EOF >> "$cfgfile" | ||
18987 | - | ||
18988 | -# func_dirname file append nondir_replacement | ||
18989 | -# Compute the dirname of FILE. If nonempty, add APPEND to the result, | ||
18990 | -# otherwise set result to NONDIR_REPLACEMENT. | ||
18991 | -func_dirname () | ||
18992 | -{ | ||
18993 | - # Extract subdirectory from the argument. | ||
18994 | - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | ||
18995 | - if test "X$func_dirname_result" = "X${1}"; then | ||
18996 | - func_dirname_result="${3}" | ||
18997 | - else | ||
18998 | - func_dirname_result="$func_dirname_result${2}" | ||
18999 | - fi | ||
19000 | -} | ||
19001 | - | ||
19002 | -# func_basename file | ||
19003 | -func_basename () | ||
19004 | -{ | ||
19005 | - func_basename_result=`$ECHO "${1}" | $SED "$basename"` | ||
19006 | -} | ||
19007 | - | ||
19008 | - | ||
19009 | -# func_stripname prefix suffix name | ||
19010 | -# strip PREFIX and SUFFIX off of NAME. | ||
19011 | -# PREFIX and SUFFIX must not contain globbing or regex special | ||
19012 | -# characters, hashes, percent signs, but SUFFIX may contain a leading | ||
19013 | -# dot (in which case that matches only a dot). | ||
19014 | -# func_strip_suffix prefix name | ||
19015 | -func_stripname () | ||
19016 | -{ | ||
19017 | - case ${2} in | ||
19018 | - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
19019 | - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
19020 | - esac | ||
19021 | -} | ||
19022 | - | ||
19023 | -# sed scripts: | ||
19024 | -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' | ||
19025 | -my_sed_long_arg='1s/^-[^=]*=//' | ||
19026 | - | ||
19027 | -# func_opt_split | ||
19028 | -func_opt_split () | ||
19029 | -{ | ||
19030 | - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` | ||
19031 | - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` | ||
19032 | -} | ||
19033 | - | ||
19034 | -# func_lo2o object | ||
19035 | -func_lo2o () | ||
19036 | -{ | ||
19037 | - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | ||
19038 | -} | ||
19039 | - | ||
19040 | -# func_xform libobj-or-source | ||
19041 | -func_xform () | ||
19042 | -{ | ||
19043 | - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | ||
19044 | -} | ||
19045 | - | ||
19046 | -# func_arith arithmetic-term... | ||
19047 | -func_arith () | ||
19048 | -{ | ||
19049 | - func_arith_result=`expr "$@"` | ||
19050 | -} | ||
19051 | - | ||
19052 | -# func_len string | ||
19053 | -# STRING may not start with a hyphen. | ||
19054 | -func_len () | ||
19055 | -{ | ||
19056 | - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` | ||
19057 | -} | ||
19058 | - | ||
19059 | -_LT_EOF | ||
19060 | -esac | ||
19061 | - | ||
19062 | -case $lt_shell_append in | ||
19063 | - yes) | ||
19064 | - cat << \_LT_EOF >> "$cfgfile" | ||
19065 | - | ||
19066 | -# func_append var value | ||
19067 | -# Append VALUE to the end of shell variable VAR. | ||
19068 | -func_append () | ||
19069 | -{ | ||
19070 | - eval "$1+=\$2" | ||
19071 | -} | ||
19072 | -_LT_EOF | ||
19073 | - ;; | ||
19074 | - *) | ||
19075 | - cat << \_LT_EOF >> "$cfgfile" | ||
19076 | - | ||
19077 | -# func_append var value | ||
19078 | -# Append VALUE to the end of shell variable VAR. | ||
19079 | -func_append () | ||
19080 | -{ | ||
19081 | - eval "$1=\$$1\$2" | ||
19082 | -} | ||
19083 | - | ||
19084 | -_LT_EOF | ||
19085 | - ;; | ||
19086 | - esac | ||
19087 | + sed '$q' "$ltmain" >> "$cfgfile" \ | ||
19088 | + || (rm -f "$cfgfile"; exit 1) | ||
19089 | |||
19090 | + if test x"$xsi_shell" = xyes; then | ||
19091 | + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ | ||
19092 | +func_dirname ()\ | ||
19093 | +{\ | ||
19094 | +\ case ${1} in\ | ||
19095 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
19096 | +\ * ) func_dirname_result="${3}" ;;\ | ||
19097 | +\ esac\ | ||
19098 | +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19099 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19100 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19101 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19102 | + | ||
19103 | + | ||
19104 | + sed -e '/^func_basename ()$/,/^} # func_basename /c\ | ||
19105 | +func_basename ()\ | ||
19106 | +{\ | ||
19107 | +\ func_basename_result="${1##*/}"\ | ||
19108 | +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19109 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19110 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19111 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19112 | + | ||
19113 | + | ||
19114 | + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ | ||
19115 | +func_dirname_and_basename ()\ | ||
19116 | +{\ | ||
19117 | +\ case ${1} in\ | ||
19118 | +\ */*) func_dirname_result="${1%/*}${2}" ;;\ | ||
19119 | +\ * ) func_dirname_result="${3}" ;;\ | ||
19120 | +\ esac\ | ||
19121 | +\ func_basename_result="${1##*/}"\ | ||
19122 | +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19123 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19124 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19125 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19126 | + | ||
19127 | + | ||
19128 | + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ | ||
19129 | +func_stripname ()\ | ||
19130 | +{\ | ||
19131 | +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ | ||
19132 | +\ # positional parameters, so assign one to ordinary parameter first.\ | ||
19133 | +\ func_stripname_result=${3}\ | ||
19134 | +\ func_stripname_result=${func_stripname_result#"${1}"}\ | ||
19135 | +\ func_stripname_result=${func_stripname_result%"${2}"}\ | ||
19136 | +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19137 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19138 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19139 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19140 | + | ||
19141 | + | ||
19142 | + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ | ||
19143 | +func_split_long_opt ()\ | ||
19144 | +{\ | ||
19145 | +\ func_split_long_opt_name=${1%%=*}\ | ||
19146 | +\ func_split_long_opt_arg=${1#*=}\ | ||
19147 | +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19148 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19149 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19150 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19151 | + | ||
19152 | + | ||
19153 | + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ | ||
19154 | +func_split_short_opt ()\ | ||
19155 | +{\ | ||
19156 | +\ func_split_short_opt_arg=${1#??}\ | ||
19157 | +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ | ||
19158 | +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19159 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19160 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19161 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19162 | + | ||
19163 | + | ||
19164 | + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ | ||
19165 | +func_lo2o ()\ | ||
19166 | +{\ | ||
19167 | +\ case ${1} in\ | ||
19168 | +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ | ||
19169 | +\ *) func_lo2o_result=${1} ;;\ | ||
19170 | +\ esac\ | ||
19171 | +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19172 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19173 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19174 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19175 | + | ||
19176 | + | ||
19177 | + sed -e '/^func_xform ()$/,/^} # func_xform /c\ | ||
19178 | +func_xform ()\ | ||
19179 | +{\ | ||
19180 | + func_xform_result=${1%.*}.lo\ | ||
19181 | +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19182 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19183 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19184 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19185 | + | ||
19186 | + | ||
19187 | + sed -e '/^func_arith ()$/,/^} # func_arith /c\ | ||
19188 | +func_arith ()\ | ||
19189 | +{\ | ||
19190 | + func_arith_result=$(( $* ))\ | ||
19191 | +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19192 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19193 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19194 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19195 | + | ||
19196 | + | ||
19197 | + sed -e '/^func_len ()$/,/^} # func_len /c\ | ||
19198 | +func_len ()\ | ||
19199 | +{\ | ||
19200 | + func_len_result=${#1}\ | ||
19201 | +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19202 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19203 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19204 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19205 | + | ||
19206 | +fi | ||
19207 | + | ||
19208 | +if test x"$lt_shell_append" = xyes; then | ||
19209 | + sed -e '/^func_append ()$/,/^} # func_append /c\ | ||
19210 | +func_append ()\ | ||
19211 | +{\ | ||
19212 | + eval "${1}+=\\${2}"\ | ||
19213 | +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19214 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19215 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19216 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19217 | + | ||
19218 | + | ||
19219 | + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ | ||
19220 | +func_append_quoted ()\ | ||
19221 | +{\ | ||
19222 | +\ func_quote_for_eval "${2}"\ | ||
19223 | +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ | ||
19224 | +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ | ||
19225 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19226 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19227 | +test 0 -eq $? || _lt_function_replace_fail=: | ||
19228 | + | ||
19229 | + | ||
19230 | + # Save a `func_append' function call where possible by direct use of '+=' | ||
19231 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
19232 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19233 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19234 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
19235 | +else | ||
19236 | + # Save a `func_append' function call even when '+=' is not available | ||
19237 | + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | ||
19238 | + && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
19239 | + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
19240 | + test 0 -eq $? || _lt_function_replace_fail=: | ||
19241 | +fi | ||
19242 | + | ||
19243 | +if test x"$_lt_function_replace_fail" = x":"; then | ||
19244 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 | ||
19245 | +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} | ||
19246 | +fi | ||
19247 | |||
19248 | - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ | ||
19249 | - || (rm -f "$cfgfile"; exit 1) | ||
19250 | |||
19251 | - mv -f "$cfgfile" "$ofile" || | ||
19252 | + mv -f "$cfgfile" "$ofile" || | ||
19253 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
19254 | chmod +x "$ofile" | ||
19255 | |||
19256 | @@ -19493,12 +20338,12 @@ | ||
19257 | # Compiler flag to turn off builtin functions. | ||
19258 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX | ||
19259 | |||
19260 | -# How to pass a linker flag through the compiler. | ||
19261 | -wl=$lt_lt_prog_compiler_wl_CXX | ||
19262 | - | ||
19263 | # Additional compiler flags for building library objects. | ||
19264 | pic_flag=$lt_lt_prog_compiler_pic_CXX | ||
19265 | |||
19266 | +# How to pass a linker flag through the compiler. | ||
19267 | +wl=$lt_lt_prog_compiler_wl_CXX | ||
19268 | + | ||
19269 | # Compiler flag to prevent dynamic linking. | ||
19270 | link_static_flag=$lt_lt_prog_compiler_static_CXX | ||
19271 | |||
19272 | @@ -19585,9 +20430,6 @@ | ||
19273 | # Whether libtool must link a program against all its dependency libraries. | ||
19274 | link_all_deplibs=$link_all_deplibs_CXX | ||
19275 | |||
19276 | -# Fix the shell variable \$srcfile for the compiler. | ||
19277 | -fix_srcfile_path=$lt_fix_srcfile_path_CXX | ||
19278 | - | ||
19279 | # Set to "yes" if exported symbols are required. | ||
19280 | always_export_symbols=$always_export_symbols_CXX | ||
19281 | |||
19282 | @@ -19603,6 +20445,9 @@ | ||
19283 | # Commands necessary for linking programs (against libraries) with templates. | ||
19284 | prelink_cmds=$lt_prelink_cmds_CXX | ||
19285 | |||
19286 | +# Commands necessary for finishing linking programs. | ||
19287 | +postlink_cmds=$lt_postlink_cmds_CXX | ||
19288 | + | ||
19289 | # Specify filename containing input files. | ||
19290 | file_list_spec=$lt_file_list_spec_CXX | ||
19291 | |||
19292 | Index: binutils-2.24/bfd/configure.in | ||
19293 | =================================================================== | ||
19294 | --- binutils-2.24.orig/bfd/configure.in 2013-12-02 01:30:28.000000000 -0800 | ||
19295 | +++ binutils-2.24/bfd/configure.in 2013-12-15 11:10:23.887118697 -0800 | ||
19296 | @@ -568,7 +568,7 @@ | ||
19297 | x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` | ||
19298 | changequote([,])dnl | ||
19299 | if test -n "$x"; then | ||
19300 | - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" | ||
19301 | + SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" | ||
19302 | fi | ||
19303 | |||
19304 | # More hacks to build DLLs on Windows. | ||
19305 | Index: binutils-2.24/opcodes/configure.in | ||
19306 | =================================================================== | ||
19307 | --- binutils-2.24.orig/opcodes/configure.in 2013-11-04 07:33:40.000000000 -0800 | ||
19308 | +++ binutils-2.24/opcodes/configure.in 2013-12-15 11:10:23.887118697 -0800 | ||
19309 | @@ -162,7 +162,7 @@ | ||
19310 | x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` | ||
19311 | changequote([,])dnl | ||
19312 | if test -n "$x"; then | ||
19313 | - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" | ||
19314 | + SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" | ||
19315 | fi | ||
19316 | |||
19317 | case "${host}" in | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libtool-rpath-fix.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libtool-rpath-fix.patch new file mode 100644 index 0000000..4fcffa4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/libtool-rpath-fix.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Enabling sysroot support in libtool exposed a bug where the final | ||
4 | library had an RPATH encoded into it which still pointed to the | ||
5 | sysroot. This works around the issue until it gets sorted out | ||
6 | upstream. | ||
7 | |||
8 | Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org> | ||
9 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
10 | |||
11 | Index: binutils-2.22/ltmain.sh | ||
12 | =================================================================== | ||
13 | --- binutils-2.22.orig/ltmain.sh | ||
14 | +++ binutils-2.22/ltmain.sh | ||
15 | @@ -8035,9 +8035,11 @@ EOF | ||
16 | test "$opt_mode" != relink && rpath="$compile_rpath$rpath" | ||
17 | for libdir in $rpath; do | ||
18 | if test -n "$hardcode_libdir_flag_spec"; then | ||
19 | + func_replace_sysroot "$libdir" | ||
20 | + libdir=$func_replace_sysroot_result | ||
21 | + func_stripname '=' '' "$libdir" | ||
22 | + libdir=$func_stripname_result | ||
23 | if test -n "$hardcode_libdir_separator"; then | ||
24 | - func_replace_sysroot "$libdir" | ||
25 | - libdir=$func_replace_sysroot_result | ||
26 | if test -z "$hardcode_libdirs"; then | ||
27 | hardcode_libdirs="$libdir" | ||
28 | else | ||
29 | @@ -8770,6 +8772,10 @@ EOF | ||
30 | hardcode_libdirs= | ||
31 | for libdir in $compile_rpath $finalize_rpath; do | ||
32 | if test -n "$hardcode_libdir_flag_spec"; then | ||
33 | + func_replace_sysroot "$libdir" | ||
34 | + libdir=$func_replace_sysroot_result | ||
35 | + func_stripname '=' '' "$libdir" | ||
36 | + libdir=$func_stripname_result | ||
37 | if test -n "$hardcode_libdir_separator"; then | ||
38 | if test -z "$hardcode_libdirs"; then | ||
39 | hardcode_libdirs="$libdir" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/mips64-default-ld-emulation.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/mips64-default-ld-emulation.patch new file mode 100644 index 0000000..51eaf0b --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/mips64-default-ld-emulation.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | for mips64*-*-linux we change the default emulations to be | ||
2 | N64 instead of N32 | ||
3 | |||
4 | Upstream-Status: Inappropriate [ OE configuration Specific] | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Index: binutils-2.24/bfd/config.bfd | ||
9 | =================================================================== | ||
10 | --- binutils-2.24.orig/bfd/config.bfd 2013-11-04 07:33:37.000000000 -0800 | ||
11 | +++ binutils-2.24/bfd/config.bfd 2013-12-15 11:54:57.113765374 -0800 | ||
12 | @@ -1052,14 +1052,14 @@ | ||
13 | targ_defvec=bfd_elf32_bigmips_vec | ||
14 | targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec" | ||
15 | ;; | ||
16 | - mips64*el-*-linux*) | ||
17 | - targ_defvec=bfd_elf32_ntradlittlemips_vec | ||
18 | - targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec" | ||
19 | - ;; | ||
20 | - mips64*-*-linux*) | ||
21 | - targ_defvec=bfd_elf32_ntradbigmips_vec | ||
22 | - targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec" | ||
23 | - ;; | ||
24 | + mips64*el-*-linux*) | ||
25 | + targ_defvec=bfd_elf64_tradlittlemips_vec | ||
26 | + targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec" | ||
27 | + ;; | ||
28 | + mips64*-*-linux*) | ||
29 | + targ_defvec=bfd_elf64_tradbigmips_vec | ||
30 | + targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradlittlemips_vec" | ||
31 | + ;; | ||
32 | mips*el-*-linux*) | ||
33 | targ_defvec=bfd_elf32_tradlittlemips_vec | ||
34 | targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec" | ||
35 | Index: binutils-2.24/ld/configure.tgt | ||
36 | =================================================================== | ||
37 | --- binutils-2.24.orig/ld/configure.tgt 2013-11-26 03:37:33.000000000 -0800 | ||
38 | +++ binutils-2.24/ld/configure.tgt 2013-12-15 11:50:52.273766155 -0800 | ||
39 | @@ -471,11 +471,11 @@ | ||
40 | mips*-*-vxworks*) targ_emul=elf32ebmipvxworks | ||
41 | targ_extra_emuls="elf32elmipvxworks" ;; | ||
42 | mips*-*-windiss) targ_emul=elf32mipswindiss ;; | ||
43 | -mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 | ||
44 | - targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" | ||
45 | +mips64*el-*-linux-*) targ_emul=elf64ltsmip | ||
46 | + targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" | ||
47 | targ_extra_libpath=$targ_extra_emuls ;; | ||
48 | -mips64*-*-linux-*) targ_emul=elf32btsmipn32 | ||
49 | - targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" | ||
50 | +mips64*-*-linux-*) targ_emul=elf64btsmip | ||
51 | + targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" | ||
52 | targ_extra_libpath=$targ_extra_emuls ;; | ||
53 | mips*el-*-linux-*) targ_emul=elf32ltsmip | ||
54 | targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/relocatable_sdk.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/relocatable_sdk.patch new file mode 100644 index 0000000..7408c31 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/relocatable_sdk.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Upstream-Status: Inappropriate [SDK specific] | ||
2 | |||
3 | This patch will modify the ELF linker scripts so that the crosssdk linker will | ||
4 | generate binaries with a 4096 bytes PT_INTERP section. When the binaries will | ||
5 | be relocated, at SDK install time, the interpreter path can be easily changed | ||
6 | by the relocating script. | ||
7 | |||
8 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
9 | |||
10 | Index: binutils_git/ld/genscripts.sh | ||
11 | =================================================================== | ||
12 | --- binutils_git.orig/ld/genscripts.sh 2012-11-21 11:58:23.325441925 +0200 | ||
13 | +++ binutils_git/ld/genscripts.sh 2012-11-21 12:03:42.106815400 +0200 | ||
14 | @@ -290,6 +290,7 @@ | ||
15 | LD_FLAG=r | ||
16 | DATA_ALIGNMENT=${DATA_ALIGNMENT_r} | ||
17 | DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})" | ||
18 | +PARTIAL_LINKING=" " | ||
19 | ( echo "/* Script for ld -r: link without relocation */" | ||
20 | . ${CUSTOMIZER_SCRIPT} | ||
21 | . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc | ||
22 | @@ -298,10 +299,12 @@ | ||
23 | LD_FLAG=u | ||
24 | DATA_ALIGNMENT=${DATA_ALIGNMENT_u} | ||
25 | CONSTRUCTING=" " | ||
26 | +PARTIAL_LINKING=" " | ||
27 | ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */" | ||
28 | . ${CUSTOMIZER_SCRIPT} | ||
29 | . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc | ||
30 | ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu | ||
31 | +unset PARTIAL_LINKING | ||
32 | |||
33 | LD_FLAG= | ||
34 | DATA_ALIGNMENT=${DATA_ALIGNMENT_} | ||
35 | Index: binutils_git/ld/scripttempl/elf.sc | ||
36 | =================================================================== | ||
37 | --- binutils_git.orig/ld/scripttempl/elf.sc 2012-11-21 12:02:26.800377384 +0200 | ||
38 | +++ binutils_git/ld/scripttempl/elf.sc 2012-11-21 12:04:16.166109621 +0200 | ||
39 | @@ -124,8 +124,8 @@ | ||
40 | DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);" | ||
41 | DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);" | ||
42 | fi | ||
43 | -if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then | ||
44 | - INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" | ||
45 | +if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then | ||
46 | + INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }" | ||
47 | fi | ||
48 | if test -z "$PLT"; then | ||
49 | IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch new file mode 100644 index 0000000..834f55c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch | |||
@@ -0,0 +1,188 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001 | ||
4 | From: Nick Clifton <nickc@redhat.com> | ||
5 | Date: Wed, 29 Jan 2014 13:46:39 +0000 | ||
6 | Subject: [PATCH 1/1] Following up on Tom's suggestion I am checking in a patch to replace the various | ||
7 | bfd_xxx_set macros with static inline functions, so that we can avoid compile time | ||
8 | warnings about comma expressions with unused values. | ||
9 | |||
10 | * bfd-in.h (bfd_set_section_vma): Delete. | ||
11 | (bfd_set_section_alignment): Delete. | ||
12 | (bfd_set_section_userdata): Delete. | ||
13 | (bfd_set_cacheable): Delete. | ||
14 | * bfd.c (bfd_set_cacheable): New static inline function. | ||
15 | * section.c (bfd_set_section_userdata): Likewise. | ||
16 | (bfd_set_section_vma): Likewise. | ||
17 | (bfd_set_section_alignment): Likewise. | ||
18 | * bfd-in2.h: Regenerate. | ||
19 | --- | ||
20 | bfd/ChangeLog | 12 ++++++++++++ | ||
21 | bfd/bfd-in.h | 5 ----- | ||
22 | bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------ | ||
23 | bfd/bfd.c | 8 ++++++++ | ||
24 | bfd/section.c | 26 ++++++++++++++++++++++++++ | ||
25 | 5 files changed, 81 insertions(+), 11 deletions(-) | ||
26 | |||
27 | diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h | ||
28 | index 3afd71b..c7c5a7d 100644 | ||
29 | --- a/bfd/bfd-in.h | ||
30 | +++ b/bfd/bfd-in.h | ||
31 | @@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr; | ||
32 | |||
33 | #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) | ||
34 | |||
35 | -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) | ||
36 | -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) | ||
37 | -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) | ||
38 | /* Find the address one past the end of SEC. */ | ||
39 | #define bfd_get_section_limit(bfd, sec) \ | ||
40 | (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ | ||
41 | @@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); | ||
42 | |||
43 | #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) | ||
44 | |||
45 | -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) | ||
46 | - | ||
47 | extern bfd_boolean bfd_cache_close | ||
48 | (bfd *abfd); | ||
49 | /* NB: This declaration should match the autogenerated one in libbfd.h. */ | ||
50 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
51 | index 71996db..b5aeb40 100644 | ||
52 | --- a/bfd/bfd-in2.h | ||
53 | +++ b/bfd/bfd-in2.h | ||
54 | @@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr; | ||
55 | |||
56 | #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) | ||
57 | |||
58 | -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) | ||
59 | -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) | ||
60 | -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) | ||
61 | /* Find the address one past the end of SEC. */ | ||
62 | #define bfd_get_section_limit(bfd, sec) \ | ||
63 | (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ | ||
64 | @@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); | ||
65 | |||
66 | #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) | ||
67 | |||
68 | -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) | ||
69 | - | ||
70 | extern bfd_boolean bfd_cache_close | ||
71 | (bfd *abfd); | ||
72 | /* NB: This declaration should match the autogenerated one in libbfd.h. */ | ||
73 | @@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target); | ||
74 | |||
75 | bfd *bfd_fdopenr (const char *filename, const char *target, int fd); | ||
76 | |||
77 | -bfd *bfd_openstreamr (const char *, const char *, void *); | ||
78 | +bfd *bfd_openstreamr (const char * filename, const char * target, void * stream); | ||
79 | |||
80 | bfd *bfd_openr_iovec (const char *filename, const char *target, | ||
81 | void *(*open_func) (struct bfd *nbfd, | ||
82 | @@ -1596,6 +1591,32 @@ struct relax_table { | ||
83 | int size; | ||
84 | }; | ||
85 | |||
86 | +/* Note: the following are provided as inline functions rather than macros | ||
87 | + because not all callers use the return value. A macro implementation | ||
88 | + would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some | ||
89 | + compilers will complain about comma expressions that have no effect. */ | ||
90 | +static inline bfd_boolean | ||
91 | +bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) | ||
92 | +{ | ||
93 | + ptr->userdata = val; | ||
94 | + return TRUE; | ||
95 | +} | ||
96 | + | ||
97 | +static inline bfd_boolean | ||
98 | +bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) | ||
99 | +{ | ||
100 | + ptr->vma = ptr->lma = val; | ||
101 | + ptr->user_set_vma = TRUE; | ||
102 | + return TRUE; | ||
103 | +} | ||
104 | + | ||
105 | +static inline bfd_boolean | ||
106 | +bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) | ||
107 | +{ | ||
108 | + ptr->alignment_power = val; | ||
109 | + return TRUE; | ||
110 | +} | ||
111 | + | ||
112 | /* These sections are global, and are managed by BFD. The application | ||
113 | and target back end are not permitted to change the values in | ||
114 | these sections. */ | ||
115 | @@ -6415,6 +6436,14 @@ struct bfd | ||
116 | unsigned int selective_search : 1; | ||
117 | }; | ||
118 | |||
119 | +/* See note beside bfd_set_section_userdata. */ | ||
120 | +static inline bfd_boolean | ||
121 | +bfd_set_cacheable (bfd * abfd, bfd_boolean val) | ||
122 | +{ | ||
123 | + abfd->cacheable = val; | ||
124 | + return TRUE; | ||
125 | +} | ||
126 | + | ||
127 | typedef enum bfd_error | ||
128 | { | ||
129 | bfd_error_no_error = 0, | ||
130 | diff --git a/bfd/bfd.c b/bfd/bfd.c | ||
131 | index 8d0580c..2d174f3 100644 | ||
132 | --- a/bfd/bfd.c | ||
133 | +++ b/bfd/bfd.c | ||
134 | @@ -311,6 +311,14 @@ CODE_FRAGMENT | ||
135 | . unsigned int selective_search : 1; | ||
136 | .}; | ||
137 | . | ||
138 | +.{* See note beside bfd_set_section_userdata. *} | ||
139 | +.static inline bfd_boolean | ||
140 | +.bfd_set_cacheable (bfd * abfd, bfd_boolean val) | ||
141 | +.{ | ||
142 | +. abfd->cacheable = val; | ||
143 | +. return TRUE; | ||
144 | +.} | ||
145 | +. | ||
146 | */ | ||
147 | |||
148 | #include "sysdep.h" | ||
149 | diff --git a/bfd/section.c b/bfd/section.c | ||
150 | index fb19d8c..a661228 100644 | ||
151 | --- a/bfd/section.c | ||
152 | +++ b/bfd/section.c | ||
153 | @@ -542,6 +542,32 @@ CODE_FRAGMENT | ||
154 | . int size; | ||
155 | .}; | ||
156 | . | ||
157 | +.{* Note: the following are provided as inline functions rather than macros | ||
158 | +. because not all callers use the return value. A macro implementation | ||
159 | +. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some | ||
160 | +. compilers will complain about comma expressions that have no effect. *} | ||
161 | +.static inline bfd_boolean | ||
162 | +.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) | ||
163 | +.{ | ||
164 | +. ptr->userdata = val; | ||
165 | +. return TRUE; | ||
166 | +.} | ||
167 | +. | ||
168 | +.static inline bfd_boolean | ||
169 | +.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) | ||
170 | +.{ | ||
171 | +. ptr->vma = ptr->lma = val; | ||
172 | +. ptr->user_set_vma = TRUE; | ||
173 | +. return TRUE; | ||
174 | +.} | ||
175 | +. | ||
176 | +.static inline bfd_boolean | ||
177 | +.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) | ||
178 | +.{ | ||
179 | +. ptr->alignment_power = val; | ||
180 | +. return TRUE; | ||
181 | +.} | ||
182 | +. | ||
183 | .{* These sections are global, and are managed by BFD. The application | ||
184 | . and target back end are not permitted to change the values in | ||
185 | . these sections. *} | ||
186 | -- | ||
187 | 1.7.1 | ||
188 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils_linaro-2.24.bb b/meta-linaro-toolchain/recipes-devtools/binutils/binutils_linaro-2.24.bb new file mode 100644 index 0000000..ef5b7c5 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils_linaro-2.24.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | require recipes-devtools/binutils/binutils.inc | ||
2 | require recipes-devtools/binutils/binutils-${PV}.inc | ||
3 | |||
4 | DEPENDS += "flex bison zlib" | ||
5 | |||
6 | EXTRA_OECONF += "--with-sysroot=/ \ | ||
7 | --enable-install-libbfd \ | ||
8 | --enable-install-libiberty \ | ||
9 | --enable-shared \ | ||
10 | " | ||
11 | |||
12 | EXTRA_OECONF_class-native = "--enable-targets=all \ | ||
13 | --enable-64-bit-bfd \ | ||
14 | --enable-install-libbfd \ | ||
15 | --enable-install-libiberty" | ||
16 | |||
17 | do_install_class-native () { | ||
18 | autotools_do_install | ||
19 | |||
20 | # Install the libiberty header | ||
21 | install -d ${D}${includedir} | ||
22 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} | ||
23 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} | ||
24 | |||
25 | # We only want libiberty, libbfd and libopcodes | ||
26 | rm -rf ${D}${bindir} | ||
27 | rm -rf ${D}${prefix}/${TARGET_SYS} | ||
28 | rm -rf ${D}${prefix}/lib/ldscripts | ||
29 | rm -rf ${D}${prefix}/share/info | ||
30 | rm -rf ${D}${prefix}/share/locale | ||
31 | rm -rf ${D}${prefix}/share/man | ||
32 | rmdir ${D}${prefix}/share || : | ||
33 | rmdir ${D}/${libdir}/gcc-lib || : | ||
34 | rmdir ${D}/${libdir}64/gcc-lib || : | ||
35 | rmdir ${D}/${libdir} || : | ||
36 | rmdir ${D}/${libdir}64 || : | ||
37 | } | ||
38 | |||
39 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/external-linaro-toolchain.bb b/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/external-linaro-toolchain.bb new file mode 100644 index 0000000..9e8ad6e --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/external-linaro-toolchain.bb | |||
@@ -0,0 +1,376 @@ | |||
1 | require recipes-core/glibc/glibc-package.inc | ||
2 | |||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | INHIBIT_PACKAGE_STRIP = "1" | ||
5 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
6 | |||
7 | # License applies to this recipe code, not the toolchain itself | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "\ | ||
10 | file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
11 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ | ||
12 | " | ||
13 | |||
14 | PROVIDES += "\ | ||
15 | linux-libc-headers \ | ||
16 | virtual/${TARGET_PREFIX}gcc \ | ||
17 | virtual/${TARGET_PREFIX}g++ \ | ||
18 | virtual/${TARGET_PREFIX}gcc-initial \ | ||
19 | virtual/${TARGET_PREFIX}binutils \ | ||
20 | virtual/${TARGET_PREFIX}libc-for-gcc \ | ||
21 | virtual/${TARGET_PREFIX}compilerlibs \ | ||
22 | virtual/libc \ | ||
23 | virtual/libintl \ | ||
24 | virtual/libiconv \ | ||
25 | glibc-thread-db \ | ||
26 | glibc \ | ||
27 | libgcc \ | ||
28 | libg2c \ | ||
29 | libg2c-dev \ | ||
30 | libssp \ | ||
31 | libssp-dev \ | ||
32 | libssp-staticdev \ | ||
33 | libgfortran \ | ||
34 | libgfortran-dev \ | ||
35 | libgfortran-staticdev \ | ||
36 | libmudflap \ | ||
37 | libmudflap-dev \ | ||
38 | libgomp \ | ||
39 | libgomp-dev \ | ||
40 | libgomp-staticdev \ | ||
41 | libitm \ | ||
42 | libitm-dev \ | ||
43 | libitm-staticdev \ | ||
44 | virtual/linux-libc-headers \ | ||
45 | libgcov-dev \ | ||
46 | " | ||
47 | |||
48 | PV = "${ELT_VER_MAIN}" | ||
49 | |||
50 | # https://launchpad.net/linaro-toolchain-binaries | ||
51 | SRC_URI = "file://SUPPORTED" | ||
52 | |||
53 | do_install() { | ||
54 | install -d ${D}${base_libdir} | ||
55 | install -d ${D}${bindir} | ||
56 | install -d ${D}${sbindir} | ||
57 | install -d ${D}${libdir} | ||
58 | install -d ${D}${libexecdir} | ||
59 | install -d ${D}${datadir} | ||
60 | install -d ${D}${includedir} | ||
61 | |||
62 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/lib/* ${D}${base_libdir} | ||
63 | if [ -d ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/lib/${ELT_TARGET_SYS} ]; then | ||
64 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/lib/${ELT_TARGET_SYS}/* ${D}${base_libdir} | ||
65 | else | ||
66 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/lib/* ${D}${base_libdir} | ||
67 | fi | ||
68 | if [ -d ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/lib/${ELT_TARGET_SYS} ]; then | ||
69 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/lib/${ELT_TARGET_SYS}/* ${D}${libdir} | ||
70 | else | ||
71 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/lib/* ${D}${libdir} | ||
72 | fi | ||
73 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/share/* ${D}${datadir} | ||
74 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/include/* ${D}${includedir} | ||
75 | if [ -d ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/include/${ELT_TARGET_SYS} ]; then | ||
76 | cp -a ${EXTERNAL_TOOLCHAIN}/${ELT_TARGET_SYS}/libc/usr/include/${ELT_TARGET_SYS}/* ${D}${includedir} | ||
77 | |||
78 | rm -r ${D}${includedir}/${ELT_TARGET_SYS} | ||
79 | fi | ||
80 | |||
81 | # fix up the copied symlinks (they are still pointing to the multiarch directory) | ||
82 | linker_name="${@base_contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", base_contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}" | ||
83 | ln -sf ld-${ELT_VER_LIBC}.so ${D}${base_libdir}/${linker_name} | ||
84 | ln -sf ../../lib/libnsl.so.1 ${D}${libdir}/libnsl.so | ||
85 | ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so | ||
86 | ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so | ||
87 | ln -sf ../../lib/libnss_nis.so.2 ${D}${libdir}/libnss_nis.so | ||
88 | ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so | ||
89 | ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so | ||
90 | ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so | ||
91 | ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so | ||
92 | ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so | ||
93 | ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so | ||
94 | ln -sf ../../lib/libcidn.so.1 ${D}${libdir}/libcidn.so | ||
95 | ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so | ||
96 | ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so | ||
97 | ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so | ||
98 | ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so | ||
99 | ln -sf ../../lib/libnss_nisplus.so.2 ${D}${libdir}/libnss_nisplus.so | ||
100 | ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so | ||
101 | |||
102 | if [ -d ${D}${base_libdir}/arm-linux-gnueabi ]; then | ||
103 | rm -rf ${D}${base_libdir}/arm-linux-gnueabi | ||
104 | fi | ||
105 | |||
106 | if [ -d ${D}${base_libdir}/ldscripts ]; then | ||
107 | rm -rf ${D}${base_libdir}/ldscripts | ||
108 | fi | ||
109 | |||
110 | if [ -f ${D}${libdir}/libc.so ];then | ||
111 | sed -i -e "s# /lib/${ELT_TARGET_SYS}# ../../lib#g" -e "s# /usr/lib/${ELT_TARGET_SYS}# .#g" -e "s# /lib/ld-linux# ../../lib/ld-linux#g" ${D}${libdir}/libc.so | ||
112 | fi | ||
113 | if [ -f ${D}${base_libdir}/libc.so ];then | ||
114 | sed -i -e "s# /lib/${ELT_TARGET_SYS}# ../../lib#g" -e "s# /usr/lib/${ELT_TARGET_SYS}# .#g" -e "s# /lib/ld-linux# ../../lib/ld-linux#g" ${D}${base_libdir}/libc.so | ||
115 | fi | ||
116 | if [ -f ${D}${libdir}/libpthread.so ];then | ||
117 | sed -i -e "s# /lib/${ELT_TARGET_SYS}# ../../lib#g" -e "s# /usr/lib/${ELT_TARGET_SYS}# .#g" ${D}${libdir}/libpthread.so | ||
118 | fi | ||
119 | if [ -f ${D}${base_libdir}/libpthread.so ];then | ||
120 | sed -i -e "s# /lib/${ELT_TARGET_SYS}# ../../lib#g" -e "s# /usr/lib/${ELT_TARGET_SYS}# .#g" ${D}${base_libdir}/libpthread.so | ||
121 | fi | ||
122 | } | ||
123 | |||
124 | PACKAGES =+ "\ | ||
125 | libgcov-dev \ | ||
126 | libgcc \ | ||
127 | libgcc-dev \ | ||
128 | libstdc++ \ | ||
129 | libstdc++-dev \ | ||
130 | libstdc++-staticdev \ | ||
131 | libatomic \ | ||
132 | libatomic-dev \ | ||
133 | libatomic-staticdev \ | ||
134 | libasan \ | ||
135 | libasan-dev \ | ||
136 | libasan-staticdev \ | ||
137 | linux-libc-headers \ | ||
138 | libubsan \ | ||
139 | libubsan-dev \ | ||
140 | libubsan-staticdev \ | ||
141 | linux-libc-headers-dev \ | ||
142 | libssp \ | ||
143 | libssp-dev \ | ||
144 | libssp-staticdev \ | ||
145 | libgfortran \ | ||
146 | libgfortran-dev \ | ||
147 | libgfortran-staticdev \ | ||
148 | libmudflap \ | ||
149 | libmudflap-dev \ | ||
150 | libmudflap-staticdev \ | ||
151 | libgomp \ | ||
152 | libgomp-dev \ | ||
153 | libgomp-staticdev \ | ||
154 | libitm \ | ||
155 | libitm-dev \ | ||
156 | libitm-staticdev \ | ||
157 | " | ||
158 | |||
159 | INSANE_SKIP_${PN}-dbg = "staticdev" | ||
160 | INSANE_SKIP_${PN}-utils += "ldflags" | ||
161 | INSANE_SKIP_libstdc++ += "ldflags" | ||
162 | INSANE_SKIP_libgcc += "ldflags" | ||
163 | INSANE_SKIP_gdbserver += "ldflags" | ||
164 | |||
165 | # OE-core has literally listed 'glibc' in LIBC_DEPENDENCIES :/ | ||
166 | RPROVIDES_${PN} = "glibc" | ||
167 | # Add runtime provides for the other libc* packages as well | ||
168 | RPROVIDES_${PN}-dev = "glibc-dev" | ||
169 | RPROVIDES_${PN}-doc = "glibc-doc" | ||
170 | RPROVIDES_${PN}-dbg = "glibc-dbg" | ||
171 | RPROVIDES_${PN}-pic = "glibc-pic" | ||
172 | RPROVIDES_${PN}-utils = "glibc-utils" | ||
173 | |||
174 | PKG_${PN} = "glibc" | ||
175 | PKG_${PN}-dev = "glibc-dev" | ||
176 | PKG_${PN}-doc = "glibc-doc" | ||
177 | PKG_${PN}-dbg = "glibc-dbg" | ||
178 | PKG_${PN}-pic = "glibc-pic" | ||
179 | PKG_${PN}-utils = "glibc-utils" | ||
180 | PKG_${PN}-gconv = "glibc-gconv" | ||
181 | PKG_${PN}-extra-nss = "glibc-extra-nss" | ||
182 | PKG_${PN}-thread-db = "glibc-thread-db" | ||
183 | PKG_${PN}-pcprofile = "glibc-pcprofile" | ||
184 | PKG_${PN}-staticdev = "glibc-staticdev" | ||
185 | |||
186 | PKGV_${PN} = "${ELT_VER_LIBC}" | ||
187 | PKGV_${PN}-dev = "${ELT_VER_LIBC}" | ||
188 | PKGV_${PN}-doc = "${ELT_VER_LIBC}" | ||
189 | PKGV_${PN}-dbg = "${ELT_VER_LIBC}" | ||
190 | PKGV_${PN}-pic = "${ELT_VER_LIBC}" | ||
191 | PKGV_${PN}-utils = "${ELT_VER_LIBC}" | ||
192 | PKGV_${PN}-gconv = "${ELT_VER_LIBC}" | ||
193 | PKGV_${PN}-extra-nss = "${ELT_VER_LIBC}" | ||
194 | PKGV_${PN}-thread-db = "${ELT_VER_LIBC}" | ||
195 | PKGV_${PN}-pcprofile = "${ELT_VER_LIBC}" | ||
196 | PKGV_${PN}-staticdev = "${ELT_VER_LIBC}" | ||
197 | PKGV_catchsegv = "${ELT_VER_LIBC}" | ||
198 | PKGV_libsegfault = "${ELT_VER_LIBC}" | ||
199 | PKGV_sln = "${ELT_VER_LIBC}" | ||
200 | PKGV_nscd = "${ELT_VER_LIBC}" | ||
201 | PKGV_ldd = "${ELT_VER_LIBC}" | ||
202 | PKGV_libgcc = "${ELT_VER_GCC}" | ||
203 | PKGV_libgcc-dev = "${ELT_VER_GCC}" | ||
204 | PKGV_libstdc++ = "${ELT_VER_GCC}" | ||
205 | PKGV_libstdc++-dev = "${ELT_VER_GCC}" | ||
206 | PKGV_libstdc++-staticdev = "${ELT_VER_GCC}" | ||
207 | PKGV_libatomic = "${ELT_VER_GCC}" | ||
208 | PKGV_libatomic = "${ELT_VER_GCC}" | ||
209 | PKGV_libatomic = "${ELT_VER_GCC}" | ||
210 | PKGV_libasan = "${ELT_VER_GCC}" | ||
211 | PKGV_libasan-dev = "${ELT_VER_GCC}" | ||
212 | PKGV_libasan-staticdev = "${ELT_VER_GCC}" | ||
213 | PKGV_libubsan = "${ELT_VER_GCC}" | ||
214 | PKGV_libubsan-dev = "${ELT_VER_GCC}" | ||
215 | PKGV_libubsan-staticdev = "${ELT_VER_GCC}" | ||
216 | PKGV_linux-libc-headers = "${ELT_VER_KERNEL}" | ||
217 | PKGV_linux-libc-headers-dev = "${ELT_VER_KERNEL}" | ||
218 | PKGV_gdbserver = "${ELT_VER_GDBSERVER}" | ||
219 | |||
220 | FILES_libgcov-dev = "${libdir}/${TARGET_SYS}/${BINV}/libgcov.a" | ||
221 | |||
222 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
223 | |||
224 | FILES_catchsegv = "${bindir}/catchsegv" | ||
225 | RDEPENDS_catchsegv = "libsegfault" | ||
226 | |||
227 | FILES_libatomic = "${base_libdir}/libatomic.so.*" | ||
228 | FILES_libatomic-dev = "\ | ||
229 | ${base_libdir}/libatomic.so \ | ||
230 | ${base_libdir}/libatomic.la \ | ||
231 | " | ||
232 | FILES_libatomic-staticdev = "${base_libdir}/libatomic.a" | ||
233 | |||
234 | FILES_libasan = "${base_libdir}/libasan.so.*" | ||
235 | FILES_libasan-dev = "\ | ||
236 | ${base_libdir}/libasan.so \ | ||
237 | ${base_libdir}/libasan.la \ | ||
238 | " | ||
239 | FILES_libasan-staticdev = "${base_libdir}/libasan.a" | ||
240 | |||
241 | FILES_libubsan = "${base_libdir}/libubsan.so.*" | ||
242 | FILES_libubsan-dev = "\ | ||
243 | ${base_libdir}/libubsan.so \ | ||
244 | ${base_libdir}/libubsan.la \ | ||
245 | " | ||
246 | FILES_libubsan-staticdev = "${base_libdir}/libubsan.a" | ||
247 | |||
248 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | ||
249 | FILES_libgcc-dev = "${base_libdir}/libgcc_s.so" | ||
250 | FILES_libstdc++ = "${base_libdir}/libstdc++.so.*" | ||
251 | FILES_libstdc++-dev = "\ | ||
252 | ${includedir}/c++/${PV} \ | ||
253 | ${base_libdir}/libstdc++.so" | ||
254 | FILES_libstdc++-staticdev = "\ | ||
255 | ${base_libdir}/libstdc++.a \ | ||
256 | ${base_libdir}/libsupc++.a \ | ||
257 | " | ||
258 | FILES_linux-libc-headers = "\ | ||
259 | ${includedir}/asm* \ | ||
260 | ${includedir}/linux \ | ||
261 | ${includedir}/mtd \ | ||
262 | ${includedir}/rdma \ | ||
263 | ${includedir}/scsi \ | ||
264 | ${includedir}/sound \ | ||
265 | ${includedir}/video \ | ||
266 | " | ||
267 | FILES_${PN} += "\ | ||
268 | ${libdir}/bin \ | ||
269 | ${libdir}/locale \ | ||
270 | ${libdir}/gconv/gconv-modules \ | ||
271 | ${datadir}/zoneinfo \ | ||
272 | ${base_libdir}/libcrypt*.so.* \ | ||
273 | ${base_libdir}/libcrypt-*.so \ | ||
274 | ${base_libdir}/libc.so.* \ | ||
275 | ${base_libdir}/libc-*.so \ | ||
276 | ${base_libdir}/libm.so.* \ | ||
277 | ${base_libdir}/libmemusage.so \ | ||
278 | ${base_libdir}/libm-*.so \ | ||
279 | ${base_libdir}/ld*.so.* \ | ||
280 | ${base_libdir}/ld-*.so \ | ||
281 | ${base_libdir}/libpthread*.so.* \ | ||
282 | ${base_libdir}/libpthread-*.so \ | ||
283 | ${base_libdir}/libresolv*.so.* \ | ||
284 | ${base_libdir}/libresolv-*.so \ | ||
285 | ${base_libdir}/librt*.so.* \ | ||
286 | ${base_libdir}/librt-*.so \ | ||
287 | ${base_libdir}/libutil*.so.* \ | ||
288 | ${base_libdir}/libutil-*.so \ | ||
289 | ${base_libdir}/libnsl*.so.* \ | ||
290 | ${base_libdir}/libnsl-*.so \ | ||
291 | ${base_libdir}/libnss_files*.so.* \ | ||
292 | ${base_libdir}/libnss_files-*.so \ | ||
293 | ${base_libdir}/libnss_compat*.so.* \ | ||
294 | ${base_libdir}/libnss_compat-*.so \ | ||
295 | ${base_libdir}/libnss_dns*.so.* \ | ||
296 | ${base_libdir}/libnss_dns-*.so \ | ||
297 | ${base_libdir}/libnss_nis*.so.* \ | ||
298 | ${base_libdir}/libnss_nisplus-*.so \ | ||
299 | ${base_libdir}/libnss_nisplus*.so.* \ | ||
300 | ${base_libdir}/libnss_nis-*.so \ | ||
301 | ${base_libdir}/libnss_hesiod*.so.* \ | ||
302 | ${base_libdir}/libnss_hesiod-*.so \ | ||
303 | ${base_libdir}/libdl*.so.* \ | ||
304 | ${base_libdir}/libdl-*.so \ | ||
305 | ${base_libdir}/libanl*.so.* \ | ||
306 | ${base_libdir}/libanl-*.so \ | ||
307 | ${base_libdir}/libBrokenLocale*.so.* \ | ||
308 | ${base_libdir}/libBrokenLocale-*.so \ | ||
309 | ${base_libdir}/libcidn*.so.* \ | ||
310 | ${base_libdir}/libcidn-*.so \ | ||
311 | ${base_libdir}/libthread_db*.so.* \ | ||
312 | ${base_libdir}/libthread_db-*.so \ | ||
313 | ${base_libdir}/libmemusage.so \ | ||
314 | ${base_libdir}/libSegFault.so \ | ||
315 | ${base_libdir}/libpcprofile.so \ | ||
316 | " | ||
317 | |||
318 | FILES_libstdc++ = "${base_libdir}/libstdc++.so.*" | ||
319 | FILES_libstdc++-dev = "\ | ||
320 | ${includedir}/c++/ \ | ||
321 | ${base_libdir}/libstdc++.so \ | ||
322 | ${base_libdir}/libstdc++.la \ | ||
323 | ${base_libdir}/libsupc++.la" | ||
324 | FILES_libstdc++-staticdev = "\ | ||
325 | ${base_libdir}/libstdc++.a \ | ||
326 | ${base_libdir}/libsupc++.a" | ||
327 | |||
328 | FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" | ||
329 | |||
330 | FILES_libssp = "${base_libdir}/libssp.so.*" | ||
331 | FILES_libssp-dev = " \ | ||
332 | ${base_libdir}/libssp*.so \ | ||
333 | ${base_libdir}/libssp*_nonshared.a \ | ||
334 | ${base_libdir}/libssp*.la \ | ||
335 | ${base_libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp" | ||
336 | FILES_libssp-staticdev = " \ | ||
337 | ${base_libdir}/libssp*.a" | ||
338 | |||
339 | FILES_libgfortran = "${base_libdir}/libgfortran.so.*" | ||
340 | FILES_libgfortran-dev = " \ | ||
341 | ${base_libdir}/libgfortran.so" | ||
342 | FILES_libgfortran-staticdev = " \ | ||
343 | ${base_libdir}/libgfortran.a \ | ||
344 | ${base_libdir}/libgfortranbegin.a" | ||
345 | |||
346 | FILES_libmudflap = "${base_libdir}/libmudflap*.so.*" | ||
347 | FILES_libmudflap-dev = "\ | ||
348 | ${base_libdir}/libmudflap*.so \ | ||
349 | ${base_libdir}/libmudflap*.a \ | ||
350 | ${base_libdir}/libmudflap*.la" | ||
351 | |||
352 | FILES_libitm = "${base_libdir}/libitm*${SOLIBS}" | ||
353 | FILES_libitm-dev = "\ | ||
354 | ${base_libdir}/libitm*${SOLIBSDEV} \ | ||
355 | ${base_libdir}/libitm*.la \ | ||
356 | ${base_libdir}/libitm.spec \ | ||
357 | " | ||
358 | FILES_libitm-staticdev = "\ | ||
359 | ${base_libdir}/libitm*.a \ | ||
360 | " | ||
361 | |||
362 | FILES_libgomp = "${base_libdir}/libgomp*${SOLIBS}" | ||
363 | FILES_libgomp-dev = "\ | ||
364 | ${base_libdir}/libgomp*${SOLIBSDEV} \ | ||
365 | ${base_libdir}/libgomp*.la \ | ||
366 | ${base_libdir}/libgomp.spec \ | ||
367 | ${base_libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \ | ||
368 | " | ||
369 | FILES_libgomp-staticdev = "\ | ||
370 | ${base_libdir}/libgomp*.a \ | ||
371 | " | ||
372 | ELT_VER_MAIN ??= "" | ||
373 | |||
374 | python () { | ||
375 | if not d.getVar("ELT_VER_MAIN"): | ||
376 | raise bb.parse.SkipPackage("External Linaro toolchain not configured (ELT_VER_MAIN not set).") | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/files/SUPPORTED b/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/files/SUPPORTED new file mode 100644 index 0000000..9615075 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/files/SUPPORTED | |||
@@ -0,0 +1 @@ | |||
POSIX | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-canadian_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-canadian_linaro-4.8.bb new file mode 100644 index 0000000..81c4700 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-canadian_linaro-4.8.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/gcc-cross-canadian_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-canadian_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-canadian_linaro-4.9.bb new file mode 100644 index 0000000..c473b6f --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-canadian_linaro-4.9.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/gcc-cross-canadian_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-initial_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-initial_linaro-4.8.bb new file mode 100644 index 0000000..c13cecf --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-initial_linaro-4.8.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | BASEPV = "4.8" | ||
2 | PV = "linaro-${BASEPV}" | ||
3 | require recipes-devtools/gcc/gcc-cross-initial_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-initial_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-initial_linaro-4.9.bb new file mode 100644 index 0000000..3a7abea --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross-initial_linaro-4.9.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | BASEPV = "4.9" | ||
2 | PV = "linaro-${BASEPV}" | ||
3 | require recipes-devtools/gcc/gcc-cross-initial_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross_linaro-4.8.bb new file mode 100644 index 0000000..05de58b --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross_linaro-4.8.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | BASEPV = "4.8" | ||
2 | PV = "linaro-${BASEPV}" | ||
3 | require recipes-devtools/gcc/gcc-cross_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross_linaro-4.9.bb new file mode 100644 index 0000000..cc76e36 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-cross_linaro-4.9.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | BASEPV = "4.9" | ||
2 | PV = "linaro-${BASEPV}" | ||
3 | require recipes-devtools/gcc/gcc-cross_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.8.bb new file mode 100644 index 0000000..09276a2 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.8.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/gcc-crosssdk-initial_${BASEPV}.bb | ||
3 | |||
4 | EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} " | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.9.bb new file mode 100644 index 0000000..eb3719e --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.9.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/gcc-crosssdk-initial_${BASEPV}.bb | ||
3 | |||
4 | EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} " | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk_linaro-4.8.bb new file mode 100644 index 0000000..e622a48 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk_linaro-4.8.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/gcc-crosssdk_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk_linaro-4.9.bb new file mode 100644 index 0000000..5c3ab13 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-crosssdk_linaro-4.9.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/gcc-crosssdk_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc new file mode 100644 index 0000000..76660d3 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc | |||
@@ -0,0 +1,73 @@ | |||
1 | require recipes-devtools/gcc/gcc-4.8.inc | ||
2 | PV = "linaro-${BASEPV}" | ||
3 | |||
4 | MMYY = "14.04" | ||
5 | RELEASE = "20${MMYY}" | ||
6 | PR = "r${RELEASE}" | ||
7 | BINV = "4.8.3" | ||
8 | |||
9 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/gcc-${PV}' ], d)}" | ||
10 | FILESPATH_append := ":${COREBASE}/meta/recipes-devtools/gcc/gcc-4.8" | ||
11 | |||
12 | SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \ | ||
13 | file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ | ||
14 | file://0002-uclibc-conf.patch \ | ||
15 | file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \ | ||
16 | file://0004-uclibc-locale.patch \ | ||
17 | file://0005-uclibc-locale-no__x.patch \ | ||
18 | file://0006-uclibc-locale-wchar_fix.patch \ | ||
19 | file://0007-uclibc-locale-update.patch \ | ||
20 | file://0008-missing-execinfo_h.patch \ | ||
21 | file://0009-c99-snprintf.patch \ | ||
22 | file://0010-c99-complex-ugly-hack.patch \ | ||
23 | file://0011-index_macro.patch \ | ||
24 | file://0012-libmudflap-susv3-legacy.patch \ | ||
25 | file://0013-libstdc-namespace.patch \ | ||
26 | file://0014-sh-pr24836.patch \ | ||
27 | file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch;apply=no \ | ||
28 | file://0016-gcc-poison-system-directories.patch \ | ||
29 | file://0017-gcc-poison-dir-extend.patch \ | ||
30 | file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ | ||
31 | file://0019-64-bit-multilib-hack.patch \ | ||
32 | file://0020-optional-libstdc.patch \ | ||
33 | file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ | ||
34 | file://0022-COLLECT_GCC_OPTIONS.patch \ | ||
35 | file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ | ||
36 | file://0024-PR-target-32219.patch \ | ||
37 | file://0025-fortran-cross-compile-hack.patch \ | ||
38 | file://0026-libgcc-sjlj-check.patch \ | ||
39 | file://0027-cpp-honor-sysroot.patch \ | ||
40 | file://0028-MIPS64-Default-to-N64-ABI.patch \ | ||
41 | file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ | ||
42 | file://0030-gcc-Fix-argument-list-too-long-error.patch \ | ||
43 | file://0031-Disable-sdt.patch \ | ||
44 | file://0032-libtool.patch \ | ||
45 | file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ | ||
46 | file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ | ||
47 | file://0035-wcast-qual-PR-55383.patch \ | ||
48 | file://0037-gcc-4.8-PR56797.patch \ | ||
49 | file://0038-gcc-4.8-build-args.patch;apply=no \ | ||
50 | file://0039-gcc-4.8-PR57717.patch;apply=no \ | ||
51 | file://0040-fix-g++-sysroot.patch \ | ||
52 | file://0041-libtool-avoid-libdir.patch \ | ||
53 | file://0042-pr57748.patch \ | ||
54 | file://0043-cpp.patch \ | ||
55 | file://0044-gengtypes.patch \ | ||
56 | file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \ | ||
57 | file://0046-libatomic-deptracking.patch \ | ||
58 | file://0047-repomembug.patch \ | ||
59 | file://0048-PR58854_fix_arm_apcs_epilogue.patch;apply=no \ | ||
60 | file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ | ||
61 | file://0050-PR-target-58595.patch \ | ||
62 | file://use-lib-for-aarch64.patch \ | ||
63 | file://0001-AArch64-Define-BE-loader-name.patch \ | ||
64 | file://AArch64-Define-BE-loader-name-default-be.patch \ | ||
65 | file://add-install-ptest-to-Makefile.patch \ | ||
66 | file://run-ptest \ | ||
67 | " | ||
68 | |||
69 | SRC_URI[md5sum] = "5ba2f3a449b1658ccc09d27cc7ab3c03" | ||
70 | SRC_URI[sha256sum] = "9a72b00f50265fc6ea92e95383fa0b25450cf15fc685a33a67ad15e10a008808" | ||
71 | |||
72 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}-${RELEASE}" | ||
73 | B = "${WORKDIR}/gcc-${PV}-${RELEASE}/build.${HOST_SYS}.${TARGET_SYS}" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch new file mode 100644 index 0000000..b529d6d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 33a9ec1309cf9e4c8b64f289acf509c81d5bb3f8 Mon Sep 17 00:00:00 2001 | ||
2 | From: mshawcroft <mshawcroft@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Mon, 20 Jan 2014 17:41:54 +0000 | ||
4 | Subject: [PATCH] [AArch64] Define BE loader name. | ||
5 | |||
6 | Backport from mainline | ||
7 | 2014-03-19 Victor Kamensky <victor.kamensky@linaro.org> | ||
8 | |||
9 | 2014-01-20 Marcus Shawcroft <marcus.shawcroft@arm.com> | ||
10 | |||
11 | * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER): Expand | ||
12 | loader name using mbig-endian. | ||
13 | (LINUX_TARGET_LINK_SPEC): Pass linker -m flag. | ||
14 | |||
15 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206845 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
16 | --- | ||
17 | gcc/config/aarch64/aarch64-linux.h | 5 +++-- | ||
18 | 2 files changed, 9 insertions(+), 2 deletions(-) | ||
19 | |||
20 | Index: gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h | ||
21 | =================================================================== | ||
22 | --- gcc-linaro-4.8-2014.03.orig/gcc/config/aarch64/aarch64-linux.h | ||
23 | +++ gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h | ||
24 | @@ -21,7 +21,7 @@ | ||
25 | #ifndef GCC_AARCH64_LINUX_H | ||
26 | #define GCC_AARCH64_LINUX_H | ||
27 | |||
28 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1" | ||
29 | +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" | ||
30 | |||
31 | #define CPP_SPEC "%{pthread:-D_REENTRANT}" | ||
32 | |||
33 | @@ -32,7 +32,8 @@ | ||
34 | %{rdynamic:-export-dynamic} \ | ||
35 | -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ | ||
36 | -X \ | ||
37 | - %{mbig-endian:-EB} %{mlittle-endian:-EL}" | ||
38 | + %{mbig-endian:-EB} %{mlittle-endian:-EL} \ | ||
39 | + -maarch64linux%{mbig-endian:b}" | ||
40 | |||
41 | #define LINK_SPEC LINUX_TARGET_LINK_SPEC | ||
42 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 0000000..fe564c1 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From bf3d96ae58fa180b8b468d25dc2e0209daca2751 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:37:11 +0400 | ||
4 | Subject: [PATCH 01/35] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | --- | ||
10 | configure | 2 +- | ||
11 | configure.ac | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/configure b/configure | ||
15 | index f16d506..d260ee2 100755 | ||
16 | --- a/configure | ||
17 | +++ b/configure | ||
18 | @@ -7490,7 +7490,7 @@ fi | ||
19 | # for target_alias and gcc doesn't manage it consistently. | ||
20 | target_configargs="--cache-file=./config.cache ${target_configargs}" | ||
21 | |||
22 | -FLAGS_FOR_TARGET= | ||
23 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
24 | case " $target_configdirs " in | ||
25 | *" newlib "*) | ||
26 | case " $target_configargs " in | ||
27 | diff --git a/configure.ac b/configure.ac | ||
28 | index d5d609b..b5beb30 100644 | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -2878,7 +2878,7 @@ fi | ||
32 | # for target_alias and gcc doesn't manage it consistently. | ||
33 | target_configargs="--cache-file=./config.cache ${target_configargs}" | ||
34 | |||
35 | -FLAGS_FOR_TARGET= | ||
36 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
37 | case " $target_configdirs " in | ||
38 | *" newlib "*) | ||
39 | case " $target_configargs " in | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0002-uclibc-conf.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0002-uclibc-conf.patch new file mode 100644 index 0000000..dda3b10 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0002-uclibc-conf.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From d030973c872c00d916921d84deee0af2c0d38081 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:38:25 +0400 | ||
4 | Subject: [PATCH 02/35] uclibc-conf | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | contrib/regression/objs-gcc.sh | 4 ++++ | ||
11 | libjava/classpath/ltconfig | 4 ++-- | ||
12 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh | ||
15 | index 60b0497..6dc7ead 100755 | ||
16 | --- a/contrib/regression/objs-gcc.sh | ||
17 | +++ b/contrib/regression/objs-gcc.sh | ||
18 | @@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] | ||
19 | then | ||
20 | make all-gdb all-dejagnu all-ld || exit 1 | ||
21 | make install-gdb install-dejagnu install-ld || exit 1 | ||
22 | +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] | ||
23 | + then | ||
24 | + make all-gdb all-dejagnu all-ld || exit 1 | ||
25 | + make install-gdb install-dejagnu install-ld || exit 1 | ||
26 | elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then | ||
27 | make bootstrap || exit 1 | ||
28 | make install || exit 1 | ||
29 | diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig | ||
30 | index 743d951..ae4ea60 100755 | ||
31 | --- a/libjava/classpath/ltconfig | ||
32 | +++ b/libjava/classpath/ltconfig | ||
33 | @@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | ||
34 | |||
35 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | ||
36 | case $host_os in | ||
37 | -linux-gnu*) ;; | ||
38 | +linux-gnu*|linux-uclibc*) ;; | ||
39 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | ||
40 | esac | ||
41 | |||
42 | @@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) | ||
43 | ;; | ||
44 | |||
45 | # This must be Linux ELF. | ||
46 | -linux-gnu*) | ||
47 | +linux*) | ||
48 | version_type=linux | ||
49 | need_lib_prefix=no | ||
50 | need_version=no | ||
51 | -- | ||
52 | 1.7.10.4 | ||
53 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch new file mode 100644 index 0000000..7098e99 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From d2d9dd756c4356d14dd7ae003856344cb4f37985 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:40:12 +0400 | ||
4 | Subject: [PATCH 03/35] gcc-uclibc-locale-ctype_touplow_t | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++ | ||
11 | libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++ | ||
12 | libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++ | ||
13 | 3 files changed, 23 insertions(+) | ||
14 | |||
15 | diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc | ||
16 | index 0d309a5..f2f1e1f 100644 | ||
17 | --- a/libstdc++-v3/config/locale/generic/c_locale.cc | ||
18 | +++ b/libstdc++-v3/config/locale/generic/c_locale.cc | ||
19 | @@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION | ||
20 | #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT | ||
21 | #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ | ||
22 | extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) | ||
23 | +#ifdef __UCLIBC__ | ||
24 | +// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* | ||
25 | +_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); | ||
26 | +#else | ||
27 | _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); | ||
28 | +#endif | ||
29 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT | ||
30 | diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h | ||
31 | index b5fd989..3da9a5d 100644 | ||
32 | --- a/libstdc++-v3/config/locale/generic/c_locale.h | ||
33 | +++ b/libstdc++-v3/config/locale/generic/c_locale.h | ||
34 | @@ -40,13 +40,22 @@ | ||
35 | |||
36 | #include <clocale> | ||
37 | |||
38 | +#ifdef __UCLIBC__ | ||
39 | +#include <features.h> | ||
40 | +#include <ctype.h> | ||
41 | +#endif | ||
42 | + | ||
43 | #define _GLIBCXX_NUM_CATEGORIES 0 | ||
44 | |||
45 | namespace std _GLIBCXX_VISIBILITY(default) | ||
46 | { | ||
47 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
48 | |||
49 | +#ifdef __UCLIBC__ | ||
50 | + typedef __ctype_touplow_t* __c_locale; | ||
51 | +#else | ||
52 | typedef int* __c_locale; | ||
53 | +#endif | ||
54 | |||
55 | // Convert numeric value of type double and long double to string and | ||
56 | // return length of string. If vsnprintf is available use it, otherwise | ||
57 | diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
58 | index 2d8e978..14eb08f 100644 | ||
59 | --- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
60 | +++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
61 | @@ -33,6 +33,11 @@ | ||
62 | |||
63 | // Information as gleaned from /usr/include/ctype.h | ||
64 | |||
65 | +#ifdef __UCLIBC__ | ||
66 | +#include <features.h> | ||
67 | +#include <ctype.h> | ||
68 | +#endif | ||
69 | + | ||
70 | namespace std _GLIBCXX_VISIBILITY(default) | ||
71 | { | ||
72 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
73 | @@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
74 | struct ctype_base | ||
75 | { | ||
76 | // Non-standard typedefs. | ||
77 | +#ifdef __UCLIBC__ | ||
78 | + typedef const __ctype_touplow_t* __to_type; | ||
79 | +#else | ||
80 | typedef const int* __to_type; | ||
81 | +#endif | ||
82 | |||
83 | // NB: Offsets into ctype<char>::_M_table force a particular size | ||
84 | // on the mask type. Because of this, we don't use an enum. | ||
85 | -- | ||
86 | 1.7.10.4 | ||
87 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0004-uclibc-locale.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0004-uclibc-locale.patch new file mode 100644 index 0000000..49f5f33 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0004-uclibc-locale.patch | |||
@@ -0,0 +1,2862 @@ | |||
1 | From a55c751a449c2cbf0b3fcc07aab1b86bf9661510 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:41:39 +0400 | ||
4 | Subject: [PATCH 04/35] uclibc-locale | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/acinclude.m4 | 37 ++ | ||
11 | .../config/locale/uclibc/c++locale_internal.h | 63 ++ | ||
12 | libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++ | ||
13 | libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++ | ||
14 | .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++ | ||
15 | .../config/locale/uclibc/collate_members.cc | 80 +++ | ||
16 | libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++ | ||
17 | .../config/locale/uclibc/messages_members.cc | 100 +++ | ||
18 | .../config/locale/uclibc/messages_members.h | 118 ++++ | ||
19 | .../config/locale/uclibc/monetary_members.cc | 692 ++++++++++++++++++++ | ||
20 | .../config/locale/uclibc/numeric_members.cc | 160 +++++ | ||
21 | libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++ | ||
22 | libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++ | ||
23 | libstdc++-v3/configure | 75 +++ | ||
24 | libstdc++-v3/include/c_compatibility/wchar.h | 2 + | ||
25 | libstdc++-v3/include/c_std/cwchar | 2 + | ||
26 | 16 files changed, 2688 insertions(+) | ||
27 | create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
28 | create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
29 | create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h | ||
30 | create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
31 | create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
32 | create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
33 | create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
34 | create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h | ||
35 | create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
36 | create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
37 | create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc | ||
38 | create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h | ||
39 | |||
40 | diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 | ||
41 | index 0871a6a..326d7ef 100644 | ||
42 | --- a/libstdc++-v3/acinclude.m4 | ||
43 | +++ b/libstdc++-v3/acinclude.m4 | ||
44 | @@ -1905,6 +1905,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ | ||
45 | # Default to "generic". | ||
46 | if test $enable_clocale_flag = auto; then | ||
47 | case ${target_os} in | ||
48 | + *-uclibc*) | ||
49 | + enable_clocale_flag=uclibc | ||
50 | + ;; | ||
51 | linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) | ||
52 | enable_clocale_flag=gnu | ||
53 | ;; | ||
54 | @@ -2069,6 +2072,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ | ||
55 | CTIME_CC=config/locale/generic/time_members.cc | ||
56 | CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h | ||
57 | ;; | ||
58 | + uclibc) | ||
59 | + AC_MSG_RESULT(uclibc) | ||
60 | + | ||
61 | + # Declare intention to use gettext, and add support for specific | ||
62 | + # languages. | ||
63 | + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT | ||
64 | + ALL_LINGUAS="de fr" | ||
65 | + | ||
66 | + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. | ||
67 | + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) | ||
68 | + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then | ||
69 | + USE_NLS=yes | ||
70 | + fi | ||
71 | + # Export the build objects. | ||
72 | + for ling in $ALL_LINGUAS; do \ | ||
73 | + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ | ||
74 | + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ | ||
75 | + done | ||
76 | + AC_SUBST(glibcxx_MOFILES) | ||
77 | + AC_SUBST(glibcxx_POFILES) | ||
78 | + | ||
79 | + CLOCALE_H=config/locale/uclibc/c_locale.h | ||
80 | + CLOCALE_CC=config/locale/uclibc/c_locale.cc | ||
81 | + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc | ||
82 | + CCOLLATE_CC=config/locale/uclibc/collate_members.cc | ||
83 | + CCTYPE_CC=config/locale/uclibc/ctype_members.cc | ||
84 | + CMESSAGES_H=config/locale/uclibc/messages_members.h | ||
85 | + CMESSAGES_CC=config/locale/uclibc/messages_members.cc | ||
86 | + CMONEY_CC=config/locale/uclibc/monetary_members.cc | ||
87 | + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc | ||
88 | + CTIME_H=config/locale/uclibc/time_members.h | ||
89 | + CTIME_CC=config/locale/uclibc/time_members.cc | ||
90 | + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h | ||
91 | + ;; | ||
92 | esac | ||
93 | |||
94 | # This is where the testsuite looks for locale catalogs, using the | ||
95 | diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
96 | new file mode 100644 | ||
97 | index 0000000..2ae3e4a | ||
98 | --- /dev/null | ||
99 | +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
100 | @@ -0,0 +1,63 @@ | ||
101 | +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- | ||
102 | + | ||
103 | +// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. | ||
104 | +// | ||
105 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
106 | +// software; you can redistribute it and/or modify it under the | ||
107 | +// terms of the GNU General Public License as published by the | ||
108 | +// Free Software Foundation; either version 2, or (at your option) | ||
109 | +// any later version. | ||
110 | + | ||
111 | +// This library is distributed in the hope that it will be useful, | ||
112 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
113 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
114 | +// GNU General Public License for more details. | ||
115 | + | ||
116 | +// You should have received a copy of the GNU General Public License along | ||
117 | +// with this library; see the file COPYING. If not, write to the Free | ||
118 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
119 | +// USA. | ||
120 | + | ||
121 | +// As a special exception, you may use this file as part of a free software | ||
122 | +// library without restriction. Specifically, if other files instantiate | ||
123 | +// templates or use macros or inline functions from this file, or you compile | ||
124 | +// this file and link it with other files to produce an executable, this | ||
125 | +// file does not by itself cause the resulting executable to be covered by | ||
126 | +// the GNU General Public License. This exception does not however | ||
127 | +// invalidate any other reasons why the executable file might be covered by | ||
128 | +// the GNU General Public License. | ||
129 | + | ||
130 | +// Written by Jakub Jelinek <jakub@redhat.com> | ||
131 | + | ||
132 | +#include <bits/c++config.h> | ||
133 | +#include <clocale> | ||
134 | + | ||
135 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
136 | +#warning clean this up | ||
137 | +#endif | ||
138 | + | ||
139 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
140 | + | ||
141 | +extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; | ||
142 | +extern "C" __typeof(strcoll_l) __strcoll_l; | ||
143 | +extern "C" __typeof(strftime_l) __strftime_l; | ||
144 | +extern "C" __typeof(strtod_l) __strtod_l; | ||
145 | +extern "C" __typeof(strtof_l) __strtof_l; | ||
146 | +extern "C" __typeof(strtold_l) __strtold_l; | ||
147 | +extern "C" __typeof(strxfrm_l) __strxfrm_l; | ||
148 | +extern "C" __typeof(newlocale) __newlocale; | ||
149 | +extern "C" __typeof(freelocale) __freelocale; | ||
150 | +extern "C" __typeof(duplocale) __duplocale; | ||
151 | +extern "C" __typeof(uselocale) __uselocale; | ||
152 | + | ||
153 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
154 | +extern "C" __typeof(iswctype_l) __iswctype_l; | ||
155 | +extern "C" __typeof(towlower_l) __towlower_l; | ||
156 | +extern "C" __typeof(towupper_l) __towupper_l; | ||
157 | +extern "C" __typeof(wcscoll_l) __wcscoll_l; | ||
158 | +extern "C" __typeof(wcsftime_l) __wcsftime_l; | ||
159 | +extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; | ||
160 | +extern "C" __typeof(wctype_l) __wctype_l; | ||
161 | +#endif | ||
162 | + | ||
163 | +#endif // GLIBC 2.3 and later | ||
164 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
165 | new file mode 100644 | ||
166 | index 0000000..5081dc1 | ||
167 | --- /dev/null | ||
168 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
169 | @@ -0,0 +1,160 @@ | ||
170 | +// Wrapper for underlying C-language localization -*- C++ -*- | ||
171 | + | ||
172 | +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. | ||
173 | +// | ||
174 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
175 | +// software; you can redistribute it and/or modify it under the | ||
176 | +// terms of the GNU General Public License as published by the | ||
177 | +// Free Software Foundation; either version 2, or (at your option) | ||
178 | +// any later version. | ||
179 | + | ||
180 | +// This library is distributed in the hope that it will be useful, | ||
181 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
182 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
183 | +// GNU General Public License for more details. | ||
184 | + | ||
185 | +// You should have received a copy of the GNU General Public License along | ||
186 | +// with this library; see the file COPYING. If not, write to the Free | ||
187 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
188 | +// USA. | ||
189 | + | ||
190 | +// As a special exception, you may use this file as part of a free software | ||
191 | +// library without restriction. Specifically, if other files instantiate | ||
192 | +// templates or use macros or inline functions from this file, or you compile | ||
193 | +// this file and link it with other files to produce an executable, this | ||
194 | +// file does not by itself cause the resulting executable to be covered by | ||
195 | +// the GNU General Public License. This exception does not however | ||
196 | +// invalidate any other reasons why the executable file might be covered by | ||
197 | +// the GNU General Public License. | ||
198 | + | ||
199 | +// | ||
200 | +// ISO C++ 14882: 22.8 Standard locale categories. | ||
201 | +// | ||
202 | + | ||
203 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
204 | + | ||
205 | +#include <cerrno> // For errno | ||
206 | +#include <locale> | ||
207 | +#include <stdexcept> | ||
208 | +#include <langinfo.h> | ||
209 | +#include <bits/c++locale_internal.h> | ||
210 | + | ||
211 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
212 | +#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) | ||
213 | +#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) | ||
214 | +#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) | ||
215 | +#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) | ||
216 | +#define __strtof_l(S, E, L) strtof((S), (E)) | ||
217 | +#define __strtod_l(S, E, L) strtod((S), (E)) | ||
218 | +#define __strtold_l(S, E, L) strtold((S), (E)) | ||
219 | +#warning should dummy __newlocale check for C|POSIX ? | ||
220 | +#define __newlocale(a, b, c) NULL | ||
221 | +#define __freelocale(a) ((void)0) | ||
222 | +#define __duplocale(a) __c_locale() | ||
223 | +#endif | ||
224 | + | ||
225 | +namespace std | ||
226 | +{ | ||
227 | + template<> | ||
228 | + void | ||
229 | + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, | ||
230 | + const __c_locale& __cloc) | ||
231 | + { | ||
232 | + if (!(__err & ios_base::failbit)) | ||
233 | + { | ||
234 | + char* __sanity; | ||
235 | + errno = 0; | ||
236 | + float __f = __strtof_l(__s, &__sanity, __cloc); | ||
237 | + if (__sanity != __s && errno != ERANGE) | ||
238 | + __v = __f; | ||
239 | + else | ||
240 | + __err |= ios_base::failbit; | ||
241 | + } | ||
242 | + } | ||
243 | + | ||
244 | + template<> | ||
245 | + void | ||
246 | + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, | ||
247 | + const __c_locale& __cloc) | ||
248 | + { | ||
249 | + if (!(__err & ios_base::failbit)) | ||
250 | + { | ||
251 | + char* __sanity; | ||
252 | + errno = 0; | ||
253 | + double __d = __strtod_l(__s, &__sanity, __cloc); | ||
254 | + if (__sanity != __s && errno != ERANGE) | ||
255 | + __v = __d; | ||
256 | + else | ||
257 | + __err |= ios_base::failbit; | ||
258 | + } | ||
259 | + } | ||
260 | + | ||
261 | + template<> | ||
262 | + void | ||
263 | + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, | ||
264 | + const __c_locale& __cloc) | ||
265 | + { | ||
266 | + if (!(__err & ios_base::failbit)) | ||
267 | + { | ||
268 | + char* __sanity; | ||
269 | + errno = 0; | ||
270 | + long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
271 | + if (__sanity != __s && errno != ERANGE) | ||
272 | + __v = __ld; | ||
273 | + else | ||
274 | + __err |= ios_base::failbit; | ||
275 | + } | ||
276 | + } | ||
277 | + | ||
278 | + void | ||
279 | + locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, | ||
280 | + __c_locale __old) | ||
281 | + { | ||
282 | + __cloc = __newlocale(1 << LC_ALL, __s, __old); | ||
283 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
284 | + if (!__cloc) | ||
285 | + { | ||
286 | + // This named locale is not supported by the underlying OS. | ||
287 | + __throw_runtime_error(__N("locale::facet::_S_create_c_locale " | ||
288 | + "name not valid")); | ||
289 | + } | ||
290 | +#endif | ||
291 | + } | ||
292 | + | ||
293 | + void | ||
294 | + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) | ||
295 | + { | ||
296 | + if (_S_get_c_locale() != __cloc) | ||
297 | + __freelocale(__cloc); | ||
298 | + } | ||
299 | + | ||
300 | + __c_locale | ||
301 | + locale::facet::_S_clone_c_locale(__c_locale& __cloc) | ||
302 | + { return __duplocale(__cloc); } | ||
303 | +} // namespace std | ||
304 | + | ||
305 | +namespace __gnu_cxx | ||
306 | +{ | ||
307 | + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = | ||
308 | + { | ||
309 | + "LC_CTYPE", | ||
310 | + "LC_NUMERIC", | ||
311 | + "LC_TIME", | ||
312 | + "LC_COLLATE", | ||
313 | + "LC_MONETARY", | ||
314 | + "LC_MESSAGES", | ||
315 | +#if _GLIBCXX_NUM_CATEGORIES != 0 | ||
316 | + "LC_PAPER", | ||
317 | + "LC_NAME", | ||
318 | + "LC_ADDRESS", | ||
319 | + "LC_TELEPHONE", | ||
320 | + "LC_MEASUREMENT", | ||
321 | + "LC_IDENTIFICATION" | ||
322 | +#endif | ||
323 | + }; | ||
324 | +} | ||
325 | + | ||
326 | +namespace std | ||
327 | +{ | ||
328 | + const char* const* const locale::_S_categories = __gnu_cxx::category_names; | ||
329 | +} // namespace std | ||
330 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
331 | new file mode 100644 | ||
332 | index 0000000..da07c1f | ||
333 | --- /dev/null | ||
334 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
335 | @@ -0,0 +1,117 @@ | ||
336 | +// Wrapper for underlying C-language localization -*- C++ -*- | ||
337 | + | ||
338 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
339 | +// | ||
340 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
341 | +// software; you can redistribute it and/or modify it under the | ||
342 | +// terms of the GNU General Public License as published by the | ||
343 | +// Free Software Foundation; either version 2, or (at your option) | ||
344 | +// any later version. | ||
345 | + | ||
346 | +// This library is distributed in the hope that it will be useful, | ||
347 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
348 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
349 | +// GNU General Public License for more details. | ||
350 | + | ||
351 | +// You should have received a copy of the GNU General Public License along | ||
352 | +// with this library; see the file COPYING. If not, write to the Free | ||
353 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
354 | +// USA. | ||
355 | + | ||
356 | +// As a special exception, you may use this file as part of a free software | ||
357 | +// library without restriction. Specifically, if other files instantiate | ||
358 | +// templates or use macros or inline functions from this file, or you compile | ||
359 | +// this file and link it with other files to produce an executable, this | ||
360 | +// file does not by itself cause the resulting executable to be covered by | ||
361 | +// the GNU General Public License. This exception does not however | ||
362 | +// invalidate any other reasons why the executable file might be covered by | ||
363 | +// the GNU General Public License. | ||
364 | + | ||
365 | +// | ||
366 | +// ISO C++ 14882: 22.8 Standard locale categories. | ||
367 | +// | ||
368 | + | ||
369 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
370 | + | ||
371 | +#ifndef _C_LOCALE_H | ||
372 | +#define _C_LOCALE_H 1 | ||
373 | + | ||
374 | +#pragma GCC system_header | ||
375 | + | ||
376 | +#include <cstring> // get std::strlen | ||
377 | +#include <cstdio> // get std::snprintf or std::sprintf | ||
378 | +#include <clocale> | ||
379 | +#include <langinfo.h> // For codecvt | ||
380 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
381 | +#warning fix this | ||
382 | +#endif | ||
383 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
384 | +#include <iconv.h> // For codecvt using iconv, iconv_t | ||
385 | +#endif | ||
386 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
387 | +#include <libintl.h> // For messages | ||
388 | +#endif | ||
389 | + | ||
390 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
391 | +#warning what is _GLIBCXX_C_LOCALE_GNU for | ||
392 | +#endif | ||
393 | +#define _GLIBCXX_C_LOCALE_GNU 1 | ||
394 | + | ||
395 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
396 | +#warning fix categories | ||
397 | +#endif | ||
398 | +// #define _GLIBCXX_NUM_CATEGORIES 6 | ||
399 | +#define _GLIBCXX_NUM_CATEGORIES 0 | ||
400 | + | ||
401 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
402 | +namespace __gnu_cxx | ||
403 | +{ | ||
404 | + extern "C" __typeof(uselocale) __uselocale; | ||
405 | +} | ||
406 | +#endif | ||
407 | + | ||
408 | +namespace std | ||
409 | +{ | ||
410 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
411 | + typedef __locale_t __c_locale; | ||
412 | +#else | ||
413 | + typedef int* __c_locale; | ||
414 | +#endif | ||
415 | + | ||
416 | + // Convert numeric value of type _Tv to string and return length of | ||
417 | + // string. If snprintf is available use it, otherwise fall back to | ||
418 | + // the unsafe sprintf which, in general, can be dangerous and should | ||
419 | + // be avoided. | ||
420 | + template<typename _Tv> | ||
421 | + int | ||
422 | + __convert_from_v(char* __out, | ||
423 | + const int __size __attribute__ ((__unused__)), | ||
424 | + const char* __fmt, | ||
425 | +#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
426 | + _Tv __v, const __c_locale& __cloc, int __prec) | ||
427 | + { | ||
428 | + __c_locale __old = __gnu_cxx::__uselocale(__cloc); | ||
429 | +#else | ||
430 | + _Tv __v, const __c_locale&, int __prec) | ||
431 | + { | ||
432 | +# ifdef __UCLIBC_HAS_LOCALE__ | ||
433 | + char* __old = std::setlocale(LC_ALL, NULL); | ||
434 | + char* __sav = new char[std::strlen(__old) + 1]; | ||
435 | + std::strcpy(__sav, __old); | ||
436 | + std::setlocale(LC_ALL, "C"); | ||
437 | +# endif | ||
438 | +#endif | ||
439 | + | ||
440 | + const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | ||
441 | + | ||
442 | +#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
443 | + __gnu_cxx::__uselocale(__old); | ||
444 | +#elif defined __UCLIBC_HAS_LOCALE__ | ||
445 | + std::setlocale(LC_ALL, __sav); | ||
446 | + delete [] __sav; | ||
447 | +#endif | ||
448 | + return __ret; | ||
449 | + } | ||
450 | +} | ||
451 | + | ||
452 | +#endif | ||
453 | diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
454 | new file mode 100644 | ||
455 | index 0000000..64aa962 | ||
456 | --- /dev/null | ||
457 | +++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
458 | @@ -0,0 +1,308 @@ | ||
459 | +// std::codecvt implementation details, GNU version -*- C++ -*- | ||
460 | + | ||
461 | +// Copyright (C) 2002, 2003 Free Software Foundation, Inc. | ||
462 | +// | ||
463 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
464 | +// software; you can redistribute it and/or modify it under the | ||
465 | +// terms of the GNU General Public License as published by the | ||
466 | +// Free Software Foundation; either version 2, or (at your option) | ||
467 | +// any later version. | ||
468 | + | ||
469 | +// This library is distributed in the hope that it will be useful, | ||
470 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
471 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
472 | +// GNU General Public License for more details. | ||
473 | + | ||
474 | +// You should have received a copy of the GNU General Public License along | ||
475 | +// with this library; see the file COPYING. If not, write to the Free | ||
476 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
477 | +// USA. | ||
478 | + | ||
479 | +// As a special exception, you may use this file as part of a free software | ||
480 | +// library without restriction. Specifically, if other files instantiate | ||
481 | +// templates or use macros or inline functions from this file, or you compile | ||
482 | +// this file and link it with other files to produce an executable, this | ||
483 | +// file does not by itself cause the resulting executable to be covered by | ||
484 | +// the GNU General Public License. This exception does not however | ||
485 | +// invalidate any other reasons why the executable file might be covered by | ||
486 | +// the GNU General Public License. | ||
487 | + | ||
488 | +// | ||
489 | +// ISO C++ 14882: 22.2.1.5 - Template class codecvt | ||
490 | +// | ||
491 | + | ||
492 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
493 | + | ||
494 | +#include <locale> | ||
495 | +#include <cstdlib> // For MB_CUR_MAX | ||
496 | +#include <climits> // For MB_LEN_MAX | ||
497 | +#include <bits/c++locale_internal.h> | ||
498 | + | ||
499 | +namespace std | ||
500 | +{ | ||
501 | + // Specializations. | ||
502 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
503 | + codecvt_base::result | ||
504 | + codecvt<wchar_t, char, mbstate_t>:: | ||
505 | + do_out(state_type& __state, const intern_type* __from, | ||
506 | + const intern_type* __from_end, const intern_type*& __from_next, | ||
507 | + extern_type* __to, extern_type* __to_end, | ||
508 | + extern_type*& __to_next) const | ||
509 | + { | ||
510 | + result __ret = ok; | ||
511 | + state_type __tmp_state(__state); | ||
512 | + | ||
513 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
514 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
515 | +#endif | ||
516 | + | ||
517 | + // wcsnrtombs is *very* fast but stops if encounters NUL characters: | ||
518 | + // in case we fall back to wcrtomb and then continue, in a loop. | ||
519 | + // NB: wcsnrtombs is a GNU extension | ||
520 | + for (__from_next = __from, __to_next = __to; | ||
521 | + __from_next < __from_end && __to_next < __to_end | ||
522 | + && __ret == ok;) | ||
523 | + { | ||
524 | + const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', | ||
525 | + __from_end - __from_next); | ||
526 | + if (!__from_chunk_end) | ||
527 | + __from_chunk_end = __from_end; | ||
528 | + | ||
529 | + __from = __from_next; | ||
530 | + const size_t __conv = wcsnrtombs(__to_next, &__from_next, | ||
531 | + __from_chunk_end - __from_next, | ||
532 | + __to_end - __to_next, &__state); | ||
533 | + if (__conv == static_cast<size_t>(-1)) | ||
534 | + { | ||
535 | + // In case of error, in order to stop at the exact place we | ||
536 | + // have to start again from the beginning with a series of | ||
537 | + // wcrtomb. | ||
538 | + for (; __from < __from_next; ++__from) | ||
539 | + __to_next += wcrtomb(__to_next, *__from, &__tmp_state); | ||
540 | + __state = __tmp_state; | ||
541 | + __ret = error; | ||
542 | + } | ||
543 | + else if (__from_next && __from_next < __from_chunk_end) | ||
544 | + { | ||
545 | + __to_next += __conv; | ||
546 | + __ret = partial; | ||
547 | + } | ||
548 | + else | ||
549 | + { | ||
550 | + __from_next = __from_chunk_end; | ||
551 | + __to_next += __conv; | ||
552 | + } | ||
553 | + | ||
554 | + if (__from_next < __from_end && __ret == ok) | ||
555 | + { | ||
556 | + extern_type __buf[MB_LEN_MAX]; | ||
557 | + __tmp_state = __state; | ||
558 | + const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); | ||
559 | + if (__conv > static_cast<size_t>(__to_end - __to_next)) | ||
560 | + __ret = partial; | ||
561 | + else | ||
562 | + { | ||
563 | + memcpy(__to_next, __buf, __conv); | ||
564 | + __state = __tmp_state; | ||
565 | + __to_next += __conv; | ||
566 | + ++__from_next; | ||
567 | + } | ||
568 | + } | ||
569 | + } | ||
570 | + | ||
571 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
572 | + __uselocale(__old); | ||
573 | +#endif | ||
574 | + | ||
575 | + return __ret; | ||
576 | + } | ||
577 | + | ||
578 | + codecvt_base::result | ||
579 | + codecvt<wchar_t, char, mbstate_t>:: | ||
580 | + do_in(state_type& __state, const extern_type* __from, | ||
581 | + const extern_type* __from_end, const extern_type*& __from_next, | ||
582 | + intern_type* __to, intern_type* __to_end, | ||
583 | + intern_type*& __to_next) const | ||
584 | + { | ||
585 | + result __ret = ok; | ||
586 | + state_type __tmp_state(__state); | ||
587 | + | ||
588 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
589 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
590 | +#endif | ||
591 | + | ||
592 | + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: | ||
593 | + // in case we store a L'\0' and then continue, in a loop. | ||
594 | + // NB: mbsnrtowcs is a GNU extension | ||
595 | + for (__from_next = __from, __to_next = __to; | ||
596 | + __from_next < __from_end && __to_next < __to_end | ||
597 | + && __ret == ok;) | ||
598 | + { | ||
599 | + const extern_type* __from_chunk_end; | ||
600 | + __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0', | ||
601 | + __from_end | ||
602 | + - __from_next)); | ||
603 | + if (!__from_chunk_end) | ||
604 | + __from_chunk_end = __from_end; | ||
605 | + | ||
606 | + __from = __from_next; | ||
607 | + size_t __conv = mbsnrtowcs(__to_next, &__from_next, | ||
608 | + __from_chunk_end - __from_next, | ||
609 | + __to_end - __to_next, &__state); | ||
610 | + if (__conv == static_cast<size_t>(-1)) | ||
611 | + { | ||
612 | + // In case of error, in order to stop at the exact place we | ||
613 | + // have to start again from the beginning with a series of | ||
614 | + // mbrtowc. | ||
615 | + for (;; ++__to_next, __from += __conv) | ||
616 | + { | ||
617 | + __conv = mbrtowc(__to_next, __from, __from_end - __from, | ||
618 | + &__tmp_state); | ||
619 | + if (__conv == static_cast<size_t>(-1) | ||
620 | + || __conv == static_cast<size_t>(-2)) | ||
621 | + break; | ||
622 | + } | ||
623 | + __from_next = __from; | ||
624 | + __state = __tmp_state; | ||
625 | + __ret = error; | ||
626 | + } | ||
627 | + else if (__from_next && __from_next < __from_chunk_end) | ||
628 | + { | ||
629 | + // It is unclear what to return in this case (see DR 382). | ||
630 | + __to_next += __conv; | ||
631 | + __ret = partial; | ||
632 | + } | ||
633 | + else | ||
634 | + { | ||
635 | + __from_next = __from_chunk_end; | ||
636 | + __to_next += __conv; | ||
637 | + } | ||
638 | + | ||
639 | + if (__from_next < __from_end && __ret == ok) | ||
640 | + { | ||
641 | + if (__to_next < __to_end) | ||
642 | + { | ||
643 | + // XXX Probably wrong for stateful encodings | ||
644 | + __tmp_state = __state; | ||
645 | + ++__from_next; | ||
646 | + *__to_next++ = L'\0'; | ||
647 | + } | ||
648 | + else | ||
649 | + __ret = partial; | ||
650 | + } | ||
651 | + } | ||
652 | + | ||
653 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
654 | + __uselocale(__old); | ||
655 | +#endif | ||
656 | + | ||
657 | + return __ret; | ||
658 | + } | ||
659 | + | ||
660 | + int | ||
661 | + codecvt<wchar_t, char, mbstate_t>:: | ||
662 | + do_encoding() const throw() | ||
663 | + { | ||
664 | + // XXX This implementation assumes that the encoding is | ||
665 | + // stateless and is either single-byte or variable-width. | ||
666 | + int __ret = 0; | ||
667 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
668 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
669 | +#endif | ||
670 | + if (MB_CUR_MAX == 1) | ||
671 | + __ret = 1; | ||
672 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
673 | + __uselocale(__old); | ||
674 | +#endif | ||
675 | + return __ret; | ||
676 | + } | ||
677 | + | ||
678 | + int | ||
679 | + codecvt<wchar_t, char, mbstate_t>:: | ||
680 | + do_max_length() const throw() | ||
681 | + { | ||
682 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
683 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
684 | +#endif | ||
685 | + // XXX Probably wrong for stateful encodings. | ||
686 | + int __ret = MB_CUR_MAX; | ||
687 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
688 | + __uselocale(__old); | ||
689 | +#endif | ||
690 | + return __ret; | ||
691 | + } | ||
692 | + | ||
693 | + int | ||
694 | + codecvt<wchar_t, char, mbstate_t>:: | ||
695 | + do_length(state_type& __state, const extern_type* __from, | ||
696 | + const extern_type* __end, size_t __max) const | ||
697 | + { | ||
698 | + int __ret = 0; | ||
699 | + state_type __tmp_state(__state); | ||
700 | + | ||
701 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
702 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
703 | +#endif | ||
704 | + | ||
705 | + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: | ||
706 | + // in case we advance past it and then continue, in a loop. | ||
707 | + // NB: mbsnrtowcs is a GNU extension | ||
708 | + | ||
709 | + // A dummy internal buffer is needed in order for mbsnrtocws to consider | ||
710 | + // its fourth parameter (it wouldn't with NULL as first parameter). | ||
711 | + wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) | ||
712 | + * __max)); | ||
713 | + while (__from < __end && __max) | ||
714 | + { | ||
715 | + const extern_type* __from_chunk_end; | ||
716 | + __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0', | ||
717 | + __end | ||
718 | + - __from)); | ||
719 | + if (!__from_chunk_end) | ||
720 | + __from_chunk_end = __end; | ||
721 | + | ||
722 | + const extern_type* __tmp_from = __from; | ||
723 | + size_t __conv = mbsnrtowcs(__to, &__from, | ||
724 | + __from_chunk_end - __from, | ||
725 | + __max, &__state); | ||
726 | + if (__conv == static_cast<size_t>(-1)) | ||
727 | + { | ||
728 | + // In case of error, in order to stop at the exact place we | ||
729 | + // have to start again from the beginning with a series of | ||
730 | + // mbrtowc. | ||
731 | + for (__from = __tmp_from;; __from += __conv) | ||
732 | + { | ||
733 | + __conv = mbrtowc(NULL, __from, __end - __from, | ||
734 | + &__tmp_state); | ||
735 | + if (__conv == static_cast<size_t>(-1) | ||
736 | + || __conv == static_cast<size_t>(-2)) | ||
737 | + break; | ||
738 | + } | ||
739 | + __state = __tmp_state; | ||
740 | + __ret += __from - __tmp_from; | ||
741 | + break; | ||
742 | + } | ||
743 | + if (!__from) | ||
744 | + __from = __from_chunk_end; | ||
745 | + | ||
746 | + __ret += __from - __tmp_from; | ||
747 | + __max -= __conv; | ||
748 | + | ||
749 | + if (__from < __end && __max) | ||
750 | + { | ||
751 | + // XXX Probably wrong for stateful encodings | ||
752 | + __tmp_state = __state; | ||
753 | + ++__from; | ||
754 | + ++__ret; | ||
755 | + --__max; | ||
756 | + } | ||
757 | + } | ||
758 | + | ||
759 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
760 | + __uselocale(__old); | ||
761 | +#endif | ||
762 | + | ||
763 | + return __ret; | ||
764 | + } | ||
765 | +#endif | ||
766 | +} | ||
767 | diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
768 | new file mode 100644 | ||
769 | index 0000000..c2664a7 | ||
770 | --- /dev/null | ||
771 | +++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
772 | @@ -0,0 +1,80 @@ | ||
773 | +// std::collate implementation details, GNU version -*- C++ -*- | ||
774 | + | ||
775 | +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. | ||
776 | +// | ||
777 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
778 | +// software; you can redistribute it and/or modify it under the | ||
779 | +// terms of the GNU General Public License as published by the | ||
780 | +// Free Software Foundation; either version 2, or (at your option) | ||
781 | +// any later version. | ||
782 | + | ||
783 | +// This library is distributed in the hope that it will be useful, | ||
784 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
785 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
786 | +// GNU General Public License for more details. | ||
787 | + | ||
788 | +// You should have received a copy of the GNU General Public License along | ||
789 | +// with this library; see the file COPYING. If not, write to the Free | ||
790 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
791 | +// USA. | ||
792 | + | ||
793 | +// As a special exception, you may use this file as part of a free software | ||
794 | +// library without restriction. Specifically, if other files instantiate | ||
795 | +// templates or use macros or inline functions from this file, or you compile | ||
796 | +// this file and link it with other files to produce an executable, this | ||
797 | +// file does not by itself cause the resulting executable to be covered by | ||
798 | +// the GNU General Public License. This exception does not however | ||
799 | +// invalidate any other reasons why the executable file might be covered by | ||
800 | +// the GNU General Public License. | ||
801 | + | ||
802 | +// | ||
803 | +// ISO C++ 14882: 22.2.4.1.2 collate virtual functions | ||
804 | +// | ||
805 | + | ||
806 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
807 | + | ||
808 | +#include <locale> | ||
809 | +#include <bits/c++locale_internal.h> | ||
810 | + | ||
811 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
812 | +#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
813 | +#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
814 | +#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
815 | +#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
816 | +#endif | ||
817 | + | ||
818 | +namespace std | ||
819 | +{ | ||
820 | + // These are basically extensions to char_traits, and perhaps should | ||
821 | + // be put there instead of here. | ||
822 | + template<> | ||
823 | + int | ||
824 | + collate<char>::_M_compare(const char* __one, const char* __two) const | ||
825 | + { | ||
826 | + int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); | ||
827 | + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); | ||
828 | + } | ||
829 | + | ||
830 | + template<> | ||
831 | + size_t | ||
832 | + collate<char>::_M_transform(char* __to, const char* __from, | ||
833 | + size_t __n) const | ||
834 | + { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } | ||
835 | + | ||
836 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
837 | + template<> | ||
838 | + int | ||
839 | + collate<wchar_t>::_M_compare(const wchar_t* __one, | ||
840 | + const wchar_t* __two) const | ||
841 | + { | ||
842 | + int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); | ||
843 | + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); | ||
844 | + } | ||
845 | + | ||
846 | + template<> | ||
847 | + size_t | ||
848 | + collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, | ||
849 | + size_t __n) const | ||
850 | + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } | ||
851 | +#endif | ||
852 | +} | ||
853 | diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
854 | new file mode 100644 | ||
855 | index 0000000..7294e3a | ||
856 | --- /dev/null | ||
857 | +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
858 | @@ -0,0 +1,300 @@ | ||
859 | +// std::ctype implementation details, GNU version -*- C++ -*- | ||
860 | + | ||
861 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
862 | +// | ||
863 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
864 | +// software; you can redistribute it and/or modify it under the | ||
865 | +// terms of the GNU General Public License as published by the | ||
866 | +// Free Software Foundation; either version 2, or (at your option) | ||
867 | +// any later version. | ||
868 | + | ||
869 | +// This library is distributed in the hope that it will be useful, | ||
870 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
871 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
872 | +// GNU General Public License for more details. | ||
873 | + | ||
874 | +// You should have received a copy of the GNU General Public License along | ||
875 | +// with this library; see the file COPYING. If not, write to the Free | ||
876 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
877 | +// USA. | ||
878 | + | ||
879 | +// As a special exception, you may use this file as part of a free software | ||
880 | +// library without restriction. Specifically, if other files instantiate | ||
881 | +// templates or use macros or inline functions from this file, or you compile | ||
882 | +// this file and link it with other files to produce an executable, this | ||
883 | +// file does not by itself cause the resulting executable to be covered by | ||
884 | +// the GNU General Public License. This exception does not however | ||
885 | +// invalidate any other reasons why the executable file might be covered by | ||
886 | +// the GNU General Public License. | ||
887 | + | ||
888 | +// | ||
889 | +// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. | ||
890 | +// | ||
891 | + | ||
892 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
893 | + | ||
894 | +#define _LIBC | ||
895 | +#include <locale> | ||
896 | +#undef _LIBC | ||
897 | +#include <bits/c++locale_internal.h> | ||
898 | + | ||
899 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
900 | +#define __wctype_l(S, L) wctype((S)) | ||
901 | +#define __towupper_l(C, L) towupper((C)) | ||
902 | +#define __towlower_l(C, L) towlower((C)) | ||
903 | +#define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
904 | +#endif | ||
905 | + | ||
906 | +namespace std | ||
907 | +{ | ||
908 | + // NB: The other ctype<char> specializations are in src/locale.cc and | ||
909 | + // various /config/os/* files. | ||
910 | + template<> | ||
911 | + ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) | ||
912 | + : ctype<char>(0, false, __refs) | ||
913 | + { | ||
914 | + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | ||
915 | + { | ||
916 | + this->_S_destroy_c_locale(this->_M_c_locale_ctype); | ||
917 | + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); | ||
918 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
919 | + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; | ||
920 | + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; | ||
921 | + this->_M_table = this->_M_c_locale_ctype->__ctype_b; | ||
922 | +#endif | ||
923 | + } | ||
924 | + } | ||
925 | + | ||
926 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
927 | + ctype<wchar_t>::__wmask_type | ||
928 | + ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const | ||
929 | + { | ||
930 | + __wmask_type __ret; | ||
931 | + switch (__m) | ||
932 | + { | ||
933 | + case space: | ||
934 | + __ret = __wctype_l("space", _M_c_locale_ctype); | ||
935 | + break; | ||
936 | + case print: | ||
937 | + __ret = __wctype_l("print", _M_c_locale_ctype); | ||
938 | + break; | ||
939 | + case cntrl: | ||
940 | + __ret = __wctype_l("cntrl", _M_c_locale_ctype); | ||
941 | + break; | ||
942 | + case upper: | ||
943 | + __ret = __wctype_l("upper", _M_c_locale_ctype); | ||
944 | + break; | ||
945 | + case lower: | ||
946 | + __ret = __wctype_l("lower", _M_c_locale_ctype); | ||
947 | + break; | ||
948 | + case alpha: | ||
949 | + __ret = __wctype_l("alpha", _M_c_locale_ctype); | ||
950 | + break; | ||
951 | + case digit: | ||
952 | + __ret = __wctype_l("digit", _M_c_locale_ctype); | ||
953 | + break; | ||
954 | + case punct: | ||
955 | + __ret = __wctype_l("punct", _M_c_locale_ctype); | ||
956 | + break; | ||
957 | + case xdigit: | ||
958 | + __ret = __wctype_l("xdigit", _M_c_locale_ctype); | ||
959 | + break; | ||
960 | + case alnum: | ||
961 | + __ret = __wctype_l("alnum", _M_c_locale_ctype); | ||
962 | + break; | ||
963 | + case graph: | ||
964 | + __ret = __wctype_l("graph", _M_c_locale_ctype); | ||
965 | + break; | ||
966 | + default: | ||
967 | + __ret = __wmask_type(); | ||
968 | + } | ||
969 | + return __ret; | ||
970 | + } | ||
971 | + | ||
972 | + wchar_t | ||
973 | + ctype<wchar_t>::do_toupper(wchar_t __c) const | ||
974 | + { return __towupper_l(__c, _M_c_locale_ctype); } | ||
975 | + | ||
976 | + const wchar_t* | ||
977 | + ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const | ||
978 | + { | ||
979 | + while (__lo < __hi) | ||
980 | + { | ||
981 | + *__lo = __towupper_l(*__lo, _M_c_locale_ctype); | ||
982 | + ++__lo; | ||
983 | + } | ||
984 | + return __hi; | ||
985 | + } | ||
986 | + | ||
987 | + wchar_t | ||
988 | + ctype<wchar_t>::do_tolower(wchar_t __c) const | ||
989 | + { return __towlower_l(__c, _M_c_locale_ctype); } | ||
990 | + | ||
991 | + const wchar_t* | ||
992 | + ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const | ||
993 | + { | ||
994 | + while (__lo < __hi) | ||
995 | + { | ||
996 | + *__lo = __towlower_l(*__lo, _M_c_locale_ctype); | ||
997 | + ++__lo; | ||
998 | + } | ||
999 | + return __hi; | ||
1000 | + } | ||
1001 | + | ||
1002 | + bool | ||
1003 | + ctype<wchar_t>:: | ||
1004 | + do_is(mask __m, wchar_t __c) const | ||
1005 | + { | ||
1006 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
1007 | + // library for blank. | ||
1008 | + bool __ret = false; | ||
1009 | + const size_t __bitmasksize = 11; | ||
1010 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
1011 | + if (__m & _M_bit[__bitcur] | ||
1012 | + && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
1013 | + { | ||
1014 | + __ret = true; | ||
1015 | + break; | ||
1016 | + } | ||
1017 | + return __ret; | ||
1018 | + } | ||
1019 | + | ||
1020 | + const wchar_t* | ||
1021 | + ctype<wchar_t>:: | ||
1022 | + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const | ||
1023 | + { | ||
1024 | + for (; __lo < __hi; ++__vec, ++__lo) | ||
1025 | + { | ||
1026 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
1027 | + // library for blank. | ||
1028 | + const size_t __bitmasksize = 11; | ||
1029 | + mask __m = 0; | ||
1030 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
1031 | + if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
1032 | + __m |= _M_bit[__bitcur]; | ||
1033 | + *__vec = __m; | ||
1034 | + } | ||
1035 | + return __hi; | ||
1036 | + } | ||
1037 | + | ||
1038 | + const wchar_t* | ||
1039 | + ctype<wchar_t>:: | ||
1040 | + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const | ||
1041 | + { | ||
1042 | + while (__lo < __hi && !this->do_is(__m, *__lo)) | ||
1043 | + ++__lo; | ||
1044 | + return __lo; | ||
1045 | + } | ||
1046 | + | ||
1047 | + const wchar_t* | ||
1048 | + ctype<wchar_t>:: | ||
1049 | + do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const | ||
1050 | + { | ||
1051 | + while (__lo < __hi && this->do_is(__m, *__lo) != 0) | ||
1052 | + ++__lo; | ||
1053 | + return __lo; | ||
1054 | + } | ||
1055 | + | ||
1056 | + wchar_t | ||
1057 | + ctype<wchar_t>:: | ||
1058 | + do_widen(char __c) const | ||
1059 | + { return _M_widen[static_cast<unsigned char>(__c)]; } | ||
1060 | + | ||
1061 | + const char* | ||
1062 | + ctype<wchar_t>:: | ||
1063 | + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const | ||
1064 | + { | ||
1065 | + while (__lo < __hi) | ||
1066 | + { | ||
1067 | + *__dest = _M_widen[static_cast<unsigned char>(*__lo)]; | ||
1068 | + ++__lo; | ||
1069 | + ++__dest; | ||
1070 | + } | ||
1071 | + return __hi; | ||
1072 | + } | ||
1073 | + | ||
1074 | + char | ||
1075 | + ctype<wchar_t>:: | ||
1076 | + do_narrow(wchar_t __wc, char __dfault) const | ||
1077 | + { | ||
1078 | + if (__wc >= 0 && __wc < 128 && _M_narrow_ok) | ||
1079 | + return _M_narrow[__wc]; | ||
1080 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1081 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1082 | +#endif | ||
1083 | + const int __c = wctob(__wc); | ||
1084 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1085 | + __uselocale(__old); | ||
1086 | +#endif | ||
1087 | + return (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1088 | + } | ||
1089 | + | ||
1090 | + const wchar_t* | ||
1091 | + ctype<wchar_t>:: | ||
1092 | + do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, | ||
1093 | + char* __dest) const | ||
1094 | + { | ||
1095 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1096 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1097 | +#endif | ||
1098 | + if (_M_narrow_ok) | ||
1099 | + while (__lo < __hi) | ||
1100 | + { | ||
1101 | + if (*__lo >= 0 && *__lo < 128) | ||
1102 | + *__dest = _M_narrow[*__lo]; | ||
1103 | + else | ||
1104 | + { | ||
1105 | + const int __c = wctob(*__lo); | ||
1106 | + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1107 | + } | ||
1108 | + ++__lo; | ||
1109 | + ++__dest; | ||
1110 | + } | ||
1111 | + else | ||
1112 | + while (__lo < __hi) | ||
1113 | + { | ||
1114 | + const int __c = wctob(*__lo); | ||
1115 | + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1116 | + ++__lo; | ||
1117 | + ++__dest; | ||
1118 | + } | ||
1119 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1120 | + __uselocale(__old); | ||
1121 | +#endif | ||
1122 | + return __hi; | ||
1123 | + } | ||
1124 | + | ||
1125 | + void | ||
1126 | + ctype<wchar_t>::_M_initialize_ctype() | ||
1127 | + { | ||
1128 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1129 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1130 | +#endif | ||
1131 | + wint_t __i; | ||
1132 | + for (__i = 0; __i < 128; ++__i) | ||
1133 | + { | ||
1134 | + const int __c = wctob(__i); | ||
1135 | + if (__c == EOF) | ||
1136 | + break; | ||
1137 | + else | ||
1138 | + _M_narrow[__i] = static_cast<char>(__c); | ||
1139 | + } | ||
1140 | + if (__i == 128) | ||
1141 | + _M_narrow_ok = true; | ||
1142 | + else | ||
1143 | + _M_narrow_ok = false; | ||
1144 | + for (size_t __j = 0; | ||
1145 | + __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) | ||
1146 | + _M_widen[__j] = btowc(__j); | ||
1147 | + | ||
1148 | + for (size_t __k = 0; __k <= 11; ++__k) | ||
1149 | + { | ||
1150 | + _M_bit[__k] = static_cast<mask>(_ISbit(__k)); | ||
1151 | + _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); | ||
1152 | + } | ||
1153 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1154 | + __uselocale(__old); | ||
1155 | +#endif | ||
1156 | + } | ||
1157 | +#endif // _GLIBCXX_USE_WCHAR_T | ||
1158 | +} | ||
1159 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
1160 | new file mode 100644 | ||
1161 | index 0000000..13594d9 | ||
1162 | --- /dev/null | ||
1163 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
1164 | @@ -0,0 +1,100 @@ | ||
1165 | +// std::messages implementation details, GNU version -*- C++ -*- | ||
1166 | + | ||
1167 | +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. | ||
1168 | +// | ||
1169 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1170 | +// software; you can redistribute it and/or modify it under the | ||
1171 | +// terms of the GNU General Public License as published by the | ||
1172 | +// Free Software Foundation; either version 2, or (at your option) | ||
1173 | +// any later version. | ||
1174 | + | ||
1175 | +// This library is distributed in the hope that it will be useful, | ||
1176 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1177 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1178 | +// GNU General Public License for more details. | ||
1179 | + | ||
1180 | +// You should have received a copy of the GNU General Public License along | ||
1181 | +// with this library; see the file COPYING. If not, write to the Free | ||
1182 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
1183 | +// USA. | ||
1184 | + | ||
1185 | +// As a special exception, you may use this file as part of a free software | ||
1186 | +// library without restriction. Specifically, if other files instantiate | ||
1187 | +// templates or use macros or inline functions from this file, or you compile | ||
1188 | +// this file and link it with other files to produce an executable, this | ||
1189 | +// file does not by itself cause the resulting executable to be covered by | ||
1190 | +// the GNU General Public License. This exception does not however | ||
1191 | +// invalidate any other reasons why the executable file might be covered by | ||
1192 | +// the GNU General Public License. | ||
1193 | + | ||
1194 | +// | ||
1195 | +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions | ||
1196 | +// | ||
1197 | + | ||
1198 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1199 | + | ||
1200 | +#include <locale> | ||
1201 | +#include <bits/c++locale_internal.h> | ||
1202 | + | ||
1203 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1204 | +#warning fix gettext stuff | ||
1205 | +#endif | ||
1206 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
1207 | +extern "C" char *__dcgettext(const char *domainname, | ||
1208 | + const char *msgid, int category); | ||
1209 | +#undef gettext | ||
1210 | +#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) | ||
1211 | +#else | ||
1212 | +#undef gettext | ||
1213 | +#define gettext(msgid) (msgid) | ||
1214 | +#endif | ||
1215 | + | ||
1216 | +namespace std | ||
1217 | +{ | ||
1218 | + // Specializations. | ||
1219 | + template<> | ||
1220 | + string | ||
1221 | + messages<char>::do_get(catalog, int, int, const string& __dfault) const | ||
1222 | + { | ||
1223 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1224 | + __c_locale __old = __uselocale(_M_c_locale_messages); | ||
1225 | + const char* __msg = const_cast<const char*>(gettext(__dfault.c_str())); | ||
1226 | + __uselocale(__old); | ||
1227 | + return string(__msg); | ||
1228 | +#elif defined __UCLIBC_HAS_LOCALE__ | ||
1229 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1230 | + setlocale(LC_ALL, _M_name_messages); | ||
1231 | + const char* __msg = gettext(__dfault.c_str()); | ||
1232 | + setlocale(LC_ALL, __old); | ||
1233 | + free(__old); | ||
1234 | + return string(__msg); | ||
1235 | +#else | ||
1236 | + const char* __msg = gettext(__dfault.c_str()); | ||
1237 | + return string(__msg); | ||
1238 | +#endif | ||
1239 | + } | ||
1240 | + | ||
1241 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
1242 | + template<> | ||
1243 | + wstring | ||
1244 | + messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const | ||
1245 | + { | ||
1246 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1247 | + __c_locale __old = __uselocale(_M_c_locale_messages); | ||
1248 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1249 | + __uselocale(__old); | ||
1250 | + return _M_convert_from_char(__msg); | ||
1251 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
1252 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1253 | + setlocale(LC_ALL, _M_name_messages); | ||
1254 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1255 | + setlocale(LC_ALL, __old); | ||
1256 | + free(__old); | ||
1257 | + return _M_convert_from_char(__msg); | ||
1258 | +# else | ||
1259 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1260 | + return _M_convert_from_char(__msg); | ||
1261 | +# endif | ||
1262 | + } | ||
1263 | +#endif | ||
1264 | +} | ||
1265 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
1266 | new file mode 100644 | ||
1267 | index 0000000..1424078 | ||
1268 | --- /dev/null | ||
1269 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
1270 | @@ -0,0 +1,118 @@ | ||
1271 | +// std::messages implementation details, GNU version -*- C++ -*- | ||
1272 | + | ||
1273 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
1274 | +// | ||
1275 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1276 | +// software; you can redistribute it and/or modify it under the | ||
1277 | +// terms of the GNU General Public License as published by the | ||
1278 | +// Free Software Foundation; either version 2, or (at your option) | ||
1279 | +// any later version. | ||
1280 | + | ||
1281 | +// This library is distributed in the hope that it will be useful, | ||
1282 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1283 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1284 | +// GNU General Public License for more details. | ||
1285 | + | ||
1286 | +// You should have received a copy of the GNU General Public License along | ||
1287 | +// with this library; see the file COPYING. If not, write to the Free | ||
1288 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
1289 | +// USA. | ||
1290 | + | ||
1291 | +// As a special exception, you may use this file as part of a free software | ||
1292 | +// library without restriction. Specifically, if other files instantiate | ||
1293 | +// templates or use macros or inline functions from this file, or you compile | ||
1294 | +// this file and link it with other files to produce an executable, this | ||
1295 | +// file does not by itself cause the resulting executable to be covered by | ||
1296 | +// the GNU General Public License. This exception does not however | ||
1297 | +// invalidate any other reasons why the executable file might be covered by | ||
1298 | +// the GNU General Public License. | ||
1299 | + | ||
1300 | +// | ||
1301 | +// ISO C++ 14882: 22.2.7.1.2 messages functions | ||
1302 | +// | ||
1303 | + | ||
1304 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1305 | + | ||
1306 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1307 | +#warning fix prototypes for *textdomain funcs | ||
1308 | +#endif | ||
1309 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
1310 | +extern "C" char *__textdomain(const char *domainname); | ||
1311 | +extern "C" char *__bindtextdomain(const char *domainname, | ||
1312 | + const char *dirname); | ||
1313 | +#else | ||
1314 | +#undef __textdomain | ||
1315 | +#undef __bindtextdomain | ||
1316 | +#define __textdomain(D) ((void)0) | ||
1317 | +#define __bindtextdomain(D,P) ((void)0) | ||
1318 | +#endif | ||
1319 | + | ||
1320 | + // Non-virtual member functions. | ||
1321 | + template<typename _CharT> | ||
1322 | + messages<_CharT>::messages(size_t __refs) | ||
1323 | + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), | ||
1324 | + _M_name_messages(_S_get_c_name()) | ||
1325 | + { } | ||
1326 | + | ||
1327 | + template<typename _CharT> | ||
1328 | + messages<_CharT>::messages(__c_locale __cloc, const char* __s, | ||
1329 | + size_t __refs) | ||
1330 | + : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), | ||
1331 | + _M_name_messages(__s) | ||
1332 | + { | ||
1333 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
1334 | + std::strcpy(__tmp, __s); | ||
1335 | + _M_name_messages = __tmp; | ||
1336 | + } | ||
1337 | + | ||
1338 | + template<typename _CharT> | ||
1339 | + typename messages<_CharT>::catalog | ||
1340 | + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | ||
1341 | + const char* __dir) const | ||
1342 | + { | ||
1343 | + __bindtextdomain(__s.c_str(), __dir); | ||
1344 | + return this->do_open(__s, __loc); | ||
1345 | + } | ||
1346 | + | ||
1347 | + // Virtual member functions. | ||
1348 | + template<typename _CharT> | ||
1349 | + messages<_CharT>::~messages() | ||
1350 | + { | ||
1351 | + if (_M_name_messages != _S_get_c_name()) | ||
1352 | + delete [] _M_name_messages; | ||
1353 | + _S_destroy_c_locale(_M_c_locale_messages); | ||
1354 | + } | ||
1355 | + | ||
1356 | + template<typename _CharT> | ||
1357 | + typename messages<_CharT>::catalog | ||
1358 | + messages<_CharT>::do_open(const basic_string<char>& __s, | ||
1359 | + const locale&) const | ||
1360 | + { | ||
1361 | + // No error checking is done, assume the catalog exists and can | ||
1362 | + // be used. | ||
1363 | + __textdomain(__s.c_str()); | ||
1364 | + return 0; | ||
1365 | + } | ||
1366 | + | ||
1367 | + template<typename _CharT> | ||
1368 | + void | ||
1369 | + messages<_CharT>::do_close(catalog) const | ||
1370 | + { } | ||
1371 | + | ||
1372 | + // messages_byname | ||
1373 | + template<typename _CharT> | ||
1374 | + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) | ||
1375 | + : messages<_CharT>(__refs) | ||
1376 | + { | ||
1377 | + if (this->_M_name_messages != locale::facet::_S_get_c_name()) | ||
1378 | + delete [] this->_M_name_messages; | ||
1379 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
1380 | + std::strcpy(__tmp, __s); | ||
1381 | + this->_M_name_messages = __tmp; | ||
1382 | + | ||
1383 | + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | ||
1384 | + { | ||
1385 | + this->_S_destroy_c_locale(this->_M_c_locale_messages); | ||
1386 | + this->_S_create_c_locale(this->_M_c_locale_messages, __s); | ||
1387 | + } | ||
1388 | + } | ||
1389 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
1390 | new file mode 100644 | ||
1391 | index 0000000..aa52731 | ||
1392 | --- /dev/null | ||
1393 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
1394 | @@ -0,0 +1,692 @@ | ||
1395 | +// std::moneypunct implementation details, GNU version -*- C++ -*- | ||
1396 | + | ||
1397 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
1398 | +// | ||
1399 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1400 | +// software; you can redistribute it and/or modify it under the | ||
1401 | +// terms of the GNU General Public License as published by the | ||
1402 | +// Free Software Foundation; either version 2, or (at your option) | ||
1403 | +// any later version. | ||
1404 | + | ||
1405 | +// This library is distributed in the hope that it will be useful, | ||
1406 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1407 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1408 | +// GNU General Public License for more details. | ||
1409 | + | ||
1410 | +// You should have received a copy of the GNU General Public License along | ||
1411 | +// with this library; see the file COPYING. If not, write to the Free | ||
1412 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
1413 | +// USA. | ||
1414 | + | ||
1415 | +// As a special exception, you may use this file as part of a free software | ||
1416 | +// library without restriction. Specifically, if other files instantiate | ||
1417 | +// templates or use macros or inline functions from this file, or you compile | ||
1418 | +// this file and link it with other files to produce an executable, this | ||
1419 | +// file does not by itself cause the resulting executable to be covered by | ||
1420 | +// the GNU General Public License. This exception does not however | ||
1421 | +// invalidate any other reasons why the executable file might be covered by | ||
1422 | +// the GNU General Public License. | ||
1423 | + | ||
1424 | +// | ||
1425 | +// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions | ||
1426 | +// | ||
1427 | + | ||
1428 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1429 | + | ||
1430 | +#define _LIBC | ||
1431 | +#include <locale> | ||
1432 | +#undef _LIBC | ||
1433 | +#include <bits/c++locale_internal.h> | ||
1434 | + | ||
1435 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1436 | +#warning optimize this for uclibc | ||
1437 | +#warning tailor for stub locale support | ||
1438 | +#endif | ||
1439 | + | ||
1440 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
1441 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
1442 | +#endif | ||
1443 | + | ||
1444 | +namespace std | ||
1445 | +{ | ||
1446 | + // Construct and return valid pattern consisting of some combination of: | ||
1447 | + // space none symbol sign value | ||
1448 | + money_base::pattern | ||
1449 | + money_base::_S_construct_pattern(char __precedes, char __space, char __posn) | ||
1450 | + { | ||
1451 | + pattern __ret; | ||
1452 | + | ||
1453 | + // This insanely complicated routine attempts to construct a valid | ||
1454 | + // pattern for use with monyepunct. A couple of invariants: | ||
1455 | + | ||
1456 | + // if (__precedes) symbol -> value | ||
1457 | + // else value -> symbol | ||
1458 | + | ||
1459 | + // if (__space) space | ||
1460 | + // else none | ||
1461 | + | ||
1462 | + // none == never first | ||
1463 | + // space never first or last | ||
1464 | + | ||
1465 | + // Any elegant implementations of this are welcome. | ||
1466 | + switch (__posn) | ||
1467 | + { | ||
1468 | + case 0: | ||
1469 | + case 1: | ||
1470 | + // 1 The sign precedes the value and symbol. | ||
1471 | + __ret.field[0] = sign; | ||
1472 | + if (__space) | ||
1473 | + { | ||
1474 | + // Pattern starts with sign. | ||
1475 | + if (__precedes) | ||
1476 | + { | ||
1477 | + __ret.field[1] = symbol; | ||
1478 | + __ret.field[3] = value; | ||
1479 | + } | ||
1480 | + else | ||
1481 | + { | ||
1482 | + __ret.field[1] = value; | ||
1483 | + __ret.field[3] = symbol; | ||
1484 | + } | ||
1485 | + __ret.field[2] = space; | ||
1486 | + } | ||
1487 | + else | ||
1488 | + { | ||
1489 | + // Pattern starts with sign and ends with none. | ||
1490 | + if (__precedes) | ||
1491 | + { | ||
1492 | + __ret.field[1] = symbol; | ||
1493 | + __ret.field[2] = value; | ||
1494 | + } | ||
1495 | + else | ||
1496 | + { | ||
1497 | + __ret.field[1] = value; | ||
1498 | + __ret.field[2] = symbol; | ||
1499 | + } | ||
1500 | + __ret.field[3] = none; | ||
1501 | + } | ||
1502 | + break; | ||
1503 | + case 2: | ||
1504 | + // 2 The sign follows the value and symbol. | ||
1505 | + if (__space) | ||
1506 | + { | ||
1507 | + // Pattern either ends with sign. | ||
1508 | + if (__precedes) | ||
1509 | + { | ||
1510 | + __ret.field[0] = symbol; | ||
1511 | + __ret.field[2] = value; | ||
1512 | + } | ||
1513 | + else | ||
1514 | + { | ||
1515 | + __ret.field[0] = value; | ||
1516 | + __ret.field[2] = symbol; | ||
1517 | + } | ||
1518 | + __ret.field[1] = space; | ||
1519 | + __ret.field[3] = sign; | ||
1520 | + } | ||
1521 | + else | ||
1522 | + { | ||
1523 | + // Pattern ends with sign then none. | ||
1524 | + if (__precedes) | ||
1525 | + { | ||
1526 | + __ret.field[0] = symbol; | ||
1527 | + __ret.field[1] = value; | ||
1528 | + } | ||
1529 | + else | ||
1530 | + { | ||
1531 | + __ret.field[0] = value; | ||
1532 | + __ret.field[1] = symbol; | ||
1533 | + } | ||
1534 | + __ret.field[2] = sign; | ||
1535 | + __ret.field[3] = none; | ||
1536 | + } | ||
1537 | + break; | ||
1538 | + case 3: | ||
1539 | + // 3 The sign immediately precedes the symbol. | ||
1540 | + if (__precedes) | ||
1541 | + { | ||
1542 | + __ret.field[0] = sign; | ||
1543 | + __ret.field[1] = symbol; | ||
1544 | + if (__space) | ||
1545 | + { | ||
1546 | + __ret.field[2] = space; | ||
1547 | + __ret.field[3] = value; | ||
1548 | + } | ||
1549 | + else | ||
1550 | + { | ||
1551 | + __ret.field[2] = value; | ||
1552 | + __ret.field[3] = none; | ||
1553 | + } | ||
1554 | + } | ||
1555 | + else | ||
1556 | + { | ||
1557 | + __ret.field[0] = value; | ||
1558 | + if (__space) | ||
1559 | + { | ||
1560 | + __ret.field[1] = space; | ||
1561 | + __ret.field[2] = sign; | ||
1562 | + __ret.field[3] = symbol; | ||
1563 | + } | ||
1564 | + else | ||
1565 | + { | ||
1566 | + __ret.field[1] = sign; | ||
1567 | + __ret.field[2] = symbol; | ||
1568 | + __ret.field[3] = none; | ||
1569 | + } | ||
1570 | + } | ||
1571 | + break; | ||
1572 | + case 4: | ||
1573 | + // 4 The sign immediately follows the symbol. | ||
1574 | + if (__precedes) | ||
1575 | + { | ||
1576 | + __ret.field[0] = symbol; | ||
1577 | + __ret.field[1] = sign; | ||
1578 | + if (__space) | ||
1579 | + { | ||
1580 | + __ret.field[2] = space; | ||
1581 | + __ret.field[3] = value; | ||
1582 | + } | ||
1583 | + else | ||
1584 | + { | ||
1585 | + __ret.field[2] = value; | ||
1586 | + __ret.field[3] = none; | ||
1587 | + } | ||
1588 | + } | ||
1589 | + else | ||
1590 | + { | ||
1591 | + __ret.field[0] = value; | ||
1592 | + if (__space) | ||
1593 | + { | ||
1594 | + __ret.field[1] = space; | ||
1595 | + __ret.field[2] = symbol; | ||
1596 | + __ret.field[3] = sign; | ||
1597 | + } | ||
1598 | + else | ||
1599 | + { | ||
1600 | + __ret.field[1] = symbol; | ||
1601 | + __ret.field[2] = sign; | ||
1602 | + __ret.field[3] = none; | ||
1603 | + } | ||
1604 | + } | ||
1605 | + break; | ||
1606 | + default: | ||
1607 | + ; | ||
1608 | + } | ||
1609 | + return __ret; | ||
1610 | + } | ||
1611 | + | ||
1612 | + template<> | ||
1613 | + void | ||
1614 | + moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1615 | + const char*) | ||
1616 | + { | ||
1617 | + if (!_M_data) | ||
1618 | + _M_data = new __moneypunct_cache<char, true>; | ||
1619 | + | ||
1620 | + if (!__cloc) | ||
1621 | + { | ||
1622 | + // "C" locale | ||
1623 | + _M_data->_M_decimal_point = '.'; | ||
1624 | + _M_data->_M_thousands_sep = ','; | ||
1625 | + _M_data->_M_grouping = ""; | ||
1626 | + _M_data->_M_grouping_size = 0; | ||
1627 | + _M_data->_M_curr_symbol = ""; | ||
1628 | + _M_data->_M_curr_symbol_size = 0; | ||
1629 | + _M_data->_M_positive_sign = ""; | ||
1630 | + _M_data->_M_positive_sign_size = 0; | ||
1631 | + _M_data->_M_negative_sign = ""; | ||
1632 | + _M_data->_M_negative_sign_size = 0; | ||
1633 | + _M_data->_M_frac_digits = 0; | ||
1634 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1635 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1636 | + | ||
1637 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1638 | + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; | ||
1639 | + } | ||
1640 | + else | ||
1641 | + { | ||
1642 | + // Named locale. | ||
1643 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, | ||
1644 | + __cloc)); | ||
1645 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, | ||
1646 | + __cloc)); | ||
1647 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1648 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1649 | + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1650 | + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); | ||
1651 | + | ||
1652 | + char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); | ||
1653 | + if (!__nposn) | ||
1654 | + _M_data->_M_negative_sign = "()"; | ||
1655 | + else | ||
1656 | + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, | ||
1657 | + __cloc); | ||
1658 | + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); | ||
1659 | + | ||
1660 | + // _Intl == true | ||
1661 | + _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); | ||
1662 | + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); | ||
1663 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, | ||
1664 | + __cloc)); | ||
1665 | + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); | ||
1666 | + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); | ||
1667 | + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); | ||
1668 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1669 | + __pposn); | ||
1670 | + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); | ||
1671 | + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); | ||
1672 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1673 | + __nposn); | ||
1674 | + } | ||
1675 | + } | ||
1676 | + | ||
1677 | + template<> | ||
1678 | + void | ||
1679 | + moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1680 | + const char*) | ||
1681 | + { | ||
1682 | + if (!_M_data) | ||
1683 | + _M_data = new __moneypunct_cache<char, false>; | ||
1684 | + | ||
1685 | + if (!__cloc) | ||
1686 | + { | ||
1687 | + // "C" locale | ||
1688 | + _M_data->_M_decimal_point = '.'; | ||
1689 | + _M_data->_M_thousands_sep = ','; | ||
1690 | + _M_data->_M_grouping = ""; | ||
1691 | + _M_data->_M_grouping_size = 0; | ||
1692 | + _M_data->_M_curr_symbol = ""; | ||
1693 | + _M_data->_M_curr_symbol_size = 0; | ||
1694 | + _M_data->_M_positive_sign = ""; | ||
1695 | + _M_data->_M_positive_sign_size = 0; | ||
1696 | + _M_data->_M_negative_sign = ""; | ||
1697 | + _M_data->_M_negative_sign_size = 0; | ||
1698 | + _M_data->_M_frac_digits = 0; | ||
1699 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1700 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1701 | + | ||
1702 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1703 | + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; | ||
1704 | + } | ||
1705 | + else | ||
1706 | + { | ||
1707 | + // Named locale. | ||
1708 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, | ||
1709 | + __cloc)); | ||
1710 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, | ||
1711 | + __cloc)); | ||
1712 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1713 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1714 | + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1715 | + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); | ||
1716 | + | ||
1717 | + char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); | ||
1718 | + if (!__nposn) | ||
1719 | + _M_data->_M_negative_sign = "()"; | ||
1720 | + else | ||
1721 | + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, | ||
1722 | + __cloc); | ||
1723 | + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); | ||
1724 | + | ||
1725 | + // _Intl == false | ||
1726 | + _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); | ||
1727 | + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); | ||
1728 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); | ||
1729 | + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); | ||
1730 | + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); | ||
1731 | + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); | ||
1732 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1733 | + __pposn); | ||
1734 | + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); | ||
1735 | + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); | ||
1736 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1737 | + __nposn); | ||
1738 | + } | ||
1739 | + } | ||
1740 | + | ||
1741 | + template<> | ||
1742 | + moneypunct<char, true>::~moneypunct() | ||
1743 | + { delete _M_data; } | ||
1744 | + | ||
1745 | + template<> | ||
1746 | + moneypunct<char, false>::~moneypunct() | ||
1747 | + { delete _M_data; } | ||
1748 | + | ||
1749 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
1750 | + template<> | ||
1751 | + void | ||
1752 | + moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1753 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1754 | + const char*) | ||
1755 | +#else | ||
1756 | + const char* __name) | ||
1757 | +#endif | ||
1758 | + { | ||
1759 | + if (!_M_data) | ||
1760 | + _M_data = new __moneypunct_cache<wchar_t, true>; | ||
1761 | + | ||
1762 | + if (!__cloc) | ||
1763 | + { | ||
1764 | + // "C" locale | ||
1765 | + _M_data->_M_decimal_point = L'.'; | ||
1766 | + _M_data->_M_thousands_sep = L','; | ||
1767 | + _M_data->_M_grouping = ""; | ||
1768 | + _M_data->_M_grouping_size = 0; | ||
1769 | + _M_data->_M_curr_symbol = L""; | ||
1770 | + _M_data->_M_curr_symbol_size = 0; | ||
1771 | + _M_data->_M_positive_sign = L""; | ||
1772 | + _M_data->_M_positive_sign_size = 0; | ||
1773 | + _M_data->_M_negative_sign = L""; | ||
1774 | + _M_data->_M_negative_sign_size = 0; | ||
1775 | + _M_data->_M_frac_digits = 0; | ||
1776 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1777 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1778 | + | ||
1779 | + // Use ctype::widen code without the facet... | ||
1780 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1781 | + _M_data->_M_atoms[__i] = | ||
1782 | + static_cast<wchar_t>(money_base::_S_atoms[__i]); | ||
1783 | + } | ||
1784 | + else | ||
1785 | + { | ||
1786 | + // Named locale. | ||
1787 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1788 | + __c_locale __old = __uselocale(__cloc); | ||
1789 | +#else | ||
1790 | + // Switch to named locale so that mbsrtowcs will work. | ||
1791 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1792 | + setlocale(LC_ALL, __name); | ||
1793 | +#endif | ||
1794 | + | ||
1795 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1796 | +#warning fix this... should be monetary | ||
1797 | +#endif | ||
1798 | +#ifdef __UCLIBC__ | ||
1799 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1800 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
1801 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
1802 | +# else | ||
1803 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
1804 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
1805 | +# endif | ||
1806 | +#else | ||
1807 | + union { char *__s; wchar_t __w; } __u; | ||
1808 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); | ||
1809 | + _M_data->_M_decimal_point = __u.__w; | ||
1810 | + | ||
1811 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); | ||
1812 | + _M_data->_M_thousands_sep = __u.__w; | ||
1813 | +#endif | ||
1814 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1815 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1816 | + | ||
1817 | + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1818 | + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); | ||
1819 | + const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); | ||
1820 | + | ||
1821 | + wchar_t* __wcs_ps = 0; | ||
1822 | + wchar_t* __wcs_ns = 0; | ||
1823 | + const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); | ||
1824 | + try | ||
1825 | + { | ||
1826 | + mbstate_t __state; | ||
1827 | + size_t __len = strlen(__cpossign); | ||
1828 | + if (__len) | ||
1829 | + { | ||
1830 | + ++__len; | ||
1831 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1832 | + __wcs_ps = new wchar_t[__len]; | ||
1833 | + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); | ||
1834 | + _M_data->_M_positive_sign = __wcs_ps; | ||
1835 | + } | ||
1836 | + else | ||
1837 | + _M_data->_M_positive_sign = L""; | ||
1838 | + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); | ||
1839 | + | ||
1840 | + __len = strlen(__cnegsign); | ||
1841 | + if (!__nposn) | ||
1842 | + _M_data->_M_negative_sign = L"()"; | ||
1843 | + else if (__len) | ||
1844 | + { | ||
1845 | + ++__len; | ||
1846 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1847 | + __wcs_ns = new wchar_t[__len]; | ||
1848 | + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); | ||
1849 | + _M_data->_M_negative_sign = __wcs_ns; | ||
1850 | + } | ||
1851 | + else | ||
1852 | + _M_data->_M_negative_sign = L""; | ||
1853 | + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); | ||
1854 | + | ||
1855 | + // _Intl == true. | ||
1856 | + __len = strlen(__ccurr); | ||
1857 | + if (__len) | ||
1858 | + { | ||
1859 | + ++__len; | ||
1860 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1861 | + wchar_t* __wcs = new wchar_t[__len]; | ||
1862 | + mbsrtowcs(__wcs, &__ccurr, __len, &__state); | ||
1863 | + _M_data->_M_curr_symbol = __wcs; | ||
1864 | + } | ||
1865 | + else | ||
1866 | + _M_data->_M_curr_symbol = L""; | ||
1867 | + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); | ||
1868 | + } | ||
1869 | + catch (...) | ||
1870 | + { | ||
1871 | + delete _M_data; | ||
1872 | + _M_data = 0; | ||
1873 | + delete __wcs_ps; | ||
1874 | + delete __wcs_ns; | ||
1875 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1876 | + __uselocale(__old); | ||
1877 | +#else | ||
1878 | + setlocale(LC_ALL, __old); | ||
1879 | + free(__old); | ||
1880 | +#endif | ||
1881 | + __throw_exception_again; | ||
1882 | + } | ||
1883 | + | ||
1884 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, | ||
1885 | + __cloc)); | ||
1886 | + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); | ||
1887 | + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); | ||
1888 | + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); | ||
1889 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1890 | + __pposn); | ||
1891 | + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); | ||
1892 | + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); | ||
1893 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1894 | + __nposn); | ||
1895 | + | ||
1896 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1897 | + __uselocale(__old); | ||
1898 | +#else | ||
1899 | + setlocale(LC_ALL, __old); | ||
1900 | + free(__old); | ||
1901 | +#endif | ||
1902 | + } | ||
1903 | + } | ||
1904 | + | ||
1905 | + template<> | ||
1906 | + void | ||
1907 | + moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1908 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1909 | + const char*) | ||
1910 | +#else | ||
1911 | + const char* __name) | ||
1912 | +#endif | ||
1913 | + { | ||
1914 | + if (!_M_data) | ||
1915 | + _M_data = new __moneypunct_cache<wchar_t, false>; | ||
1916 | + | ||
1917 | + if (!__cloc) | ||
1918 | + { | ||
1919 | + // "C" locale | ||
1920 | + _M_data->_M_decimal_point = L'.'; | ||
1921 | + _M_data->_M_thousands_sep = L','; | ||
1922 | + _M_data->_M_grouping = ""; | ||
1923 | + _M_data->_M_grouping_size = 0; | ||
1924 | + _M_data->_M_curr_symbol = L""; | ||
1925 | + _M_data->_M_curr_symbol_size = 0; | ||
1926 | + _M_data->_M_positive_sign = L""; | ||
1927 | + _M_data->_M_positive_sign_size = 0; | ||
1928 | + _M_data->_M_negative_sign = L""; | ||
1929 | + _M_data->_M_negative_sign_size = 0; | ||
1930 | + _M_data->_M_frac_digits = 0; | ||
1931 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1932 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1933 | + | ||
1934 | + // Use ctype::widen code without the facet... | ||
1935 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1936 | + _M_data->_M_atoms[__i] = | ||
1937 | + static_cast<wchar_t>(money_base::_S_atoms[__i]); | ||
1938 | + } | ||
1939 | + else | ||
1940 | + { | ||
1941 | + // Named locale. | ||
1942 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1943 | + __c_locale __old = __uselocale(__cloc); | ||
1944 | +#else | ||
1945 | + // Switch to named locale so that mbsrtowcs will work. | ||
1946 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1947 | + setlocale(LC_ALL, __name); | ||
1948 | +#endif | ||
1949 | + | ||
1950 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1951 | +#warning fix this... should be monetary | ||
1952 | +#endif | ||
1953 | +#ifdef __UCLIBC__ | ||
1954 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1955 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
1956 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
1957 | +# else | ||
1958 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
1959 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
1960 | +# endif | ||
1961 | +#else | ||
1962 | + union { char *__s; wchar_t __w; } __u; | ||
1963 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); | ||
1964 | + _M_data->_M_decimal_point = __u.__w; | ||
1965 | + | ||
1966 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); | ||
1967 | + _M_data->_M_thousands_sep = __u.__w; | ||
1968 | +#endif | ||
1969 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1970 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1971 | + | ||
1972 | + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1973 | + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); | ||
1974 | + const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); | ||
1975 | + | ||
1976 | + wchar_t* __wcs_ps = 0; | ||
1977 | + wchar_t* __wcs_ns = 0; | ||
1978 | + const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); | ||
1979 | + try | ||
1980 | + { | ||
1981 | + mbstate_t __state; | ||
1982 | + size_t __len; | ||
1983 | + __len = strlen(__cpossign); | ||
1984 | + if (__len) | ||
1985 | + { | ||
1986 | + ++__len; | ||
1987 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1988 | + __wcs_ps = new wchar_t[__len]; | ||
1989 | + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); | ||
1990 | + _M_data->_M_positive_sign = __wcs_ps; | ||
1991 | + } | ||
1992 | + else | ||
1993 | + _M_data->_M_positive_sign = L""; | ||
1994 | + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); | ||
1995 | + | ||
1996 | + __len = strlen(__cnegsign); | ||
1997 | + if (!__nposn) | ||
1998 | + _M_data->_M_negative_sign = L"()"; | ||
1999 | + else if (__len) | ||
2000 | + { | ||
2001 | + ++__len; | ||
2002 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
2003 | + __wcs_ns = new wchar_t[__len]; | ||
2004 | + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); | ||
2005 | + _M_data->_M_negative_sign = __wcs_ns; | ||
2006 | + } | ||
2007 | + else | ||
2008 | + _M_data->_M_negative_sign = L""; | ||
2009 | + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); | ||
2010 | + | ||
2011 | + // _Intl == true. | ||
2012 | + __len = strlen(__ccurr); | ||
2013 | + if (__len) | ||
2014 | + { | ||
2015 | + ++__len; | ||
2016 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
2017 | + wchar_t* __wcs = new wchar_t[__len]; | ||
2018 | + mbsrtowcs(__wcs, &__ccurr, __len, &__state); | ||
2019 | + _M_data->_M_curr_symbol = __wcs; | ||
2020 | + } | ||
2021 | + else | ||
2022 | + _M_data->_M_curr_symbol = L""; | ||
2023 | + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); | ||
2024 | + } | ||
2025 | + catch (...) | ||
2026 | + { | ||
2027 | + delete _M_data; | ||
2028 | + _M_data = 0; | ||
2029 | + delete __wcs_ps; | ||
2030 | + delete __wcs_ns; | ||
2031 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2032 | + __uselocale(__old); | ||
2033 | +#else | ||
2034 | + setlocale(LC_ALL, __old); | ||
2035 | + free(__old); | ||
2036 | +#endif | ||
2037 | + __throw_exception_again; | ||
2038 | + } | ||
2039 | + | ||
2040 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); | ||
2041 | + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); | ||
2042 | + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); | ||
2043 | + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); | ||
2044 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
2045 | + __pposn); | ||
2046 | + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); | ||
2047 | + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); | ||
2048 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
2049 | + __nposn); | ||
2050 | + | ||
2051 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2052 | + __uselocale(__old); | ||
2053 | +#else | ||
2054 | + setlocale(LC_ALL, __old); | ||
2055 | + free(__old); | ||
2056 | +#endif | ||
2057 | + } | ||
2058 | + } | ||
2059 | + | ||
2060 | + template<> | ||
2061 | + moneypunct<wchar_t, true>::~moneypunct() | ||
2062 | + { | ||
2063 | + if (_M_data->_M_positive_sign_size) | ||
2064 | + delete [] _M_data->_M_positive_sign; | ||
2065 | + if (_M_data->_M_negative_sign_size | ||
2066 | + && wcscmp(_M_data->_M_negative_sign, L"()") != 0) | ||
2067 | + delete [] _M_data->_M_negative_sign; | ||
2068 | + if (_M_data->_M_curr_symbol_size) | ||
2069 | + delete [] _M_data->_M_curr_symbol; | ||
2070 | + delete _M_data; | ||
2071 | + } | ||
2072 | + | ||
2073 | + template<> | ||
2074 | + moneypunct<wchar_t, false>::~moneypunct() | ||
2075 | + { | ||
2076 | + if (_M_data->_M_positive_sign_size) | ||
2077 | + delete [] _M_data->_M_positive_sign; | ||
2078 | + if (_M_data->_M_negative_sign_size | ||
2079 | + && wcscmp(_M_data->_M_negative_sign, L"()") != 0) | ||
2080 | + delete [] _M_data->_M_negative_sign; | ||
2081 | + if (_M_data->_M_curr_symbol_size) | ||
2082 | + delete [] _M_data->_M_curr_symbol; | ||
2083 | + delete _M_data; | ||
2084 | + } | ||
2085 | +#endif | ||
2086 | +} | ||
2087 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
2088 | new file mode 100644 | ||
2089 | index 0000000..883ec1a | ||
2090 | --- /dev/null | ||
2091 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
2092 | @@ -0,0 +1,160 @@ | ||
2093 | +// std::numpunct implementation details, GNU version -*- C++ -*- | ||
2094 | + | ||
2095 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2096 | +// | ||
2097 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2098 | +// software; you can redistribute it and/or modify it under the | ||
2099 | +// terms of the GNU General Public License as published by the | ||
2100 | +// Free Software Foundation; either version 2, or (at your option) | ||
2101 | +// any later version. | ||
2102 | + | ||
2103 | +// This library is distributed in the hope that it will be useful, | ||
2104 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2105 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2106 | +// GNU General Public License for more details. | ||
2107 | + | ||
2108 | +// You should have received a copy of the GNU General Public License along | ||
2109 | +// with this library; see the file COPYING. If not, write to the Free | ||
2110 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2111 | +// USA. | ||
2112 | + | ||
2113 | +// As a special exception, you may use this file as part of a free software | ||
2114 | +// library without restriction. Specifically, if other files instantiate | ||
2115 | +// templates or use macros or inline functions from this file, or you compile | ||
2116 | +// this file and link it with other files to produce an executable, this | ||
2117 | +// file does not by itself cause the resulting executable to be covered by | ||
2118 | +// the GNU General Public License. This exception does not however | ||
2119 | +// invalidate any other reasons why the executable file might be covered by | ||
2120 | +// the GNU General Public License. | ||
2121 | + | ||
2122 | +// | ||
2123 | +// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions | ||
2124 | +// | ||
2125 | + | ||
2126 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2127 | + | ||
2128 | +#define _LIBC | ||
2129 | +#include <locale> | ||
2130 | +#undef _LIBC | ||
2131 | +#include <bits/c++locale_internal.h> | ||
2132 | + | ||
2133 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2134 | +#warning tailor for stub locale support | ||
2135 | +#endif | ||
2136 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
2137 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
2138 | +#endif | ||
2139 | + | ||
2140 | +namespace std | ||
2141 | +{ | ||
2142 | + template<> | ||
2143 | + void | ||
2144 | + numpunct<char>::_M_initialize_numpunct(__c_locale __cloc) | ||
2145 | + { | ||
2146 | + if (!_M_data) | ||
2147 | + _M_data = new __numpunct_cache<char>; | ||
2148 | + | ||
2149 | + if (!__cloc) | ||
2150 | + { | ||
2151 | + // "C" locale | ||
2152 | + _M_data->_M_grouping = ""; | ||
2153 | + _M_data->_M_grouping_size = 0; | ||
2154 | + _M_data->_M_use_grouping = false; | ||
2155 | + | ||
2156 | + _M_data->_M_decimal_point = '.'; | ||
2157 | + _M_data->_M_thousands_sep = ','; | ||
2158 | + | ||
2159 | + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) | ||
2160 | + _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; | ||
2161 | + | ||
2162 | + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) | ||
2163 | + _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; | ||
2164 | + } | ||
2165 | + else | ||
2166 | + { | ||
2167 | + // Named locale. | ||
2168 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, | ||
2169 | + __cloc)); | ||
2170 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, | ||
2171 | + __cloc)); | ||
2172 | + | ||
2173 | + // Check for NULL, which implies no grouping. | ||
2174 | + if (_M_data->_M_thousands_sep == '\0') | ||
2175 | + _M_data->_M_grouping = ""; | ||
2176 | + else | ||
2177 | + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); | ||
2178 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
2179 | + } | ||
2180 | + | ||
2181 | + // NB: There is no way to extact this info from posix locales. | ||
2182 | + // _M_truename = __nl_langinfo_l(YESSTR, __cloc); | ||
2183 | + _M_data->_M_truename = "true"; | ||
2184 | + _M_data->_M_truename_size = 4; | ||
2185 | + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); | ||
2186 | + _M_data->_M_falsename = "false"; | ||
2187 | + _M_data->_M_falsename_size = 5; | ||
2188 | + } | ||
2189 | + | ||
2190 | + template<> | ||
2191 | + numpunct<char>::~numpunct() | ||
2192 | + { delete _M_data; } | ||
2193 | + | ||
2194 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
2195 | + template<> | ||
2196 | + void | ||
2197 | + numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc) | ||
2198 | + { | ||
2199 | + if (!_M_data) | ||
2200 | + _M_data = new __numpunct_cache<wchar_t>; | ||
2201 | + | ||
2202 | + if (!__cloc) | ||
2203 | + { | ||
2204 | + // "C" locale | ||
2205 | + _M_data->_M_grouping = ""; | ||
2206 | + _M_data->_M_grouping_size = 0; | ||
2207 | + _M_data->_M_use_grouping = false; | ||
2208 | + | ||
2209 | + _M_data->_M_decimal_point = L'.'; | ||
2210 | + _M_data->_M_thousands_sep = L','; | ||
2211 | + | ||
2212 | + // Use ctype::widen code without the facet... | ||
2213 | + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) | ||
2214 | + _M_data->_M_atoms_out[__i] = | ||
2215 | + static_cast<wchar_t>(__num_base::_S_atoms_out[__i]); | ||
2216 | + | ||
2217 | + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) | ||
2218 | + _M_data->_M_atoms_in[__j] = | ||
2219 | + static_cast<wchar_t>(__num_base::_S_atoms_in[__j]); | ||
2220 | + } | ||
2221 | + else | ||
2222 | + { | ||
2223 | + // Named locale. | ||
2224 | + // NB: In the GNU model wchar_t is always 32 bit wide. | ||
2225 | + union { char *__s; wchar_t __w; } __u; | ||
2226 | + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); | ||
2227 | + _M_data->_M_decimal_point = __u.__w; | ||
2228 | + | ||
2229 | + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); | ||
2230 | + _M_data->_M_thousands_sep = __u.__w; | ||
2231 | + | ||
2232 | + if (_M_data->_M_thousands_sep == L'\0') | ||
2233 | + _M_data->_M_grouping = ""; | ||
2234 | + else | ||
2235 | + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); | ||
2236 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
2237 | + } | ||
2238 | + | ||
2239 | + // NB: There is no way to extact this info from posix locales. | ||
2240 | + // _M_truename = __nl_langinfo_l(YESSTR, __cloc); | ||
2241 | + _M_data->_M_truename = L"true"; | ||
2242 | + _M_data->_M_truename_size = 4; | ||
2243 | + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); | ||
2244 | + _M_data->_M_falsename = L"false"; | ||
2245 | + _M_data->_M_falsename_size = 5; | ||
2246 | + } | ||
2247 | + | ||
2248 | + template<> | ||
2249 | + numpunct<wchar_t>::~numpunct() | ||
2250 | + { delete _M_data; } | ||
2251 | + #endif | ||
2252 | +} | ||
2253 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
2254 | new file mode 100644 | ||
2255 | index 0000000..e0707d7 | ||
2256 | --- /dev/null | ||
2257 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
2258 | @@ -0,0 +1,406 @@ | ||
2259 | +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- | ||
2260 | + | ||
2261 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2262 | +// | ||
2263 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2264 | +// software; you can redistribute it and/or modify it under the | ||
2265 | +// terms of the GNU General Public License as published by the | ||
2266 | +// Free Software Foundation; either version 2, or (at your option) | ||
2267 | +// any later version. | ||
2268 | + | ||
2269 | +// This library is distributed in the hope that it will be useful, | ||
2270 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2271 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2272 | +// GNU General Public License for more details. | ||
2273 | + | ||
2274 | +// You should have received a copy of the GNU General Public License along | ||
2275 | +// with this library; see the file COPYING. If not, write to the Free | ||
2276 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2277 | +// USA. | ||
2278 | + | ||
2279 | +// As a special exception, you may use this file as part of a free software | ||
2280 | +// library without restriction. Specifically, if other files instantiate | ||
2281 | +// templates or use macros or inline functions from this file, or you compile | ||
2282 | +// this file and link it with other files to produce an executable, this | ||
2283 | +// file does not by itself cause the resulting executable to be covered by | ||
2284 | +// the GNU General Public License. This exception does not however | ||
2285 | +// invalidate any other reasons why the executable file might be covered by | ||
2286 | +// the GNU General Public License. | ||
2287 | + | ||
2288 | +// | ||
2289 | +// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions | ||
2290 | +// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions | ||
2291 | +// | ||
2292 | + | ||
2293 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2294 | + | ||
2295 | +#include <locale> | ||
2296 | +#include <bits/c++locale_internal.h> | ||
2297 | + | ||
2298 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2299 | +#warning tailor for stub locale support | ||
2300 | +#endif | ||
2301 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
2302 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
2303 | +#endif | ||
2304 | + | ||
2305 | +namespace std | ||
2306 | +{ | ||
2307 | + template<> | ||
2308 | + void | ||
2309 | + __timepunct<char>:: | ||
2310 | + _M_put(char* __s, size_t __maxlen, const char* __format, | ||
2311 | + const tm* __tm) const | ||
2312 | + { | ||
2313 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2314 | + const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, | ||
2315 | + _M_c_locale_timepunct); | ||
2316 | +#else | ||
2317 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
2318 | + setlocale(LC_ALL, _M_name_timepunct); | ||
2319 | + const size_t __len = strftime(__s, __maxlen, __format, __tm); | ||
2320 | + setlocale(LC_ALL, __old); | ||
2321 | + free(__old); | ||
2322 | +#endif | ||
2323 | + // Make sure __s is null terminated. | ||
2324 | + if (__len == 0) | ||
2325 | + __s[0] = '\0'; | ||
2326 | + } | ||
2327 | + | ||
2328 | + template<> | ||
2329 | + void | ||
2330 | + __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc) | ||
2331 | + { | ||
2332 | + if (!_M_data) | ||
2333 | + _M_data = new __timepunct_cache<char>; | ||
2334 | + | ||
2335 | + if (!__cloc) | ||
2336 | + { | ||
2337 | + // "C" locale | ||
2338 | + _M_c_locale_timepunct = _S_get_c_locale(); | ||
2339 | + | ||
2340 | + _M_data->_M_date_format = "%m/%d/%y"; | ||
2341 | + _M_data->_M_date_era_format = "%m/%d/%y"; | ||
2342 | + _M_data->_M_time_format = "%H:%M:%S"; | ||
2343 | + _M_data->_M_time_era_format = "%H:%M:%S"; | ||
2344 | + _M_data->_M_date_time_format = ""; | ||
2345 | + _M_data->_M_date_time_era_format = ""; | ||
2346 | + _M_data->_M_am = "AM"; | ||
2347 | + _M_data->_M_pm = "PM"; | ||
2348 | + _M_data->_M_am_pm_format = ""; | ||
2349 | + | ||
2350 | + // Day names, starting with "C"'s Sunday. | ||
2351 | + _M_data->_M_day1 = "Sunday"; | ||
2352 | + _M_data->_M_day2 = "Monday"; | ||
2353 | + _M_data->_M_day3 = "Tuesday"; | ||
2354 | + _M_data->_M_day4 = "Wednesday"; | ||
2355 | + _M_data->_M_day5 = "Thursday"; | ||
2356 | + _M_data->_M_day6 = "Friday"; | ||
2357 | + _M_data->_M_day7 = "Saturday"; | ||
2358 | + | ||
2359 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2360 | + _M_data->_M_aday1 = "Sun"; | ||
2361 | + _M_data->_M_aday2 = "Mon"; | ||
2362 | + _M_data->_M_aday3 = "Tue"; | ||
2363 | + _M_data->_M_aday4 = "Wed"; | ||
2364 | + _M_data->_M_aday5 = "Thu"; | ||
2365 | + _M_data->_M_aday6 = "Fri"; | ||
2366 | + _M_data->_M_aday7 = "Sat"; | ||
2367 | + | ||
2368 | + // Month names, starting with "C"'s January. | ||
2369 | + _M_data->_M_month01 = "January"; | ||
2370 | + _M_data->_M_month02 = "February"; | ||
2371 | + _M_data->_M_month03 = "March"; | ||
2372 | + _M_data->_M_month04 = "April"; | ||
2373 | + _M_data->_M_month05 = "May"; | ||
2374 | + _M_data->_M_month06 = "June"; | ||
2375 | + _M_data->_M_month07 = "July"; | ||
2376 | + _M_data->_M_month08 = "August"; | ||
2377 | + _M_data->_M_month09 = "September"; | ||
2378 | + _M_data->_M_month10 = "October"; | ||
2379 | + _M_data->_M_month11 = "November"; | ||
2380 | + _M_data->_M_month12 = "December"; | ||
2381 | + | ||
2382 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2383 | + _M_data->_M_amonth01 = "Jan"; | ||
2384 | + _M_data->_M_amonth02 = "Feb"; | ||
2385 | + _M_data->_M_amonth03 = "Mar"; | ||
2386 | + _M_data->_M_amonth04 = "Apr"; | ||
2387 | + _M_data->_M_amonth05 = "May"; | ||
2388 | + _M_data->_M_amonth06 = "Jun"; | ||
2389 | + _M_data->_M_amonth07 = "Jul"; | ||
2390 | + _M_data->_M_amonth08 = "Aug"; | ||
2391 | + _M_data->_M_amonth09 = "Sep"; | ||
2392 | + _M_data->_M_amonth10 = "Oct"; | ||
2393 | + _M_data->_M_amonth11 = "Nov"; | ||
2394 | + _M_data->_M_amonth12 = "Dec"; | ||
2395 | + } | ||
2396 | + else | ||
2397 | + { | ||
2398 | + _M_c_locale_timepunct = _S_clone_c_locale(__cloc); | ||
2399 | + | ||
2400 | + _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); | ||
2401 | + _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); | ||
2402 | + _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); | ||
2403 | + _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); | ||
2404 | + _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); | ||
2405 | + _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, | ||
2406 | + __cloc); | ||
2407 | + _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); | ||
2408 | + _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); | ||
2409 | + _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); | ||
2410 | + | ||
2411 | + // Day names, starting with "C"'s Sunday. | ||
2412 | + _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); | ||
2413 | + _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); | ||
2414 | + _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); | ||
2415 | + _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); | ||
2416 | + _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); | ||
2417 | + _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); | ||
2418 | + _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); | ||
2419 | + | ||
2420 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2421 | + _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); | ||
2422 | + _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); | ||
2423 | + _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); | ||
2424 | + _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); | ||
2425 | + _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); | ||
2426 | + _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); | ||
2427 | + _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); | ||
2428 | + | ||
2429 | + // Month names, starting with "C"'s January. | ||
2430 | + _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); | ||
2431 | + _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); | ||
2432 | + _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); | ||
2433 | + _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); | ||
2434 | + _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); | ||
2435 | + _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); | ||
2436 | + _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); | ||
2437 | + _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); | ||
2438 | + _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); | ||
2439 | + _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); | ||
2440 | + _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); | ||
2441 | + _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); | ||
2442 | + | ||
2443 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2444 | + _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); | ||
2445 | + _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); | ||
2446 | + _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); | ||
2447 | + _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); | ||
2448 | + _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); | ||
2449 | + _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); | ||
2450 | + _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); | ||
2451 | + _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); | ||
2452 | + _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); | ||
2453 | + _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); | ||
2454 | + _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); | ||
2455 | + _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); | ||
2456 | + } | ||
2457 | + } | ||
2458 | + | ||
2459 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
2460 | + template<> | ||
2461 | + void | ||
2462 | + __timepunct<wchar_t>:: | ||
2463 | + _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, | ||
2464 | + const tm* __tm) const | ||
2465 | + { | ||
2466 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2467 | + __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); | ||
2468 | + const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, | ||
2469 | + _M_c_locale_timepunct); | ||
2470 | +#else | ||
2471 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
2472 | + setlocale(LC_ALL, _M_name_timepunct); | ||
2473 | + const size_t __len = wcsftime(__s, __maxlen, __format, __tm); | ||
2474 | + setlocale(LC_ALL, __old); | ||
2475 | + free(__old); | ||
2476 | +#endif | ||
2477 | + // Make sure __s is null terminated. | ||
2478 | + if (__len == 0) | ||
2479 | + __s[0] = L'\0'; | ||
2480 | + } | ||
2481 | + | ||
2482 | + template<> | ||
2483 | + void | ||
2484 | + __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc) | ||
2485 | + { | ||
2486 | + if (!_M_data) | ||
2487 | + _M_data = new __timepunct_cache<wchar_t>; | ||
2488 | + | ||
2489 | +#warning wide time stuff | ||
2490 | +// if (!__cloc) | ||
2491 | + { | ||
2492 | + // "C" locale | ||
2493 | + _M_c_locale_timepunct = _S_get_c_locale(); | ||
2494 | + | ||
2495 | + _M_data->_M_date_format = L"%m/%d/%y"; | ||
2496 | + _M_data->_M_date_era_format = L"%m/%d/%y"; | ||
2497 | + _M_data->_M_time_format = L"%H:%M:%S"; | ||
2498 | + _M_data->_M_time_era_format = L"%H:%M:%S"; | ||
2499 | + _M_data->_M_date_time_format = L""; | ||
2500 | + _M_data->_M_date_time_era_format = L""; | ||
2501 | + _M_data->_M_am = L"AM"; | ||
2502 | + _M_data->_M_pm = L"PM"; | ||
2503 | + _M_data->_M_am_pm_format = L""; | ||
2504 | + | ||
2505 | + // Day names, starting with "C"'s Sunday. | ||
2506 | + _M_data->_M_day1 = L"Sunday"; | ||
2507 | + _M_data->_M_day2 = L"Monday"; | ||
2508 | + _M_data->_M_day3 = L"Tuesday"; | ||
2509 | + _M_data->_M_day4 = L"Wednesday"; | ||
2510 | + _M_data->_M_day5 = L"Thursday"; | ||
2511 | + _M_data->_M_day6 = L"Friday"; | ||
2512 | + _M_data->_M_day7 = L"Saturday"; | ||
2513 | + | ||
2514 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2515 | + _M_data->_M_aday1 = L"Sun"; | ||
2516 | + _M_data->_M_aday2 = L"Mon"; | ||
2517 | + _M_data->_M_aday3 = L"Tue"; | ||
2518 | + _M_data->_M_aday4 = L"Wed"; | ||
2519 | + _M_data->_M_aday5 = L"Thu"; | ||
2520 | + _M_data->_M_aday6 = L"Fri"; | ||
2521 | + _M_data->_M_aday7 = L"Sat"; | ||
2522 | + | ||
2523 | + // Month names, starting with "C"'s January. | ||
2524 | + _M_data->_M_month01 = L"January"; | ||
2525 | + _M_data->_M_month02 = L"February"; | ||
2526 | + _M_data->_M_month03 = L"March"; | ||
2527 | + _M_data->_M_month04 = L"April"; | ||
2528 | + _M_data->_M_month05 = L"May"; | ||
2529 | + _M_data->_M_month06 = L"June"; | ||
2530 | + _M_data->_M_month07 = L"July"; | ||
2531 | + _M_data->_M_month08 = L"August"; | ||
2532 | + _M_data->_M_month09 = L"September"; | ||
2533 | + _M_data->_M_month10 = L"October"; | ||
2534 | + _M_data->_M_month11 = L"November"; | ||
2535 | + _M_data->_M_month12 = L"December"; | ||
2536 | + | ||
2537 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2538 | + _M_data->_M_amonth01 = L"Jan"; | ||
2539 | + _M_data->_M_amonth02 = L"Feb"; | ||
2540 | + _M_data->_M_amonth03 = L"Mar"; | ||
2541 | + _M_data->_M_amonth04 = L"Apr"; | ||
2542 | + _M_data->_M_amonth05 = L"May"; | ||
2543 | + _M_data->_M_amonth06 = L"Jun"; | ||
2544 | + _M_data->_M_amonth07 = L"Jul"; | ||
2545 | + _M_data->_M_amonth08 = L"Aug"; | ||
2546 | + _M_data->_M_amonth09 = L"Sep"; | ||
2547 | + _M_data->_M_amonth10 = L"Oct"; | ||
2548 | + _M_data->_M_amonth11 = L"Nov"; | ||
2549 | + _M_data->_M_amonth12 = L"Dec"; | ||
2550 | + } | ||
2551 | +#if 0 | ||
2552 | + else | ||
2553 | + { | ||
2554 | + _M_c_locale_timepunct = _S_clone_c_locale(__cloc); | ||
2555 | + | ||
2556 | + union { char *__s; wchar_t *__w; } __u; | ||
2557 | + | ||
2558 | + __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); | ||
2559 | + _M_data->_M_date_format = __u.__w; | ||
2560 | + __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); | ||
2561 | + _M_data->_M_date_era_format = __u.__w; | ||
2562 | + __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); | ||
2563 | + _M_data->_M_time_format = __u.__w; | ||
2564 | + __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); | ||
2565 | + _M_data->_M_time_era_format = __u.__w; | ||
2566 | + __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); | ||
2567 | + _M_data->_M_date_time_format = __u.__w; | ||
2568 | + __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); | ||
2569 | + _M_data->_M_date_time_era_format = __u.__w; | ||
2570 | + __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); | ||
2571 | + _M_data->_M_am = __u.__w; | ||
2572 | + __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); | ||
2573 | + _M_data->_M_pm = __u.__w; | ||
2574 | + __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); | ||
2575 | + _M_data->_M_am_pm_format = __u.__w; | ||
2576 | + | ||
2577 | + // Day names, starting with "C"'s Sunday. | ||
2578 | + __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); | ||
2579 | + _M_data->_M_day1 = __u.__w; | ||
2580 | + __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); | ||
2581 | + _M_data->_M_day2 = __u.__w; | ||
2582 | + __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); | ||
2583 | + _M_data->_M_day3 = __u.__w; | ||
2584 | + __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); | ||
2585 | + _M_data->_M_day4 = __u.__w; | ||
2586 | + __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); | ||
2587 | + _M_data->_M_day5 = __u.__w; | ||
2588 | + __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); | ||
2589 | + _M_data->_M_day6 = __u.__w; | ||
2590 | + __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); | ||
2591 | + _M_data->_M_day7 = __u.__w; | ||
2592 | + | ||
2593 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2594 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); | ||
2595 | + _M_data->_M_aday1 = __u.__w; | ||
2596 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); | ||
2597 | + _M_data->_M_aday2 = __u.__w; | ||
2598 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); | ||
2599 | + _M_data->_M_aday3 = __u.__w; | ||
2600 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); | ||
2601 | + _M_data->_M_aday4 = __u.__w; | ||
2602 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); | ||
2603 | + _M_data->_M_aday5 = __u.__w; | ||
2604 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); | ||
2605 | + _M_data->_M_aday6 = __u.__w; | ||
2606 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); | ||
2607 | + _M_data->_M_aday7 = __u.__w; | ||
2608 | + | ||
2609 | + // Month names, starting with "C"'s January. | ||
2610 | + __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); | ||
2611 | + _M_data->_M_month01 = __u.__w; | ||
2612 | + __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); | ||
2613 | + _M_data->_M_month02 = __u.__w; | ||
2614 | + __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); | ||
2615 | + _M_data->_M_month03 = __u.__w; | ||
2616 | + __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); | ||
2617 | + _M_data->_M_month04 = __u.__w; | ||
2618 | + __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); | ||
2619 | + _M_data->_M_month05 = __u.__w; | ||
2620 | + __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); | ||
2621 | + _M_data->_M_month06 = __u.__w; | ||
2622 | + __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); | ||
2623 | + _M_data->_M_month07 = __u.__w; | ||
2624 | + __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); | ||
2625 | + _M_data->_M_month08 = __u.__w; | ||
2626 | + __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); | ||
2627 | + _M_data->_M_month09 = __u.__w; | ||
2628 | + __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); | ||
2629 | + _M_data->_M_month10 = __u.__w; | ||
2630 | + __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); | ||
2631 | + _M_data->_M_month11 = __u.__w; | ||
2632 | + __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); | ||
2633 | + _M_data->_M_month12 = __u.__w; | ||
2634 | + | ||
2635 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2636 | + __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); | ||
2637 | + _M_data->_M_amonth01 = __u.__w; | ||
2638 | + __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); | ||
2639 | + _M_data->_M_amonth02 = __u.__w; | ||
2640 | + __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); | ||
2641 | + _M_data->_M_amonth03 = __u.__w; | ||
2642 | + __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); | ||
2643 | + _M_data->_M_amonth04 = __u.__w; | ||
2644 | + __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); | ||
2645 | + _M_data->_M_amonth05 = __u.__w; | ||
2646 | + __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); | ||
2647 | + _M_data->_M_amonth06 = __u.__w; | ||
2648 | + __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); | ||
2649 | + _M_data->_M_amonth07 = __u.__w; | ||
2650 | + __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); | ||
2651 | + _M_data->_M_amonth08 = __u.__w; | ||
2652 | + __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); | ||
2653 | + _M_data->_M_amonth09 = __u.__w; | ||
2654 | + __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); | ||
2655 | + _M_data->_M_amonth10 = __u.__w; | ||
2656 | + __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); | ||
2657 | + _M_data->_M_amonth11 = __u.__w; | ||
2658 | + __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); | ||
2659 | + _M_data->_M_amonth12 = __u.__w; | ||
2660 | + } | ||
2661 | +#endif // 0 | ||
2662 | + } | ||
2663 | +#endif | ||
2664 | +} | ||
2665 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
2666 | new file mode 100644 | ||
2667 | index 0000000..ba8e858 | ||
2668 | --- /dev/null | ||
2669 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
2670 | @@ -0,0 +1,68 @@ | ||
2671 | +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- | ||
2672 | + | ||
2673 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2674 | +// | ||
2675 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2676 | +// software; you can redistribute it and/or modify it under the | ||
2677 | +// terms of the GNU General Public License as published by the | ||
2678 | +// Free Software Foundation; either version 2, or (at your option) | ||
2679 | +// any later version. | ||
2680 | + | ||
2681 | +// This library is distributed in the hope that it will be useful, | ||
2682 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2683 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2684 | +// GNU General Public License for more details. | ||
2685 | + | ||
2686 | +// You should have received a copy of the GNU General Public License along | ||
2687 | +// with this library; see the file COPYING. If not, write to the Free | ||
2688 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2689 | +// USA. | ||
2690 | + | ||
2691 | +// As a special exception, you may use this file as part of a free software | ||
2692 | +// library without restriction. Specifically, if other files instantiate | ||
2693 | +// templates or use macros or inline functions from this file, or you compile | ||
2694 | +// this file and link it with other files to produce an executable, this | ||
2695 | +// file does not by itself cause the resulting executable to be covered by | ||
2696 | +// the GNU General Public License. This exception does not however | ||
2697 | +// invalidate any other reasons why the executable file might be covered by | ||
2698 | +// the GNU General Public License. | ||
2699 | + | ||
2700 | +// | ||
2701 | +// ISO C++ 14882: 22.2.5.1.2 - time_get functions | ||
2702 | +// ISO C++ 14882: 22.2.5.3.2 - time_put functions | ||
2703 | +// | ||
2704 | + | ||
2705 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2706 | + | ||
2707 | + template<typename _CharT> | ||
2708 | + __timepunct<_CharT>::__timepunct(size_t __refs) | ||
2709 | + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
2710 | + _M_name_timepunct(_S_get_c_name()) | ||
2711 | + { _M_initialize_timepunct(); } | ||
2712 | + | ||
2713 | + template<typename _CharT> | ||
2714 | + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) | ||
2715 | + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), | ||
2716 | + _M_name_timepunct(_S_get_c_name()) | ||
2717 | + { _M_initialize_timepunct(); } | ||
2718 | + | ||
2719 | + template<typename _CharT> | ||
2720 | + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | ||
2721 | + size_t __refs) | ||
2722 | + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
2723 | + _M_name_timepunct(__s) | ||
2724 | + { | ||
2725 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
2726 | + std::strcpy(__tmp, __s); | ||
2727 | + _M_name_timepunct = __tmp; | ||
2728 | + _M_initialize_timepunct(__cloc); | ||
2729 | + } | ||
2730 | + | ||
2731 | + template<typename _CharT> | ||
2732 | + __timepunct<_CharT>::~__timepunct() | ||
2733 | + { | ||
2734 | + if (_M_name_timepunct != _S_get_c_name()) | ||
2735 | + delete [] _M_name_timepunct; | ||
2736 | + delete _M_data; | ||
2737 | + _S_destroy_c_locale(_M_c_locale_timepunct); | ||
2738 | + } | ||
2739 | diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure | ||
2740 | index f40ddcf..c57a751 100755 | ||
2741 | --- a/libstdc++-v3/configure | ||
2742 | +++ b/libstdc++-v3/configure | ||
2743 | @@ -15822,6 +15822,9 @@ fi | ||
2744 | # Default to "generic". | ||
2745 | if test $enable_clocale_flag = auto; then | ||
2746 | case ${target_os} in | ||
2747 | + *-uclibc*) | ||
2748 | + enable_clocale_flag=uclibc | ||
2749 | + ;; | ||
2750 | linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) | ||
2751 | enable_clocale_flag=gnu | ||
2752 | ;; | ||
2753 | @@ -16079,6 +16082,78 @@ $as_echo "newlib" >&6; } | ||
2754 | CTIME_CC=config/locale/generic/time_members.cc | ||
2755 | CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h | ||
2756 | ;; | ||
2757 | + uclibc) | ||
2758 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5 | ||
2759 | +$as_echo "uclibc" >&6; } | ||
2760 | + | ||
2761 | + # Declare intention to use gettext, and add support for specific | ||
2762 | + # languages. | ||
2763 | + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT | ||
2764 | + ALL_LINGUAS="de fr" | ||
2765 | + | ||
2766 | + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. | ||
2767 | + # Extract the first word of "msgfmt", so it can be a program name with args. | ||
2768 | +set dummy msgfmt; ac_word=$2 | ||
2769 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
2770 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
2771 | +if test "${ac_cv_prog_check_msgfmt+set}" = set; then : | ||
2772 | + $as_echo_n "(cached) " >&6 | ||
2773 | +else | ||
2774 | + if test -n "$check_msgfmt"; then | ||
2775 | + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. | ||
2776 | +else | ||
2777 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2778 | +for as_dir in $PATH | ||
2779 | +do | ||
2780 | + IFS=$as_save_IFS | ||
2781 | + test -z "$as_dir" && as_dir=. | ||
2782 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
2783 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
2784 | + ac_cv_prog_check_msgfmt="yes" | ||
2785 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2786 | + break 2 | ||
2787 | + fi | ||
2788 | +done | ||
2789 | + done | ||
2790 | +IFS=$as_save_IFS | ||
2791 | + | ||
2792 | + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" | ||
2793 | +fi | ||
2794 | +fi | ||
2795 | +check_msgfmt=$ac_cv_prog_check_msgfmt | ||
2796 | +if test -n "$check_msgfmt"; then | ||
2797 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5 | ||
2798 | +$as_echo "$check_msgfmt" >&6; } | ||
2799 | +else | ||
2800 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
2801 | +$as_echo "no" >&6; } | ||
2802 | +fi | ||
2803 | + | ||
2804 | + | ||
2805 | + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then | ||
2806 | + USE_NLS=yes | ||
2807 | + fi | ||
2808 | + # Export the build objects. | ||
2809 | + for ling in $ALL_LINGUAS; do \ | ||
2810 | + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ | ||
2811 | + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ | ||
2812 | + done | ||
2813 | + | ||
2814 | + | ||
2815 | + | ||
2816 | + CLOCALE_H=config/locale/uclibc/c_locale.h | ||
2817 | + CLOCALE_CC=config/locale/uclibc/c_locale.cc | ||
2818 | + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc | ||
2819 | + CCOLLATE_CC=config/locale/uclibc/collate_members.cc | ||
2820 | + CCTYPE_CC=config/locale/uclibc/ctype_members.cc | ||
2821 | + CMESSAGES_H=config/locale/uclibc/messages_members.h | ||
2822 | + CMESSAGES_CC=config/locale/uclibc/messages_members.cc | ||
2823 | + CMONEY_CC=config/locale/uclibc/monetary_members.cc | ||
2824 | + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc | ||
2825 | + CTIME_H=config/locale/uclibc/time_members.h | ||
2826 | + CTIME_CC=config/locale/uclibc/time_members.cc | ||
2827 | + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h | ||
2828 | + ;; | ||
2829 | esac | ||
2830 | |||
2831 | # This is where the testsuite looks for locale catalogs, using the | ||
2832 | diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h | ||
2833 | index 580d725..3fe61b8 100644 | ||
2834 | --- a/libstdc++-v3/include/c_compatibility/wchar.h | ||
2835 | +++ b/libstdc++-v3/include/c_compatibility/wchar.h | ||
2836 | @@ -101,7 +101,9 @@ using std::wmemcmp; | ||
2837 | using std::wmemcpy; | ||
2838 | using std::wmemmove; | ||
2839 | using std::wmemset; | ||
2840 | +#if _GLIBCXX_HAVE_WCSFTIME | ||
2841 | using std::wcsftime; | ||
2842 | +#endif | ||
2843 | |||
2844 | #if _GLIBCXX_USE_C99 | ||
2845 | using std::wcstold; | ||
2846 | diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar | ||
2847 | index 0e6b1fc..405aee2 100644 | ||
2848 | --- a/libstdc++-v3/include/c_std/cwchar | ||
2849 | +++ b/libstdc++-v3/include/c_std/cwchar | ||
2850 | @@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
2851 | using ::wcscoll; | ||
2852 | using ::wcscpy; | ||
2853 | using ::wcscspn; | ||
2854 | +#if _GLIBCXX_HAVE_WCSFTIME | ||
2855 | using ::wcsftime; | ||
2856 | +#endif | ||
2857 | using ::wcslen; | ||
2858 | using ::wcsncat; | ||
2859 | using ::wcsncmp; | ||
2860 | -- | ||
2861 | 1.7.10.4 | ||
2862 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0005-uclibc-locale-no__x.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0005-uclibc-locale-no__x.patch new file mode 100644 index 0000000..dcbbfe4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0005-uclibc-locale-no__x.patch | |||
@@ -0,0 +1,257 @@ | |||
1 | From 6a3e8506a12c12728d8b29901defd738be43757f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:42:36 +0400 | ||
4 | Subject: [PATCH 05/35] uclibc-locale-no__x | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++ | ||
11 | libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 ------ | ||
12 | libstdc++-v3/config/locale/uclibc/c_locale.h | 1 + | ||
13 | .../config/locale/uclibc/collate_members.cc | 7 --- | ||
14 | libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 --- | ||
15 | .../config/locale/uclibc/messages_members.cc | 7 +-- | ||
16 | .../config/locale/uclibc/messages_members.h | 18 +++----- | ||
17 | .../config/locale/uclibc/monetary_members.cc | 4 -- | ||
18 | .../config/locale/uclibc/numeric_members.cc | 3 -- | ||
19 | libstdc++-v3/config/locale/uclibc/time_members.cc | 3 -- | ||
20 | 10 files changed, 55 insertions(+), 54 deletions(-) | ||
21 | |||
22 | diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
23 | index 2ae3e4a..e74fddf 100644 | ||
24 | --- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
25 | +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
26 | @@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; | ||
27 | extern "C" __typeof(wctype_l) __wctype_l; | ||
28 | #endif | ||
29 | |||
30 | +# define __nl_langinfo_l nl_langinfo_l | ||
31 | +# define __strcoll_l strcoll_l | ||
32 | +# define __strftime_l strftime_l | ||
33 | +# define __strtod_l strtod_l | ||
34 | +# define __strtof_l strtof_l | ||
35 | +# define __strtold_l strtold_l | ||
36 | +# define __strxfrm_l strxfrm_l | ||
37 | +# define __newlocale newlocale | ||
38 | +# define __freelocale freelocale | ||
39 | +# define __duplocale duplocale | ||
40 | +# define __uselocale uselocale | ||
41 | + | ||
42 | +# ifdef _GLIBCXX_USE_WCHAR_T | ||
43 | +# define __iswctype_l iswctype_l | ||
44 | +# define __towlower_l towlower_l | ||
45 | +# define __towupper_l towupper_l | ||
46 | +# define __wcscoll_l wcscoll_l | ||
47 | +# define __wcsftime_l wcsftime_l | ||
48 | +# define __wcsxfrm_l wcsxfrm_l | ||
49 | +# define __wctype_l wctype_l | ||
50 | +# endif | ||
51 | + | ||
52 | +#else | ||
53 | +# define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
54 | +# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
55 | +# define __strtod_l(S, E, L) strtod((S), (E)) | ||
56 | +# define __strtof_l(S, E, L) strtof((S), (E)) | ||
57 | +# define __strtold_l(S, E, L) strtold((S), (E)) | ||
58 | +# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
59 | +# warning should dummy __newlocale check for C|POSIX ? | ||
60 | +# define __newlocale(a, b, c) NULL | ||
61 | +# define __freelocale(a) ((void)0) | ||
62 | +# define __duplocale(a) __c_locale() | ||
63 | +//# define __uselocale ? | ||
64 | +// | ||
65 | +# ifdef _GLIBCXX_USE_WCHAR_T | ||
66 | +# define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
67 | +# define __towlower_l(C, L) towlower((C)) | ||
68 | +# define __towupper_l(C, L) towupper((C)) | ||
69 | +# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
70 | +//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) | ||
71 | +# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
72 | +# define __wctype_l(S, L) wctype((S)) | ||
73 | +# endif | ||
74 | + | ||
75 | #endif // GLIBC 2.3 and later | ||
76 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
77 | index 5081dc1..21430d0 100644 | ||
78 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
79 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
80 | @@ -39,20 +39,6 @@ | ||
81 | #include <langinfo.h> | ||
82 | #include <bits/c++locale_internal.h> | ||
83 | |||
84 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
85 | -#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) | ||
86 | -#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) | ||
87 | -#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) | ||
88 | -#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) | ||
89 | -#define __strtof_l(S, E, L) strtof((S), (E)) | ||
90 | -#define __strtod_l(S, E, L) strtod((S), (E)) | ||
91 | -#define __strtold_l(S, E, L) strtold((S), (E)) | ||
92 | -#warning should dummy __newlocale check for C|POSIX ? | ||
93 | -#define __newlocale(a, b, c) NULL | ||
94 | -#define __freelocale(a) ((void)0) | ||
95 | -#define __duplocale(a) __c_locale() | ||
96 | -#endif | ||
97 | - | ||
98 | namespace std | ||
99 | { | ||
100 | template<> | ||
101 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
102 | index da07c1f..4bca5f1 100644 | ||
103 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
104 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
105 | @@ -68,6 +68,7 @@ namespace __gnu_cxx | ||
106 | { | ||
107 | extern "C" __typeof(uselocale) __uselocale; | ||
108 | } | ||
109 | +#define __uselocale uselocale | ||
110 | #endif | ||
111 | |||
112 | namespace std | ||
113 | diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
114 | index c2664a7..ec5c329 100644 | ||
115 | --- a/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
116 | +++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
117 | @@ -36,13 +36,6 @@ | ||
118 | #include <locale> | ||
119 | #include <bits/c++locale_internal.h> | ||
120 | |||
121 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
122 | -#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
123 | -#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
124 | -#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
125 | -#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
126 | -#endif | ||
127 | - | ||
128 | namespace std | ||
129 | { | ||
130 | // These are basically extensions to char_traits, and perhaps should | ||
131 | diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
132 | index 7294e3a..7b12861 100644 | ||
133 | --- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
134 | +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
135 | @@ -38,13 +38,6 @@ | ||
136 | #undef _LIBC | ||
137 | #include <bits/c++locale_internal.h> | ||
138 | |||
139 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
140 | -#define __wctype_l(S, L) wctype((S)) | ||
141 | -#define __towupper_l(C, L) towupper((C)) | ||
142 | -#define __towlower_l(C, L) towlower((C)) | ||
143 | -#define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
144 | -#endif | ||
145 | - | ||
146 | namespace std | ||
147 | { | ||
148 | // NB: The other ctype<char> specializations are in src/locale.cc and | ||
149 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
150 | index 13594d9..d7693b4 100644 | ||
151 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
152 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
153 | @@ -39,13 +39,10 @@ | ||
154 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
155 | #warning fix gettext stuff | ||
156 | #endif | ||
157 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
158 | -extern "C" char *__dcgettext(const char *domainname, | ||
159 | - const char *msgid, int category); | ||
160 | #undef gettext | ||
161 | -#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) | ||
162 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
163 | +#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) | ||
164 | #else | ||
165 | -#undef gettext | ||
166 | #define gettext(msgid) (msgid) | ||
167 | #endif | ||
168 | |||
169 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
170 | index 1424078..d89da33 100644 | ||
171 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
172 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
173 | @@ -36,15 +36,11 @@ | ||
174 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
175 | #warning fix prototypes for *textdomain funcs | ||
176 | #endif | ||
177 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
178 | -extern "C" char *__textdomain(const char *domainname); | ||
179 | -extern "C" char *__bindtextdomain(const char *domainname, | ||
180 | - const char *dirname); | ||
181 | -#else | ||
182 | -#undef __textdomain | ||
183 | -#undef __bindtextdomain | ||
184 | -#define __textdomain(D) ((void)0) | ||
185 | -#define __bindtextdomain(D,P) ((void)0) | ||
186 | +#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
187 | +#undef textdomain | ||
188 | +#undef bindtextdomain | ||
189 | +#define textdomain(D) ((void)0) | ||
190 | +#define bindtextdomain(D,P) ((void)0) | ||
191 | #endif | ||
192 | |||
193 | // Non-virtual member functions. | ||
194 | @@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname, | ||
195 | messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | ||
196 | const char* __dir) const | ||
197 | { | ||
198 | - __bindtextdomain(__s.c_str(), __dir); | ||
199 | + bindtextdomain(__s.c_str(), __dir); | ||
200 | return this->do_open(__s, __loc); | ||
201 | } | ||
202 | |||
203 | @@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname, | ||
204 | { | ||
205 | // No error checking is done, assume the catalog exists and can | ||
206 | // be used. | ||
207 | - __textdomain(__s.c_str()); | ||
208 | + textdomain(__s.c_str()); | ||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
213 | index aa52731..2e6f80a 100644 | ||
214 | --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
215 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
216 | @@ -43,10 +43,6 @@ | ||
217 | #warning tailor for stub locale support | ||
218 | #endif | ||
219 | |||
220 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
221 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
222 | -#endif | ||
223 | - | ||
224 | namespace std | ||
225 | { | ||
226 | // Construct and return valid pattern consisting of some combination of: | ||
227 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
228 | index 883ec1a..2c70642 100644 | ||
229 | --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
230 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
231 | @@ -41,9 +41,6 @@ | ||
232 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
233 | #warning tailor for stub locale support | ||
234 | #endif | ||
235 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
236 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
237 | -#endif | ||
238 | |||
239 | namespace std | ||
240 | { | ||
241 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
242 | index e0707d7..d848ed5 100644 | ||
243 | --- a/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
244 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
245 | @@ -40,9 +40,6 @@ | ||
246 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
247 | #warning tailor for stub locale support | ||
248 | #endif | ||
249 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
250 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
251 | -#endif | ||
252 | |||
253 | namespace std | ||
254 | { | ||
255 | -- | ||
256 | 1.7.10.4 | ||
257 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0006-uclibc-locale-wchar_fix.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0006-uclibc-locale-wchar_fix.patch new file mode 100644 index 0000000..3406859 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0006-uclibc-locale-wchar_fix.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 225511a3aeb193a916b3999f0b640a392caa67cd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:45:57 +0400 | ||
4 | Subject: [PATCH 06/35] uclibc-locale-wchar_fix | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++-- | ||
11 | libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++ | ||
12 | 2 files changed, 15 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
15 | index 2e6f80a..31ebb9f 100644 | ||
16 | --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
17 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
18 | @@ -401,7 +401,7 @@ namespace std | ||
19 | # ifdef __UCLIBC_HAS_XLOCALE__ | ||
20 | _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
21 | _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
22 | -# else | ||
23 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
24 | _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
25 | _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
26 | # endif | ||
27 | @@ -556,7 +556,7 @@ namespace std | ||
28 | # ifdef __UCLIBC_HAS_XLOCALE__ | ||
29 | _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
30 | _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
31 | -# else | ||
32 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
33 | _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
34 | _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
35 | # endif | ||
36 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
37 | index 2c70642..d5c8961 100644 | ||
38 | --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
39 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
40 | @@ -127,12 +127,25 @@ namespace std | ||
41 | { | ||
42 | // Named locale. | ||
43 | // NB: In the GNU model wchar_t is always 32 bit wide. | ||
44 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
45 | +#warning fix this... should be numeric | ||
46 | +#endif | ||
47 | +#ifdef __UCLIBC__ | ||
48 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
49 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
50 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
51 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
52 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
53 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
54 | +# endif | ||
55 | +#else | ||
56 | union { char *__s; wchar_t __w; } __u; | ||
57 | __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); | ||
58 | _M_data->_M_decimal_point = __u.__w; | ||
59 | |||
60 | __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); | ||
61 | _M_data->_M_thousands_sep = __u.__w; | ||
62 | +#endif | ||
63 | |||
64 | if (_M_data->_M_thousands_sep == L'\0') | ||
65 | _M_data->_M_grouping = ""; | ||
66 | -- | ||
67 | 1.7.10.4 | ||
68 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0007-uclibc-locale-update.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0007-uclibc-locale-update.patch new file mode 100644 index 0000000..5851123 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0007-uclibc-locale-update.patch | |||
@@ -0,0 +1,542 @@ | |||
1 | From 6ffe7c46f52d27864c3df3663e16ec9ddee71e8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:46:58 +0400 | ||
4 | Subject: [PATCH 07/35] uclibc-locale-update | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | .../config/locale/uclibc/c++locale_internal.h | 3 + | ||
11 | libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 +++++++++----------- | ||
12 | libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++----- | ||
13 | libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 ++++++++++---- | ||
14 | .../config/locale/uclibc/messages_members.h | 12 ++-- | ||
15 | .../config/locale/uclibc/monetary_members.cc | 34 +++++---- | ||
16 | .../config/locale/uclibc/numeric_members.cc | 5 ++ | ||
17 | libstdc++-v3/config/locale/uclibc/time_members.cc | 18 +++-- | ||
18 | libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++-- | ||
19 | 9 files changed, 158 insertions(+), 98 deletions(-) | ||
20 | |||
21 | diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
22 | index e74fddf..971a6b4 100644 | ||
23 | --- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
24 | +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
25 | @@ -31,6 +31,9 @@ | ||
26 | |||
27 | #include <bits/c++config.h> | ||
28 | #include <clocale> | ||
29 | +#include <cstdlib> | ||
30 | +#include <cstring> | ||
31 | +#include <cstddef> | ||
32 | |||
33 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
34 | #warning clean this up | ||
35 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
36 | index 21430d0..1b9d8e1 100644 | ||
37 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
38 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
39 | @@ -39,23 +39,20 @@ | ||
40 | #include <langinfo.h> | ||
41 | #include <bits/c++locale_internal.h> | ||
42 | |||
43 | -namespace std | ||
44 | -{ | ||
45 | +_GLIBCXX_BEGIN_NAMESPACE(std) | ||
46 | + | ||
47 | template<> | ||
48 | void | ||
49 | __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, | ||
50 | const __c_locale& __cloc) | ||
51 | { | ||
52 | - if (!(__err & ios_base::failbit)) | ||
53 | - { | ||
54 | - char* __sanity; | ||
55 | - errno = 0; | ||
56 | - float __f = __strtof_l(__s, &__sanity, __cloc); | ||
57 | - if (__sanity != __s && errno != ERANGE) | ||
58 | - __v = __f; | ||
59 | - else | ||
60 | - __err |= ios_base::failbit; | ||
61 | - } | ||
62 | + char* __sanity; | ||
63 | + errno = 0; | ||
64 | + float __f = __strtof_l(__s, &__sanity, __cloc); | ||
65 | + if (__sanity != __s && errno != ERANGE) | ||
66 | + __v = __f; | ||
67 | + else | ||
68 | + __err |= ios_base::failbit; | ||
69 | } | ||
70 | |||
71 | template<> | ||
72 | @@ -63,16 +60,13 @@ namespace std | ||
73 | __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, | ||
74 | const __c_locale& __cloc) | ||
75 | { | ||
76 | - if (!(__err & ios_base::failbit)) | ||
77 | - { | ||
78 | - char* __sanity; | ||
79 | - errno = 0; | ||
80 | - double __d = __strtod_l(__s, &__sanity, __cloc); | ||
81 | - if (__sanity != __s && errno != ERANGE) | ||
82 | - __v = __d; | ||
83 | - else | ||
84 | - __err |= ios_base::failbit; | ||
85 | - } | ||
86 | + char* __sanity; | ||
87 | + errno = 0; | ||
88 | + double __d = __strtod_l(__s, &__sanity, __cloc); | ||
89 | + if (__sanity != __s && errno != ERANGE) | ||
90 | + __v = __d; | ||
91 | + else | ||
92 | + __err |= ios_base::failbit; | ||
93 | } | ||
94 | |||
95 | template<> | ||
96 | @@ -80,16 +74,13 @@ namespace std | ||
97 | __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, | ||
98 | const __c_locale& __cloc) | ||
99 | { | ||
100 | - if (!(__err & ios_base::failbit)) | ||
101 | - { | ||
102 | - char* __sanity; | ||
103 | - errno = 0; | ||
104 | - long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
105 | - if (__sanity != __s && errno != ERANGE) | ||
106 | - __v = __ld; | ||
107 | - else | ||
108 | - __err |= ios_base::failbit; | ||
109 | - } | ||
110 | + char* __sanity; | ||
111 | + errno = 0; | ||
112 | + long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
113 | + if (__sanity != __s && errno != ERANGE) | ||
114 | + __v = __ld; | ||
115 | + else | ||
116 | + __err |= ios_base::failbit; | ||
117 | } | ||
118 | |||
119 | void | ||
120 | @@ -110,17 +101,18 @@ namespace std | ||
121 | void | ||
122 | locale::facet::_S_destroy_c_locale(__c_locale& __cloc) | ||
123 | { | ||
124 | - if (_S_get_c_locale() != __cloc) | ||
125 | + if (__cloc && _S_get_c_locale() != __cloc) | ||
126 | __freelocale(__cloc); | ||
127 | } | ||
128 | |||
129 | __c_locale | ||
130 | locale::facet::_S_clone_c_locale(__c_locale& __cloc) | ||
131 | { return __duplocale(__cloc); } | ||
132 | -} // namespace std | ||
133 | |||
134 | -namespace __gnu_cxx | ||
135 | -{ | ||
136 | +_GLIBCXX_END_NAMESPACE | ||
137 | + | ||
138 | +_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) | ||
139 | + | ||
140 | const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = | ||
141 | { | ||
142 | "LC_CTYPE", | ||
143 | @@ -138,9 +130,11 @@ namespace __gnu_cxx | ||
144 | "LC_IDENTIFICATION" | ||
145 | #endif | ||
146 | }; | ||
147 | -} | ||
148 | |||
149 | -namespace std | ||
150 | -{ | ||
151 | +_GLIBCXX_END_NAMESPACE | ||
152 | + | ||
153 | +_GLIBCXX_BEGIN_NAMESPACE(std) | ||
154 | + | ||
155 | const char* const* const locale::_S_categories = __gnu_cxx::category_names; | ||
156 | -} // namespace std | ||
157 | + | ||
158 | +_GLIBCXX_END_NAMESPACE | ||
159 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
160 | index 4bca5f1..64a6d46 100644 | ||
161 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
162 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
163 | @@ -39,21 +39,23 @@ | ||
164 | #pragma GCC system_header | ||
165 | |||
166 | #include <cstring> // get std::strlen | ||
167 | -#include <cstdio> // get std::snprintf or std::sprintf | ||
168 | +#include <cstdio> // get std::vsnprintf or std::vsprintf | ||
169 | #include <clocale> | ||
170 | #include <langinfo.h> // For codecvt | ||
171 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
172 | #warning fix this | ||
173 | #endif | ||
174 | -#ifdef __UCLIBC_HAS_LOCALE__ | ||
175 | +#ifdef _GLIBCXX_USE_ICONV | ||
176 | #include <iconv.h> // For codecvt using iconv, iconv_t | ||
177 | #endif | ||
178 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
179 | -#include <libintl.h> // For messages | ||
180 | +#ifdef HAVE_LIBINTL_H | ||
181 | +#include <libintl.h> // For messages | ||
182 | #endif | ||
183 | +#include <cstdarg> | ||
184 | |||
185 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
186 | #warning what is _GLIBCXX_C_LOCALE_GNU for | ||
187 | +// psm: used in os/gnu-linux/ctype_noninline.h | ||
188 | #endif | ||
189 | #define _GLIBCXX_C_LOCALE_GNU 1 | ||
190 | |||
191 | @@ -78,23 +80,25 @@ namespace std | ||
192 | #else | ||
193 | typedef int* __c_locale; | ||
194 | #endif | ||
195 | - | ||
196 | - // Convert numeric value of type _Tv to string and return length of | ||
197 | - // string. If snprintf is available use it, otherwise fall back to | ||
198 | - // the unsafe sprintf which, in general, can be dangerous and should | ||
199 | + // Convert numeric value of type double to string and return length of | ||
200 | + // string. If vsnprintf is available use it, otherwise fall back to | ||
201 | + // the unsafe vsprintf which, in general, can be dangerous and should | ||
202 | // be avoided. | ||
203 | - template<typename _Tv> | ||
204 | - int | ||
205 | - __convert_from_v(char* __out, | ||
206 | - const int __size __attribute__ ((__unused__)), | ||
207 | - const char* __fmt, | ||
208 | -#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
209 | - _Tv __v, const __c_locale& __cloc, int __prec) | ||
210 | + inline int | ||
211 | + __convert_from_v(const __c_locale& | ||
212 | +#ifndef __UCLIBC_HAS_XCLOCALE__ | ||
213 | + __cloc __attribute__ ((__unused__)) | ||
214 | +#endif | ||
215 | + , | ||
216 | + char* __out, | ||
217 | + const int __size, | ||
218 | + const char* __fmt, ...) | ||
219 | { | ||
220 | + va_list __args; | ||
221 | +#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
222 | + | ||
223 | __c_locale __old = __gnu_cxx::__uselocale(__cloc); | ||
224 | #else | ||
225 | - _Tv __v, const __c_locale&, int __prec) | ||
226 | - { | ||
227 | # ifdef __UCLIBC_HAS_LOCALE__ | ||
228 | char* __old = std::setlocale(LC_ALL, NULL); | ||
229 | char* __sav = new char[std::strlen(__old) + 1]; | ||
230 | @@ -103,7 +107,9 @@ namespace std | ||
231 | # endif | ||
232 | #endif | ||
233 | |||
234 | - const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | ||
235 | + va_start(__args, __fmt); | ||
236 | + const int __ret = std::vsnprintf(__out, __size, __fmt, __args); | ||
237 | + va_end(__args); | ||
238 | |||
239 | #ifdef __UCLIBC_HAS_XCLOCALE__ | ||
240 | __gnu_cxx::__uselocale(__old); | ||
241 | diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
242 | index 7b12861..13e011d 100644 | ||
243 | --- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
244 | +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
245 | @@ -33,16 +33,20 @@ | ||
246 | |||
247 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
248 | |||
249 | +#include <features.h> | ||
250 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
251 | #define _LIBC | ||
252 | #include <locale> | ||
253 | #undef _LIBC | ||
254 | +#else | ||
255 | +#include <locale> | ||
256 | +#endif | ||
257 | #include <bits/c++locale_internal.h> | ||
258 | |||
259 | -namespace std | ||
260 | -{ | ||
261 | +_GLIBCXX_BEGIN_NAMESPACE(std) | ||
262 | + | ||
263 | // NB: The other ctype<char> specializations are in src/locale.cc and | ||
264 | // various /config/os/* files. | ||
265 | - template<> | ||
266 | ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) | ||
267 | : ctype<char>(0, false, __refs) | ||
268 | { | ||
269 | @@ -57,6 +61,8 @@ namespace std | ||
270 | #endif | ||
271 | } | ||
272 | } | ||
273 | + ctype_byname<char>::~ctype_byname() | ||
274 | + { } | ||
275 | |||
276 | #ifdef _GLIBCXX_USE_WCHAR_T | ||
277 | ctype<wchar_t>::__wmask_type | ||
278 | @@ -138,17 +144,33 @@ namespace std | ||
279 | ctype<wchar_t>:: | ||
280 | do_is(mask __m, wchar_t __c) const | ||
281 | { | ||
282 | - // Highest bitmask in ctype_base == 10, but extra in "C" | ||
283 | - // library for blank. | ||
284 | + // The case of __m == ctype_base::space is particularly important, | ||
285 | + // due to its use in many istream functions. Therefore we deal with | ||
286 | + // it first, exploiting the knowledge that on GNU systems _M_bit[5] | ||
287 | + // is the mask corresponding to ctype_base::space. NB: an encoding | ||
288 | + // change would not affect correctness! | ||
289 | + | ||
290 | bool __ret = false; | ||
291 | - const size_t __bitmasksize = 11; | ||
292 | - for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
293 | - if (__m & _M_bit[__bitcur] | ||
294 | - && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
295 | - { | ||
296 | - __ret = true; | ||
297 | - break; | ||
298 | - } | ||
299 | + if (__m == _M_bit[5]) | ||
300 | + __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); | ||
301 | + else | ||
302 | + { | ||
303 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
304 | + // library for blank. | ||
305 | + const size_t __bitmasksize = 11; | ||
306 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
307 | + if (__m & _M_bit[__bitcur]) | ||
308 | + { | ||
309 | + if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
310 | + { | ||
311 | + __ret = true; | ||
312 | + break; | ||
313 | + } | ||
314 | + else if (__m == _M_bit[__bitcur]) | ||
315 | + break; | ||
316 | + } | ||
317 | + } | ||
318 | + | ||
319 | return __ret; | ||
320 | } | ||
321 | |||
322 | @@ -290,4 +312,5 @@ namespace std | ||
323 | #endif | ||
324 | } | ||
325 | #endif // _GLIBCXX_USE_WCHAR_T | ||
326 | -} | ||
327 | + | ||
328 | +_GLIBCXX_END_NAMESPACE | ||
329 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
330 | index d89da33..067657a 100644 | ||
331 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
332 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
333 | @@ -53,12 +53,16 @@ | ||
334 | template<typename _CharT> | ||
335 | messages<_CharT>::messages(__c_locale __cloc, const char* __s, | ||
336 | size_t __refs) | ||
337 | - : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), | ||
338 | - _M_name_messages(__s) | ||
339 | + : facet(__refs), _M_c_locale_messages(NULL), | ||
340 | + _M_name_messages(NULL) | ||
341 | { | ||
342 | - char* __tmp = new char[std::strlen(__s) + 1]; | ||
343 | - std::strcpy(__tmp, __s); | ||
344 | + const size_t __len = std::strlen(__s) + 1; | ||
345 | + char* __tmp = new char[__len]; | ||
346 | + std::memcpy(__tmp, __s, __len); | ||
347 | _M_name_messages = __tmp; | ||
348 | + | ||
349 | + // Last to avoid leaking memory if new throws. | ||
350 | + _M_c_locale_messages = _S_clone_c_locale(__cloc); | ||
351 | } | ||
352 | |||
353 | template<typename _CharT> | ||
354 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
355 | index 31ebb9f..7679b9c 100644 | ||
356 | --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
357 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
358 | @@ -33,9 +33,14 @@ | ||
359 | |||
360 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
361 | |||
362 | +#include <features.h> | ||
363 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
364 | #define _LIBC | ||
365 | #include <locale> | ||
366 | #undef _LIBC | ||
367 | +#else | ||
368 | +#include <locale> | ||
369 | +#endif | ||
370 | #include <bits/c++locale_internal.h> | ||
371 | |||
372 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
373 | @@ -206,7 +211,7 @@ namespace std | ||
374 | } | ||
375 | break; | ||
376 | default: | ||
377 | - ; | ||
378 | + __ret = pattern(); | ||
379 | } | ||
380 | return __ret; | ||
381 | } | ||
382 | @@ -390,7 +395,9 @@ namespace std | ||
383 | __c_locale __old = __uselocale(__cloc); | ||
384 | #else | ||
385 | // Switch to named locale so that mbsrtowcs will work. | ||
386 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
387 | + char* __old = setlocale(LC_ALL, NULL); | ||
388 | + const size_t __llen = strlen(__old) + 1; | ||
389 | + char* __sav = new char[__llen]; | ||
390 | setlocale(LC_ALL, __name); | ||
391 | #endif | ||
392 | |||
393 | @@ -477,8 +484,8 @@ namespace std | ||
394 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
395 | __uselocale(__old); | ||
396 | #else | ||
397 | - setlocale(LC_ALL, __old); | ||
398 | - free(__old); | ||
399 | + setlocale(LC_ALL, __sav); | ||
400 | + delete [] __sav; | ||
401 | #endif | ||
402 | __throw_exception_again; | ||
403 | } | ||
404 | @@ -498,8 +505,8 @@ namespace std | ||
405 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
406 | __uselocale(__old); | ||
407 | #else | ||
408 | - setlocale(LC_ALL, __old); | ||
409 | - free(__old); | ||
410 | + setlocale(LC_ALL, __sav); | ||
411 | + delete [] __sav; | ||
412 | #endif | ||
413 | } | ||
414 | } | ||
415 | @@ -545,8 +552,11 @@ namespace std | ||
416 | __c_locale __old = __uselocale(__cloc); | ||
417 | #else | ||
418 | // Switch to named locale so that mbsrtowcs will work. | ||
419 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
420 | - setlocale(LC_ALL, __name); | ||
421 | + char* __old = setlocale(LC_ALL, NULL); | ||
422 | + const size_t __llen = strlen(__old) + 1; | ||
423 | + char* __sav = new char[__llen]; | ||
424 | + memcpy(__sav, __old, __llen); | ||
425 | + setlocale(LC_ALL, __name); | ||
426 | #endif | ||
427 | |||
428 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
429 | @@ -633,8 +643,8 @@ namespace std | ||
430 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
431 | __uselocale(__old); | ||
432 | #else | ||
433 | - setlocale(LC_ALL, __old); | ||
434 | - free(__old); | ||
435 | + setlocale(LC_ALL, __sav); | ||
436 | + delete [] __sav; | ||
437 | #endif | ||
438 | __throw_exception_again; | ||
439 | } | ||
440 | @@ -653,8 +663,8 @@ namespace std | ||
441 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
442 | __uselocale(__old); | ||
443 | #else | ||
444 | - setlocale(LC_ALL, __old); | ||
445 | - free(__old); | ||
446 | + setlocale(LC_ALL, __sav); | ||
447 | + delete [] __sav; | ||
448 | #endif | ||
449 | } | ||
450 | } | ||
451 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
452 | index d5c8961..8ae8969 100644 | ||
453 | --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
454 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
455 | @@ -33,9 +33,14 @@ | ||
456 | |||
457 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
458 | |||
459 | +#include <features.h> | ||
460 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
461 | #define _LIBC | ||
462 | #include <locale> | ||
463 | #undef _LIBC | ||
464 | +#else | ||
465 | +#include <locale> | ||
466 | +#endif | ||
467 | #include <bits/c++locale_internal.h> | ||
468 | |||
469 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
470 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
471 | index d848ed5..f24d53e 100644 | ||
472 | --- a/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
473 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
474 | @@ -53,11 +53,14 @@ namespace std | ||
475 | const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, | ||
476 | _M_c_locale_timepunct); | ||
477 | #else | ||
478 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
479 | + char* __old = setlocale(LC_ALL, NULL); | ||
480 | + const size_t __llen = strlen(__old) + 1; | ||
481 | + char* __sav = new char[__llen]; | ||
482 | + memcpy(__sav, __old, __llen); | ||
483 | setlocale(LC_ALL, _M_name_timepunct); | ||
484 | const size_t __len = strftime(__s, __maxlen, __format, __tm); | ||
485 | - setlocale(LC_ALL, __old); | ||
486 | - free(__old); | ||
487 | + setlocale(LC_ALL, __sav); | ||
488 | + delete [] __sav; | ||
489 | #endif | ||
490 | // Make sure __s is null terminated. | ||
491 | if (__len == 0) | ||
492 | @@ -207,11 +210,14 @@ namespace std | ||
493 | const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, | ||
494 | _M_c_locale_timepunct); | ||
495 | #else | ||
496 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
497 | + char* __old = setlocale(LC_ALL, NULL); | ||
498 | + const size_t __llen = strlen(__old) + 1; | ||
499 | + char* __sav = new char[__llen]; | ||
500 | + memcpy(__sav, __old, __llen); | ||
501 | setlocale(LC_ALL, _M_name_timepunct); | ||
502 | const size_t __len = wcsftime(__s, __maxlen, __format, __tm); | ||
503 | - setlocale(LC_ALL, __old); | ||
504 | - free(__old); | ||
505 | + setlocale(LC_ALL, __sav); | ||
506 | + delete [] __sav; | ||
507 | #endif | ||
508 | // Make sure __s is null terminated. | ||
509 | if (__len == 0) | ||
510 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
511 | index ba8e858..1665dde 100644 | ||
512 | --- a/libstdc++-v3/config/locale/uclibc/time_members.h | ||
513 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
514 | @@ -50,12 +50,21 @@ | ||
515 | __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | ||
516 | size_t __refs) | ||
517 | : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
518 | - _M_name_timepunct(__s) | ||
519 | + _M_name_timepunct(NULL) | ||
520 | { | ||
521 | - char* __tmp = new char[std::strlen(__s) + 1]; | ||
522 | - std::strcpy(__tmp, __s); | ||
523 | + const size_t __len = std::strlen(__s) + 1; | ||
524 | + char* __tmp = new char[__len]; | ||
525 | + std::memcpy(__tmp, __s, __len); | ||
526 | _M_name_timepunct = __tmp; | ||
527 | - _M_initialize_timepunct(__cloc); | ||
528 | + | ||
529 | + try | ||
530 | + { _M_initialize_timepunct(__cloc); } | ||
531 | + catch(...) | ||
532 | + { | ||
533 | + delete [] _M_name_timepunct; | ||
534 | + __throw_exception_again; | ||
535 | + } | ||
536 | + | ||
537 | } | ||
538 | |||
539 | template<typename _CharT> | ||
540 | -- | ||
541 | 1.7.10.4 | ||
542 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0008-missing-execinfo_h.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0008-missing-execinfo_h.patch new file mode 100644 index 0000000..2823809 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0008-missing-execinfo_h.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 9f2158451981cf0a80cfabdc79ae31bb6976a801 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:48:10 +0400 | ||
4 | Subject: [PATCH 08/35] missing-execinfo_h | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | boehm-gc/include/gc.h | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h | ||
14 | index c51e017..a7ba8dc 100644 | ||
15 | --- a/boehm-gc/include/gc.h | ||
16 | +++ b/boehm-gc/include/gc.h | ||
17 | @@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); | ||
18 | #if defined(__linux__) || defined(__GLIBC__) | ||
19 | # include <features.h> | ||
20 | # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ | ||
21 | - && !defined(__ia64__) | ||
22 | + && !defined(__ia64__) && !defined(__UCLIBC__) | ||
23 | # ifndef GC_HAVE_BUILTIN_BACKTRACE | ||
24 | # define GC_HAVE_BUILTIN_BACKTRACE | ||
25 | # endif | ||
26 | -- | ||
27 | 1.7.10.4 | ||
28 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0009-c99-snprintf.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0009-c99-snprintf.patch new file mode 100644 index 0000000..7168778 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0009-c99-snprintf.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From e393e076f1ab82d25e1aa04d6edea27b41d3eb06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:49:03 +0400 | ||
4 | Subject: [PATCH 09/35] c99-snprintf | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/include/c_std/cstdio | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio | ||
14 | index e85bd83..6af839a 100644 | ||
15 | --- a/libstdc++-v3/include/c_std/cstdio | ||
16 | +++ b/libstdc++-v3/include/c_std/cstdio | ||
17 | @@ -139,7 +139,7 @@ namespace std | ||
18 | using ::vsprintf; | ||
19 | } // namespace std | ||
20 | |||
21 | -#if _GLIBCXX_USE_C99 | ||
22 | +#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) | ||
23 | |||
24 | #undef snprintf | ||
25 | #undef vfscanf | ||
26 | -- | ||
27 | 1.7.10.4 | ||
28 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0010-c99-complex-ugly-hack.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0010-c99-complex-ugly-hack.patch new file mode 100644 index 0000000..b628571 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0010-c99-complex-ugly-hack.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 73f69d806e2c9561a54995223431a1076cfd6164 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:49:57 +0400 | ||
4 | Subject: [PATCH 10/35] c99-complex-ugly-hack | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | --- | ||
10 | libstdc++-v3/configure | 3 +++ | ||
11 | 1 file changed, 3 insertions(+) | ||
12 | |||
13 | diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure | ||
14 | index c57a751..a1333e2 100755 | ||
15 | --- a/libstdc++-v3/configure | ||
16 | +++ b/libstdc++-v3/configure | ||
17 | @@ -18734,6 +18734,9 @@ $as_echo_n "checking for ISO C99 support to TR1 in <complex.h>... " >&6; } | ||
18 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
19 | /* end confdefs.h. */ | ||
20 | #include <complex.h> | ||
21 | +#ifdef __UCLIBC__ | ||
22 | +#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs | ||
23 | +#endif | ||
24 | int | ||
25 | main () | ||
26 | { | ||
27 | -- | ||
28 | 1.7.10.4 | ||
29 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0011-index_macro.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0011-index_macro.patch new file mode 100644 index 0000000..8ee79b0 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0011-index_macro.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From b037953e40312b45ab84ed0a3ad882bb5e413101 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:51:02 +0400 | ||
4 | Subject: [PATCH 11/35] index_macro | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/include/ext/rope | 3 +++ | ||
11 | libstdc++-v3/include/ext/ropeimpl.h | 3 +++ | ||
12 | 2 files changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope | ||
15 | index 38eb1e8..158d21a 100644 | ||
16 | --- a/libstdc++-v3/include/ext/rope | ||
17 | +++ b/libstdc++-v3/include/ext/rope | ||
18 | @@ -55,6 +55,9 @@ | ||
19 | #include <bits/gthr.h> | ||
20 | #include <tr1/functional> | ||
21 | |||
22 | +/* cope w/ index defined as macro, SuSv3 proposal */ | ||
23 | +#undef index | ||
24 | + | ||
25 | # ifdef __GC | ||
26 | # define __GC_CONST const | ||
27 | # else | ||
28 | diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h | ||
29 | index d7b5cbd..b9b3acb 100644 | ||
30 | --- a/libstdc++-v3/include/ext/ropeimpl.h | ||
31 | +++ b/libstdc++-v3/include/ext/ropeimpl.h | ||
32 | @@ -48,6 +48,9 @@ | ||
33 | #include <ext/memory> // For uninitialized_copy_n | ||
34 | #include <ext/numeric> // For power | ||
35 | |||
36 | +/* cope w/ index defined as macro, SuSv3 proposal */ | ||
37 | +#undef index | ||
38 | + | ||
39 | namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) | ||
40 | { | ||
41 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
42 | -- | ||
43 | 1.7.10.4 | ||
44 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0012-libmudflap-susv3-legacy.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0012-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000..968d45e --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0012-libmudflap-susv3-legacy.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From a0cb13bdd98a941b81fdafe4cd96e4c569feb651 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:52:36 +0400 | ||
4 | Subject: [PATCH 12/35] libmudflap-susv3-legacy | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | --- | ||
10 | libmudflap/mf-hooks2.c | 10 +++++----- | ||
11 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
12 | |||
13 | diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c | ||
14 | index 4af17df..a3c6b2f 100644 | ||
15 | --- a/libmudflap/mf-hooks2.c | ||
16 | +++ b/libmudflap/mf-hooks2.c | ||
17 | @@ -424,7 +424,7 @@ WRAPPER2(void, bzero, void *s, size_t n) | ||
18 | { | ||
19 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
20 | MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); | ||
21 | - bzero (s, n); | ||
22 | + memset (s, 0, n); | ||
23 | } | ||
24 | |||
25 | |||
26 | @@ -434,7 +434,7 @@ WRAPPER2(void, bcopy, const void *src, void *dest, size_t n) | ||
27 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
28 | MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); | ||
29 | MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); | ||
30 | - bcopy (src, dest, n); | ||
31 | + memmove (dest, src, n); | ||
32 | } | ||
33 | |||
34 | |||
35 | @@ -444,7 +444,7 @@ WRAPPER2(int, bcmp, const void *s1, const void *s2, size_t n) | ||
36 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
37 | MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); | ||
38 | MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); | ||
39 | - return bcmp (s1, s2, n); | ||
40 | + return n == 0 ? 0 : memcmp (s1, s2, n); | ||
41 | } | ||
42 | |||
43 | |||
44 | @@ -453,7 +453,7 @@ WRAPPER2(char *, index, const char *s, int c) | ||
45 | size_t n = strlen (s); | ||
46 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
47 | MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); | ||
48 | - return index (s, c); | ||
49 | + return strchr (s, c); | ||
50 | } | ||
51 | |||
52 | |||
53 | @@ -462,7 +462,7 @@ WRAPPER2(char *, rindex, const char *s, int c) | ||
54 | size_t n = strlen (s); | ||
55 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
56 | MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); | ||
57 | - return rindex (s, c); | ||
58 | + return strrchr (s, c); | ||
59 | } | ||
60 | |||
61 | /* XXX: stpcpy, memccpy */ | ||
62 | -- | ||
63 | 1.7.10.4 | ||
64 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0013-libstdc-namespace.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0013-libstdc-namespace.patch new file mode 100644 index 0000000..4a3efde --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0013-libstdc-namespace.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 104e4d66208f2726b14d2f5eebce90700cbc83c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:54:02 +0400 | ||
4 | Subject: [PATCH 13/35] libstdc++-namespace | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/config/locale/uclibc/messages_members.h | 4 +++- | ||
11 | libstdc++-v3/config/locale/uclibc/time_members.h | 4 +++- | ||
12 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
15 | index 067657a..dd76a6c 100644 | ||
16 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
17 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
18 | @@ -32,7 +32,8 @@ | ||
19 | // | ||
20 | |||
21 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
22 | - | ||
23 | +namespace std | ||
24 | +{ | ||
25 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
26 | #warning fix prototypes for *textdomain funcs | ||
27 | #endif | ||
28 | @@ -116,3 +117,4 @@ | ||
29 | this->_S_create_c_locale(this->_M_c_locale_messages, __s); | ||
30 | } | ||
31 | } | ||
32 | +} | ||
33 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
34 | index 1665dde..905c433 100644 | ||
35 | --- a/libstdc++-v3/config/locale/uclibc/time_members.h | ||
36 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
37 | @@ -33,7 +33,8 @@ | ||
38 | // | ||
39 | |||
40 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
41 | - | ||
42 | +namespace std | ||
43 | +{ | ||
44 | template<typename _CharT> | ||
45 | __timepunct<_CharT>::__timepunct(size_t __refs) | ||
46 | : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
47 | @@ -75,3 +76,4 @@ | ||
48 | delete _M_data; | ||
49 | _S_destroy_c_locale(_M_c_locale_timepunct); | ||
50 | } | ||
51 | +} | ||
52 | -- | ||
53 | 1.7.10.4 | ||
54 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0014-sh-pr24836.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0014-sh-pr24836.patch new file mode 100644 index 0000000..d74f493 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0014-sh-pr24836.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From edc9acb181810f234b6b9f7d2820b0e4f6a1eeaf Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:54:48 +0400 | ||
4 | Subject: [PATCH 14/35] sh-pr24836 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 | ||
11 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 | ||
12 | --- | ||
13 | gcc/configure | 2 +- | ||
14 | gcc/configure.ac | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | Index: gcc-linaro-4.8-2013.10/gcc/configure | ||
18 | =================================================================== | ||
19 | --- gcc-linaro-4.8-2013.10.orig/gcc/configure 2013-11-05 23:39:39.000000000 -0800 | ||
20 | +++ gcc-linaro-4.8-2013.10/gcc/configure 2013-11-06 15:22:43.000000000 -0800 | ||
21 | @@ -23394,7 +23394,7 @@ | ||
22 | tls_first_minor=14 | ||
23 | tls_as_opt="-m64 -Aesame --fatal-warnings" | ||
24 | ;; | ||
25 | - sh-*-* | sh[34]-*-*) | ||
26 | + sh-*-* | sh[34]*-*-*) | ||
27 | conftest_s=' | ||
28 | .section ".tdata","awT",@progbits | ||
29 | foo: .long 25 | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch new file mode 100644 index 0000000..1081222 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 50e5366005b0f6af27378e2a5c3cb9f9936a7e62 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:58:36 +0400 | ||
4 | Subject: [PATCH 15/35] arm: Use TARGET_ENDIAN_OPTION for determining | ||
5 | MULTILIB_DEFAULTS | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | --- | ||
11 | gcc/config/arm/linux-elf.h | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h | ||
15 | index 488efa4..753dc3a 100644 | ||
16 | --- a/gcc/config/arm/linux-elf.h | ||
17 | +++ b/gcc/config/arm/linux-elf.h | ||
18 | @@ -46,7 +46,7 @@ | ||
19 | |||
20 | #undef MULTILIB_DEFAULTS | ||
21 | #define MULTILIB_DEFAULTS \ | ||
22 | - { "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" } | ||
23 | + { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=hard", "mno-thumb-interwork" } | ||
24 | |||
25 | /* Now we define the strings used to build the spec file. */ | ||
26 | #undef LIB_SPEC | ||
27 | -- | ||
28 | 1.7.10.4 | ||
29 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0016-gcc-poison-system-directories.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0016-gcc-poison-system-directories.patch new file mode 100644 index 0000000..48e7d40 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0016-gcc-poison-system-directories.patch | |||
@@ -0,0 +1,224 @@ | |||
1 | From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:59:00 +0400 | ||
4 | Subject: [PATCH 16/35] gcc: poison-system-directories | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [distribution: codesourcery] | ||
9 | --- | ||
10 | gcc/Makefile.in | 2 +- | ||
11 | gcc/common.opt | 4 ++++ | ||
12 | gcc/config.in | 6 ++++++ | ||
13 | gcc/configure | 20 ++++++++++++++++++-- | ||
14 | gcc/configure.ac | 10 ++++++++++ | ||
15 | gcc/doc/invoke.texi | 9 +++++++++ | ||
16 | gcc/gcc.c | 2 ++ | ||
17 | gcc/incpath.c | 19 +++++++++++++++++++ | ||
18 | 8 files changed, 69 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
21 | index 54ea04f..90a2bba 100644 | ||
22 | --- a/gcc/Makefile.in | ||
23 | +++ b/gcc/Makefile.in | ||
24 | @@ -2018,7 +2018,7 @@ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ | ||
25 | |||
26 | incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ | ||
27 | intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ | ||
28 | - $(MACHMODE_H) | ||
29 | + $(MACHMODE_H) $(FLAGS_H) toplev.h | ||
30 | |||
31 | CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s) | ||
32 | prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \ | ||
33 | diff --git a/gcc/common.opt b/gcc/common.opt | ||
34 | index bdbd3b6..ab86b00 100644 | ||
35 | --- a/gcc/common.opt | ||
36 | +++ b/gcc/common.opt | ||
37 | @@ -595,6 +595,10 @@ Wpedantic | ||
38 | Common Var(pedantic) Warning | ||
39 | Issue warnings needed for strict compliance to the standard | ||
40 | |||
41 | +Wpoison-system-directories | ||
42 | +Common Var(flag_poison_system_directories) Init(1) Warning | ||
43 | +Warn for -I and -L options using system directories if cross compiling | ||
44 | + | ||
45 | Wshadow | ||
46 | Common Var(warn_shadow) Warning | ||
47 | Warn when one local variable shadows another | ||
48 | diff --git a/gcc/config.in b/gcc/config.in | ||
49 | index d80fb9f..0524af7 100644 | ||
50 | --- a/gcc/config.in | ||
51 | +++ b/gcc/config.in | ||
52 | @@ -138,6 +138,12 @@ | ||
53 | #endif | ||
54 | |||
55 | |||
56 | +/* Define to warn for use of native system header directories */ | ||
57 | +#ifndef USED_FOR_TARGET | ||
58 | +#undef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
59 | +#endif | ||
60 | + | ||
61 | + | ||
62 | /* Define if you want all operations on RTL (the basic data structure of the | ||
63 | optimizer and back end) to be checked for dynamic type safety at runtime. | ||
64 | This is quite expensive. */ | ||
65 | diff --git a/gcc/configure b/gcc/configure | ||
66 | index 135bbf5..b65d21d 100755 | ||
67 | --- a/gcc/configure | ||
68 | +++ b/gcc/configure | ||
69 | @@ -917,6 +917,7 @@ with_gc | ||
70 | with_system_zlib | ||
71 | enable_maintainer_mode | ||
72 | enable_version_specific_runtime_libs | ||
73 | +enable_poison_system_directories | ||
74 | enable_plugin | ||
75 | enable_libquadmath_support | ||
76 | with_linker_hash_style | ||
77 | @@ -1630,6 +1631,8 @@ Optional Features: | ||
78 | --enable-version-specific-runtime-libs | ||
79 | specify that runtime libraries should be installed | ||
80 | in a compiler-specific directory | ||
81 | + --enable-poison-system-directories | ||
82 | + warn for use of native system header directories | ||
83 | --enable-plugin enable plugin support | ||
84 | --disable-libquadmath-support | ||
85 | disable libquadmath support for Fortran | ||
86 | @@ -17828,7 +17831,7 @@ else | ||
87 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
88 | lt_status=$lt_dlunknown | ||
89 | cat > conftest.$ac_ext <<_LT_EOF | ||
90 | -#line 17830 "configure" | ||
91 | +#line 17834 "configure" | ||
92 | #include "confdefs.h" | ||
93 | |||
94 | #if HAVE_DLFCN_H | ||
95 | @@ -17934,7 +17937,7 @@ else | ||
96 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
97 | lt_status=$lt_dlunknown | ||
98 | cat > conftest.$ac_ext <<_LT_EOF | ||
99 | -#line 17936 "configure" | ||
100 | +#line 17940 "configure" | ||
101 | #include "confdefs.h" | ||
102 | |||
103 | #if HAVE_DLFCN_H | ||
104 | @@ -27103,6 +27106,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : | ||
105 | fi | ||
106 | |||
107 | |||
108 | +# Check whether --enable-poison-system-directories was given. | ||
109 | +if test "${enable_poison_system_directories+set}" = set; then : | ||
110 | + enableval=$enable_poison_system_directories; | ||
111 | +else | ||
112 | + enable_poison_system_directories=no | ||
113 | +fi | ||
114 | + | ||
115 | +if test "x${enable_poison_system_directories}" = "xyes"; then | ||
116 | + | ||
117 | +$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h | ||
118 | + | ||
119 | +fi | ||
120 | + | ||
121 | # Substitute configuration variables | ||
122 | |||
123 | |||
124 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
125 | index 6363a21..e226b85 100644 | ||
126 | --- a/gcc/configure.ac | ||
127 | +++ b/gcc/configure.ac | ||
128 | @@ -5063,6 +5063,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, | ||
129 | [specify that runtime libraries should be | ||
130 | installed in a compiler-specific directory])]) | ||
131 | |||
132 | +AC_ARG_ENABLE([poison-system-directories], | ||
133 | + AS_HELP_STRING([--enable-poison-system-directories], | ||
134 | + [warn for use of native system header directories]),, | ||
135 | + [enable_poison_system_directories=no]) | ||
136 | +if test "x${enable_poison_system_directories}" = "xyes"; then | ||
137 | + AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], | ||
138 | + [1], | ||
139 | + [Define to warn for use of native system header directories]) | ||
140 | +fi | ||
141 | + | ||
142 | # Substitute configuration variables | ||
143 | AC_SUBST(subdirs) | ||
144 | AC_SUBST(srcdir) | ||
145 | diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi | ||
146 | index 9273d7d..a022622 100644 | ||
147 | --- a/gcc/doc/invoke.texi | ||
148 | +++ b/gcc/doc/invoke.texi | ||
149 | @@ -258,6 +258,7 @@ Objective-C and Objective-C++ Dialects}. | ||
150 | -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol | ||
151 | -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol | ||
152 | -Wpointer-arith -Wno-pointer-to-int-cast @gol | ||
153 | +-Wno-poison-system-directories @gol | ||
154 | -Wredundant-decls -Wno-return-local-addr @gol | ||
155 | -Wreturn-type -Wsequence-point -Wshadow @gol | ||
156 | -Wsign-compare -Wsign-conversion -Wsizeof-pointer-memaccess @gol | ||
157 | @@ -4007,6 +4008,14 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. | ||
158 | for most targets, it is made up of code and thus requires the stack | ||
159 | to be made executable in order for the program to work properly. | ||
160 | |||
161 | +@item -Wno-poison-system-directories | ||
162 | +@opindex Wno-poison-system-directories | ||
163 | +Do not warn for @option{-I} or @option{-L} options using system | ||
164 | +directories such as @file{/usr/include} when cross compiling. This | ||
165 | +option is intended for use in chroot environments when such | ||
166 | +directories contain the correct headers and libraries for the target | ||
167 | +system rather than the host. | ||
168 | + | ||
169 | @item -Wfloat-equal | ||
170 | @opindex Wfloat-equal | ||
171 | @opindex Wno-float-equal | ||
172 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
173 | index 86077f8..efdb625 100644 | ||
174 | --- a/gcc/gcc.c | ||
175 | +++ b/gcc/gcc.c | ||
176 | @@ -740,6 +740,8 @@ proper position among the other output files. */ | ||
177 | "%{fuse-ld=*:-fuse-ld=%*}\ | ||
178 | %X %{o*} %{e*} %{N} %{n} %{r}\ | ||
179 | %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ | ||
180 | + %{Wno-poison-system-directories:--no-poison-system-directories}\ | ||
181 | + %{Werror=poison-system-directories:--error-poison-system-directories}\ | ||
182 | %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ | ||
183 | %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ | ||
184 | %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ | ||
185 | diff --git a/gcc/incpath.c b/gcc/incpath.c | ||
186 | index 018da98..cd41c78 100644 | ||
187 | --- a/gcc/incpath.c | ||
188 | +++ b/gcc/incpath.c | ||
189 | @@ -28,6 +28,7 @@ | ||
190 | #include "intl.h" | ||
191 | #include "incpath.h" | ||
192 | #include "cppdefault.h" | ||
193 | +#include "diagnostic-core.h" | ||
194 | |||
195 | /* Microsoft Windows does not natively support inodes. | ||
196 | VMS has non-numeric inodes. */ | ||
197 | @@ -382,6 +383,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) | ||
198 | } | ||
199 | fprintf (stderr, _("End of search list.\n")); | ||
200 | } | ||
201 | + | ||
202 | +#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
203 | + if (flag_poison_system_directories) | ||
204 | + { | ||
205 | + struct cpp_dir *p; | ||
206 | + | ||
207 | + for (p = heads[QUOTE]; p; p = p->next) | ||
208 | + { | ||
209 | + if ((!strncmp (p->name, "/usr/include", 12)) | ||
210 | + || (!strncmp (p->name, "/usr/local/include", 18)) | ||
211 | + || (!strncmp (p->name, "/usr/X11R6/include", 18))) | ||
212 | + warning (OPT_Wpoison_system_directories, | ||
213 | + "include location \"%s\" is unsafe for " | ||
214 | + "cross-compilation", | ||
215 | + p->name); | ||
216 | + } | ||
217 | + } | ||
218 | +#endif | ||
219 | } | ||
220 | |||
221 | /* Use given -I paths for #include "..." but not #include <...>, and | ||
222 | -- | ||
223 | 1.7.10.4 | ||
224 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0017-gcc-poison-dir-extend.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0017-gcc-poison-dir-extend.patch new file mode 100644 index 0000000..9e81efd --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0017-gcc-poison-dir-extend.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From e99c9c97266d6d3e8cac798aa91408250c4d60cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:00:34 +0400 | ||
4 | Subject: [PATCH 17/35] gcc-poison-dir-extend | ||
5 | |||
6 | Add /sw/include and /opt/include based on the original | ||
7 | zecke-no-host-includes.patch patch. The original patch checked for | ||
8 | /usr/include, /sw/include and /opt/include and then triggered a failure and | ||
9 | aborted. | ||
10 | |||
11 | Instead, we add the two missing items to the current scan. If the user | ||
12 | wants this to be a failure, they can add "-Werror=poison-system-directories". | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Pending | ||
18 | --- | ||
19 | gcc/incpath.c | 4 +++- | ||
20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/gcc/incpath.c b/gcc/incpath.c | ||
23 | index cd41c78..eac4a92 100644 | ||
24 | --- a/gcc/incpath.c | ||
25 | +++ b/gcc/incpath.c | ||
26 | @@ -393,7 +393,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) | ||
27 | { | ||
28 | if ((!strncmp (p->name, "/usr/include", 12)) | ||
29 | || (!strncmp (p->name, "/usr/local/include", 18)) | ||
30 | - || (!strncmp (p->name, "/usr/X11R6/include", 18))) | ||
31 | + || (!strncmp (p->name, "/usr/X11R6/include", 18)) | ||
32 | + || (!strncmp (p->name, "/sw/include", 11)) | ||
33 | + || (!strncmp (p->name, "/opt/include", 12))) | ||
34 | warning (OPT_Wpoison_system_directories, | ||
35 | "include location \"%s\" is unsafe for " | ||
36 | "cross-compilation", | ||
37 | -- | ||
38 | 1.7.10.4 | ||
39 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 0000000..a28cafd --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 56207fa2923e8edf774e98ffac82666091076be3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:08:31 +0400 | ||
4 | Subject: [PATCH 18/35] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET | ||
5 | |||
6 | Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. | ||
7 | |||
8 | This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. | ||
9 | |||
10 | Other changes I had to do include: | ||
11 | |||
12 | - moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. | ||
13 | |||
14 | - passing the right CFLAGS to configure scripts as exported environment variables | ||
15 | |||
16 | I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. | ||
17 | |||
18 | Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? | ||
19 | |||
20 | Signed-off-by: Paolo Bonzini <bonzini@gnu.org> | ||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | |||
23 | Upstream-Status: Pending | ||
24 | --- | ||
25 | configure | 32 ++++++++++++++++++++++++++++++++ | ||
26 | 1 file changed, 32 insertions(+) | ||
27 | |||
28 | diff --git a/configure b/configure | ||
29 | index 1b76c90..e4dce7c 100755 | ||
30 | --- a/configure | ||
31 | +++ b/configure | ||
32 | @@ -6772,6 +6772,38 @@ fi | ||
33 | |||
34 | |||
35 | |||
36 | +# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS | ||
37 | +# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS | ||
38 | +# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). | ||
39 | +# We want to ensure that TARGET libraries (which we know are built with | ||
40 | +# gcc) are built with "-O2 -g", so include those options when setting | ||
41 | +# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. | ||
42 | +if test "x$CFLAGS_FOR_TARGET" = x; then | ||
43 | + CFLAGS_FOR_TARGET=$CFLAGS | ||
44 | + case " $CFLAGS " in | ||
45 | + *" -O2 "*) ;; | ||
46 | + *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; | ||
47 | + esac | ||
48 | + case " $CFLAGS " in | ||
49 | + *" -g "* | *" -g3 "*) ;; | ||
50 | + *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; | ||
51 | + esac | ||
52 | +fi | ||
53 | + | ||
54 | + | ||
55 | +if test "x$CXXFLAGS_FOR_TARGET" = x; then | ||
56 | + CXXFLAGS_FOR_TARGET=$CXXFLAGS | ||
57 | + case " $CXXFLAGS " in | ||
58 | + *" -O2 "*) ;; | ||
59 | + *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; | ||
60 | + esac | ||
61 | + case " $CXXFLAGS " in | ||
62 | + *" -g "* | *" -g3 "*) ;; | ||
63 | + *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; | ||
64 | + esac | ||
65 | +fi | ||
66 | + | ||
67 | + | ||
68 | # Handle --with-headers=XXX. If the value is not "yes", the contents of | ||
69 | # the named directory are copied to $(tooldir)/sys-include. | ||
70 | if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then | ||
71 | -- | ||
72 | 1.7.10.4 | ||
73 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0019-64-bit-multilib-hack.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0019-64-bit-multilib-hack.patch new file mode 100644 index 0000000..51f4dba --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0019-64-bit-multilib-hack.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From 18fde5740b09324dfb9cf41e9849672573ff5fa0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:10:06 +0400 | ||
4 | Subject: [PATCH 19/35] 64-bit multilib hack. | ||
5 | |||
6 | GCC has internal multilib handling code but it assumes a very specific rigid directory | ||
7 | layout. The build system implementation of multilib layout is very generic and allows | ||
8 | complete customisation of the library directories. | ||
9 | |||
10 | This patch is a partial solution to allow any custom directories to be passed into gcc | ||
11 | and handled correctly. It forces gcc to use the base_libdir (which is the current | ||
12 | directory, "."). We need to do this for each multilib that is configured as we don't | ||
13 | know which compiler options may be being passed into the compiler. Since we have a compiler | ||
14 | per mulitlib at this point that isn't an issue. | ||
15 | |||
16 | The one problem is the target compiler is only going to work for the default multlilib at | ||
17 | this point. Ideally we'd figure out which multilibs were being enabled with which paths | ||
18 | and be able to patch these entries with a complete set of correct paths but this we | ||
19 | don't have such code at this point. This is something the target gcc recipe should do | ||
20 | and override these platform defaults in its build config. | ||
21 | |||
22 | RP 15/8/11 | ||
23 | |||
24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
25 | Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> | ||
26 | |||
27 | Upstream-Status: Pending | ||
28 | --- | ||
29 | gcc/config/i386/t-linux64 | 6 ++---- | ||
30 | gcc/config/mips/t-linux64 | 10 +++------- | ||
31 | gcc/config/rs6000/t-linux64 | 5 ++--- | ||
32 | 3 files changed, 7 insertions(+), 14 deletions(-) | ||
33 | |||
34 | diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 | ||
35 | index bcea0c6..eb004d7 100644 | ||
36 | --- a/gcc/config/i386/t-linux64 | ||
37 | +++ b/gcc/config/i386/t-linux64 | ||
38 | @@ -32,7 +32,5 @@ | ||
39 | # | ||
40 | comma=, | ||
41 | MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) | ||
42 | -MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) | ||
43 | -MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) | ||
44 | -MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) | ||
45 | -MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) | ||
46 | +MULTILIB_DIRNAMES = . . | ||
47 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
48 | diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 | ||
49 | index bdbbd4f..16a6366 100644 | ||
50 | --- a/gcc/config/mips/t-linux64 | ||
51 | +++ b/gcc/config/mips/t-linux64 | ||
52 | @@ -17,10 +17,6 @@ | ||
53 | # <http://www.gnu.org/licenses/>. | ||
54 | |||
55 | MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 | ||
56 | -MULTILIB_DIRNAMES = n32 32 64 | ||
57 | -MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) | ||
58 | -MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) | ||
59 | -MULTILIB_OSDIRNAMES = \ | ||
60 | - ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ | ||
61 | - ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ | ||
62 | - ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) | ||
63 | +MULTILIB_DIRNAMES = . . . | ||
64 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
65 | + | ||
66 | diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 | ||
67 | index 9175de2..3971019 100644 | ||
68 | --- a/gcc/config/rs6000/t-linux64 | ||
69 | +++ b/gcc/config/rs6000/t-linux64 | ||
70 | @@ -26,7 +26,6 @@ | ||
71 | # MULTILIB_OSDIRNAMES according to what is found on the target. | ||
72 | |||
73 | MULTILIB_OPTIONS = m64/m32 | ||
74 | -MULTILIB_DIRNAMES = 64 32 | ||
75 | +MULTILIB_DIRNAMES = . . | ||
76 | MULTILIB_EXTRA_OPTS = fPIC | ||
77 | -MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu) | ||
78 | -MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) | ||
79 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
80 | -- | ||
81 | 1.7.10.4 | ||
82 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0020-optional-libstdc.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0020-optional-libstdc.patch new file mode 100644 index 0000000..eff021e --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0020-optional-libstdc.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From 307c8ff3ef666b7bd5ac733863f2fbb27a9d521e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:12:56 +0400 | ||
4 | Subject: [PATCH 20/35] optional libstdc | ||
5 | |||
6 | gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ | ||
7 | will not run correctly since by default the linker will try to link against libstdc++ | ||
8 | which shouldn't exist yet. We need an option to disable -lstdc++ | ||
9 | option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc | ||
10 | driver. This patch adds such an option which only disables the -lstdc++. | ||
11 | |||
12 | A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to | ||
13 | do this officially, the likely answer is don't build libstdc++ separately. | ||
14 | |||
15 | RP 29/6/10 | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | |||
19 | Upstream-Status: Inappropriate [embedded specific] | ||
20 | --- | ||
21 | gcc/c-family/c.opt | 4 ++++ | ||
22 | gcc/cp/g++spec.c | 1 + | ||
23 | gcc/doc/invoke.texi | 9 +++++++-- | ||
24 | gcc/gcc.c | 1 + | ||
25 | 4 files changed, 13 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt | ||
28 | index 10ae84d..dc3ffdf 100644 | ||
29 | --- a/gcc/c-family/c.opt | ||
30 | +++ b/gcc/c-family/c.opt | ||
31 | @@ -1299,6 +1299,10 @@ nostdinc++ | ||
32 | C++ ObjC++ | ||
33 | Do not search standard system include directories for C++ | ||
34 | |||
35 | +nostdlib++ | ||
36 | +Driver | ||
37 | +Do not link standard C++ runtime library | ||
38 | + | ||
39 | o | ||
40 | C ObjC C++ ObjC++ Joined Separate | ||
41 | ; Documented in common.opt | ||
42 | diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c | ||
43 | index b896eea..f55216b 100644 | ||
44 | --- a/gcc/cp/g++spec.c | ||
45 | +++ b/gcc/cp/g++spec.c | ||
46 | @@ -126,6 +126,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, | ||
47 | switch (decoded_options[i].opt_index) | ||
48 | { | ||
49 | case OPT_nostdlib: | ||
50 | + case OPT_nostdlib__: | ||
51 | case OPT_nodefaultlibs: | ||
52 | library = -1; | ||
53 | break; | ||
54 | diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi | ||
55 | index a022622..f15c991 100644 | ||
56 | --- a/gcc/doc/invoke.texi | ||
57 | +++ b/gcc/doc/invoke.texi | ||
58 | @@ -190,7 +190,7 @@ in the following sections. | ||
59 | -frepo -fno-rtti -fstats -ftemplate-backtrace-limit=@var{n} @gol | ||
60 | -ftemplate-depth=@var{n} @gol | ||
61 | -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol | ||
62 | --fno-default-inline -fvisibility-inlines-hidden @gol | ||
63 | +-nostdlib++ -fno-default-inline -fvisibility-inlines-hidden @gol | ||
64 | -fvisibility-ms-compat @gol | ||
65 | -fext-numeric-literals @gol | ||
66 | -Wabi -Wconversion-null -Wctor-dtor-privacy @gol | ||
67 | @@ -453,7 +453,7 @@ Objective-C and Objective-C++ Dialects}. | ||
68 | -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol | ||
69 | -s -static -static-libgcc -static-libstdc++ @gol | ||
70 | -static-libasan -static-libtsan @gol | ||
71 | --shared -shared-libgcc -symbolic @gol | ||
72 | +-shared -shared-libgcc -symbolic -nostdlib++ @gol | ||
73 | -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol | ||
74 | -u @var{symbol}} | ||
75 | |||
76 | @@ -9886,6 +9886,11 @@ These entries are usually resolved by entries in | ||
77 | libc. These entry points should be supplied through some other | ||
78 | mechanism when this option is specified. | ||
79 | |||
80 | +@item -nostdlib++ | ||
81 | +@opindex nostdlib++ | ||
82 | +Do not use the standard system C++ runtime libraries when linking. | ||
83 | +Only the libraries you specify will be passed to the linker. | ||
84 | + | ||
85 | @cindex @option{-lgcc}, use with @option{-nostdlib} | ||
86 | @cindex @option{-nostdlib} and unresolved references | ||
87 | @cindex unresolved references and @option{-nostdlib} | ||
88 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
89 | index efdb625..477752f 100644 | ||
90 | --- a/gcc/gcc.c | ||
91 | +++ b/gcc/gcc.c | ||
92 | @@ -748,6 +748,7 @@ proper position among the other output files. */ | ||
93 | %(mflib) " STACK_SPLIT_SPEC "\ | ||
94 | %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ | ||
95 | %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ | ||
96 | + %{!nostdlib++:}\ | ||
97 | %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" | ||
98 | #endif | ||
99 | |||
100 | -- | ||
101 | 1.7.10.4 | ||
102 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch new file mode 100644 index 0000000..eb3c61f --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 004696e054ae9dc71d512cc755ccc4074fc62b2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:14:20 +0400 | ||
4 | Subject: [PATCH 21/35] gcc: disable MASK_RELAX_PIC_CALLS bit | ||
5 | |||
6 | The new feature added after 4.3.3 | ||
7 | "http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" | ||
8 | will cause cc1plus eat up all the system memory when build webkit-gtk. | ||
9 | The function mips_get_pic_call_symbol keeps on recursively calling itself. | ||
10 | Disable this feature to walk aside the bug. | ||
11 | |||
12 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | Upstream-Status: Inappropriate [configuration] | ||
16 | --- | ||
17 | gcc/configure | 7 ------- | ||
18 | gcc/configure.ac | 7 ------- | ||
19 | 2 files changed, 14 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/configure b/gcc/configure | ||
22 | index b65d21d..bdab45a 100755 | ||
23 | --- a/gcc/configure | ||
24 | +++ b/gcc/configure | ||
25 | @@ -25829,13 +25829,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; | ||
26 | rm -f conftest.* | ||
27 | fi | ||
28 | fi | ||
29 | - if test $gcc_cv_as_ld_jalr_reloc = yes; then | ||
30 | - if test x$target_cpu_default = x; then | ||
31 | - target_cpu_default=MASK_RELAX_PIC_CALLS | ||
32 | - else | ||
33 | - target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" | ||
34 | - fi | ||
35 | - fi | ||
36 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 | ||
37 | $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } | ||
38 | |||
39 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
40 | index e226b85..5f5c909 100644 | ||
41 | --- a/gcc/configure.ac | ||
42 | +++ b/gcc/configure.ac | ||
43 | @@ -4099,13 +4099,6 @@ x: | ||
44 | rm -f conftest.* | ||
45 | fi | ||
46 | fi | ||
47 | - if test $gcc_cv_as_ld_jalr_reloc = yes; then | ||
48 | - if test x$target_cpu_default = x; then | ||
49 | - target_cpu_default=MASK_RELAX_PIC_CALLS | ||
50 | - else | ||
51 | - target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" | ||
52 | - fi | ||
53 | - fi | ||
54 | AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) | ||
55 | |||
56 | AC_CACHE_CHECK([linker for .eh_frame personality relaxation], | ||
57 | -- | ||
58 | 1.7.10.4 | ||
59 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0022-COLLECT_GCC_OPTIONS.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0022-COLLECT_GCC_OPTIONS.patch new file mode 100644 index 0000000..40c8abf --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0022-COLLECT_GCC_OPTIONS.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 7f5c9dcc71c8b83a0b5596266cc4bdf0936e8e00 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:16:28 +0400 | ||
4 | Subject: [PATCH 22/35] COLLECT_GCC_OPTIONS | ||
5 | |||
6 | This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to | ||
7 | invoke collect2. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | gcc/gcc.c | 9 +++++++++ | ||
14 | 1 file changed, 9 insertions(+) | ||
15 | |||
16 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
17 | index 477752f..51062aa 100644 | ||
18 | --- a/gcc/gcc.c | ||
19 | +++ b/gcc/gcc.c | ||
20 | @@ -4098,6 +4098,15 @@ set_collect_gcc_options (void) | ||
21 | sizeof ("COLLECT_GCC_OPTIONS=") - 1); | ||
22 | |||
23 | first_time = TRUE; | ||
24 | +#ifdef HAVE_LD_SYSROOT | ||
25 | + if (target_system_root_changed && target_system_root) | ||
26 | + { | ||
27 | + obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); | ||
28 | + obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); | ||
29 | + obstack_grow (&collect_obstack, "'", 1); | ||
30 | + first_time = FALSE; | ||
31 | + } | ||
32 | +#endif | ||
33 | for (i = 0; (int) i < n_switches; i++) | ||
34 | { | ||
35 | const char *const *args; | ||
36 | -- | ||
37 | 1.7.10.4 | ||
38 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file mode 100644 index 0000000..9e4435c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 46d52439052f0876a92dcf8a0ab9c60d75c8030b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:17:25 +0400 | ||
4 | Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe | ||
5 | in ${B} | ||
6 | |||
7 | Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that | ||
8 | the source can be shared between gcc-cross-initial, | ||
9 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | --- | ||
15 | gcc/Makefile.in | 2 +- | ||
16 | gcc/configure | 4 ++-- | ||
17 | gcc/configure.ac | 4 ++-- | ||
18 | gcc/mkconfig.sh | 4 ++-- | ||
19 | 4 files changed, 7 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
22 | index 90a2bba..2320497 100644 | ||
23 | --- a/gcc/Makefile.in | ||
24 | +++ b/gcc/Makefile.in | ||
25 | @@ -469,7 +469,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ | ||
26 | TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ | ||
27 | |||
28 | xmake_file=@xmake_file@ | ||
29 | -tmake_file=@tmake_file@ | ||
30 | +tmake_file=@tmake_file@ ./t-oe | ||
31 | TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ | ||
32 | TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ | ||
33 | TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ | ||
34 | diff --git a/gcc/configure b/gcc/configure | ||
35 | index bdab45a..d587993 100755 | ||
36 | --- a/gcc/configure | ||
37 | +++ b/gcc/configure | ||
38 | @@ -11539,8 +11539,8 @@ for f in $tm_file; do | ||
39 | tm_include_list="${tm_include_list} $f" | ||
40 | ;; | ||
41 | defaults.h ) | ||
42 | - tm_file_list="${tm_file_list} \$(srcdir)/$f" | ||
43 | - tm_include_list="${tm_include_list} $f" | ||
44 | + tm_file_list="${tm_file_list} ./$f" | ||
45 | + tm_include_list="${tm_include_list} ./$f" | ||
46 | ;; | ||
47 | * ) | ||
48 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | ||
49 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
50 | index 5f5c909..5e5e84f 100644 | ||
51 | --- a/gcc/configure.ac | ||
52 | +++ b/gcc/configure.ac | ||
53 | @@ -1720,8 +1720,8 @@ for f in $tm_file; do | ||
54 | tm_include_list="${tm_include_list} $f" | ||
55 | ;; | ||
56 | defaults.h ) | ||
57 | - tm_file_list="${tm_file_list} \$(srcdir)/$f" | ||
58 | - tm_include_list="${tm_include_list} $f" | ||
59 | + tm_file_list="${tm_file_list} ./$f" | ||
60 | + tm_include_list="${tm_include_list} ./$f" | ||
61 | ;; | ||
62 | * ) | ||
63 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | ||
64 | diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh | ||
65 | index 29fdfc7..e048dce 100644 | ||
66 | --- a/gcc/mkconfig.sh | ||
67 | +++ b/gcc/mkconfig.sh | ||
68 | @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then | ||
69 | if [ $# -ge 1 ]; then | ||
70 | echo '#ifdef IN_GCC' >> ${output}T | ||
71 | for file in "$@"; do | ||
72 | - if test x"$file" = x"defaults.h"; then | ||
73 | + if test x"$file" = x"./defaults.h"; then | ||
74 | postpone_defaults_h="yes" | ||
75 | else | ||
76 | echo "# include \"$file\"" >> ${output}T | ||
77 | @@ -103,7 +103,7 @@ esac | ||
78 | |||
79 | # If we postponed including defaults.h, add the #include now. | ||
80 | if test x"$postpone_defaults_h" = x"yes"; then | ||
81 | - echo "# include \"defaults.h\"" >> ${output}T | ||
82 | + echo "# include \"./defaults.h\"" >> ${output}T | ||
83 | fi | ||
84 | |||
85 | # Add multiple inclusion protection guard, part two. | ||
86 | -- | ||
87 | 1.7.10.4 | ||
88 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0024-PR-target-32219.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0024-PR-target-32219.patch new file mode 100644 index 0000000..b47d841 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0024-PR-target-32219.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:18:54 +0400 | ||
4 | Subject: [PATCH 24/35] PR target/32219 | ||
5 | |||
6 | * varasm.c (default_binds_local_p_1): Weak data is not local. | ||
7 | |||
8 | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | --- | ||
13 | gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++ | ||
14 | gcc/varasm.c | 9 ++++----- | ||
15 | 2 files changed, 18 insertions(+), 5 deletions(-) | ||
16 | create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c | ||
17 | |||
18 | diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c | ||
19 | new file mode 100644 | ||
20 | index 0000000..be7deda | ||
21 | --- /dev/null | ||
22 | +++ b/gcc/testsuite/gcc.dg/visibility-21.c | ||
23 | @@ -0,0 +1,14 @@ | ||
24 | +/* PR target/32219 */ | ||
25 | +/* { dg-do run } */ | ||
26 | +/* { dg-require-visibility "" } */ | ||
27 | +/* { dg-options "-fPIC" { target fpic } } */ | ||
28 | + | ||
29 | +extern void f() __attribute__((weak,visibility("hidden"))); | ||
30 | +extern int puts( char const* ); | ||
31 | +int main() | ||
32 | +{ | ||
33 | + if (f) | ||
34 | + f(); | ||
35 | + return 0; | ||
36 | +} | ||
37 | + | ||
38 | diff --git a/gcc/varasm.c b/gcc/varasm.c | ||
39 | index 6648103..fadba78 100644 | ||
40 | --- a/gcc/varasm.c | ||
41 | +++ b/gcc/varasm.c | ||
42 | @@ -6675,6 +6675,10 @@ default_binds_local_p_1 (const_tree exp, int shlib) | ||
43 | /* Static variables are always local. */ | ||
44 | else if (! TREE_PUBLIC (exp)) | ||
45 | local_p = true; | ||
46 | + /* hidden weak can't be overridden by something non-local, all | ||
47 | + that is possible is that it is not defined at all. */ | ||
48 | + else if (DECL_WEAK (exp)) | ||
49 | + local_p = false; | ||
50 | /* A variable is local if the user has said explicitly that it will | ||
51 | be. */ | ||
52 | else if ((DECL_VISIBILITY_SPECIFIED (exp) | ||
53 | @@ -6688,11 +6692,6 @@ default_binds_local_p_1 (const_tree exp, int shlib) | ||
54 | local. */ | ||
55 | else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) | ||
56 | local_p = true; | ||
57 | - /* Default visibility weak data can be overridden by a strong symbol | ||
58 | - in another module and so are not local. */ | ||
59 | - else if (DECL_WEAK (exp) | ||
60 | - && !resolved_locally) | ||
61 | - local_p = false; | ||
62 | /* If PIC, then assume that any global name can be overridden by | ||
63 | symbols resolved from other modules. */ | ||
64 | else if (shlib) | ||
65 | -- | ||
66 | 1.7.10.4 | ||
67 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0025-fortran-cross-compile-hack.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0025-fortran-cross-compile-hack.patch new file mode 100644 index 0000000..0e7914d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0025-fortran-cross-compile-hack.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From af8a56ea4e17b2909eff2c57704ab43ef24f28d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:20:01 +0400 | ||
4 | Subject: [PATCH 25/35] fortran cross-compile hack. | ||
5 | |||
6 | * Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used | ||
7 | used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross | ||
8 | directory. | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | |||
12 | Upstream-Status: Inappropriate [embedded specific] | ||
13 | --- | ||
14 | libgfortran/configure | 2 +- | ||
15 | libgfortran/configure.ac | 2 +- | ||
16 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/libgfortran/configure b/libgfortran/configure | ||
19 | index 8385e96..b8f7a92 100755 | ||
20 | --- a/libgfortran/configure | ||
21 | +++ b/libgfortran/configure | ||
22 | @@ -12704,7 +12704,7 @@ esac | ||
23 | |||
24 | # We need gfortran to compile parts of the library | ||
25 | #AC_PROG_FC(gfortran) | ||
26 | -FC="$GFORTRAN" | ||
27 | +#FC="$GFORTRAN" | ||
28 | ac_ext=${ac_fc_srcext-f} | ||
29 | ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' | ||
30 | ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' | ||
31 | diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac | ||
32 | index 7d97fed..3f9f484 100644 | ||
33 | --- a/libgfortran/configure.ac | ||
34 | +++ b/libgfortran/configure.ac | ||
35 | @@ -227,7 +227,7 @@ AC_SUBST(enable_static) | ||
36 | |||
37 | # We need gfortran to compile parts of the library | ||
38 | #AC_PROG_FC(gfortran) | ||
39 | -FC="$GFORTRAN" | ||
40 | +#FC="$GFORTRAN" | ||
41 | AC_PROG_FC(gfortran) | ||
42 | |||
43 | # extra LD Flags which are required for targets | ||
44 | -- | ||
45 | 1.7.10.4 | ||
46 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0026-libgcc-sjlj-check.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0026-libgcc-sjlj-check.patch new file mode 100644 index 0000000..d4efab9 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0026-libgcc-sjlj-check.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 08c2398445e6cac282488f64ae6bf29cbcd8db23 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:20:50 +0400 | ||
4 | Subject: [PATCH 26/35] libgcc-sjlj-check | ||
5 | |||
6 | ac_fn_c_try_compile doesnt seem to keep the intermediate files | ||
7 | which are needed for sjlj test to pass since it greps into the | ||
8 | generated file. So we run the compiler command using AC_TRY_COMMAND | ||
9 | which then generates the needed .s file | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | --- | ||
15 | libgcc/configure | 10 ++++++---- | ||
16 | libgcc/configure.ac | 10 ++++------ | ||
17 | 2 files changed, 10 insertions(+), 10 deletions(-) | ||
18 | |||
19 | diff --git a/libgcc/configure b/libgcc/configure | ||
20 | index 1425df6..d18e3cb 100644 | ||
21 | --- a/libgcc/configure | ||
22 | +++ b/libgcc/configure | ||
23 | @@ -4208,17 +4208,19 @@ void foo () | ||
24 | } | ||
25 | |||
26 | _ACEOF | ||
27 | -CFLAGS_hold=$CFLAGS | ||
28 | -CFLAGS="--save-temps -fexceptions" | ||
29 | libgcc_cv_lib_sjlj_exceptions=unknown | ||
30 | -if ac_fn_c_try_compile; then : | ||
31 | +if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5' | ||
32 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | ||
33 | + (eval $ac_try) 2>&5 | ||
34 | + ac_status=$? | ||
35 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
36 | + test $ac_status = 0; }; }; then | ||
37 | if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then | ||
38 | libgcc_cv_lib_sjlj_exceptions=yes | ||
39 | elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then | ||
40 | libgcc_cv_lib_sjlj_exceptions=no | ||
41 | fi | ||
42 | fi | ||
43 | -CFLAGS=$CFLAGS_hold | ||
44 | rm -f conftest* | ||
45 | |||
46 | fi | ||
47 | diff --git a/libgcc/configure.ac b/libgcc/configure.ac | ||
48 | index 8b7aba5..c7c9644 100644 | ||
49 | --- a/libgcc/configure.ac | ||
50 | +++ b/libgcc/configure.ac | ||
51 | @@ -216,16 +216,14 @@ void foo () | ||
52 | bar(); | ||
53 | } | ||
54 | ])]) | ||
55 | -CFLAGS_hold=$CFLAGS | ||
56 | -CFLAGS="--save-temps -fexceptions" | ||
57 | libgcc_cv_lib_sjlj_exceptions=unknown | ||
58 | -AS_IF([ac_fn_c_try_compile], | ||
59 | - [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then | ||
60 | +if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then | ||
61 | + if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then | ||
62 | libgcc_cv_lib_sjlj_exceptions=yes | ||
63 | elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then | ||
64 | libgcc_cv_lib_sjlj_exceptions=no | ||
65 | - fi]) | ||
66 | -CFLAGS=$CFLAGS_hold | ||
67 | + fi | ||
68 | +fi | ||
69 | rm -f conftest* | ||
70 | ]) | ||
71 | |||
72 | -- | ||
73 | 1.7.10.4 | ||
74 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0027-cpp-honor-sysroot.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0027-cpp-honor-sysroot.patch new file mode 100644 index 0000000..05e9521 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0027-cpp-honor-sysroot.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From a0f9bd09c816ad29ecf7c29d6c27f7df97710364 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:22:00 +0400 | ||
4 | Subject: [PATCH 27/35] cpp: honor sysroot. | ||
5 | |||
6 | Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile | ||
7 | preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location | ||
8 | rather than the --sysroot option specified on the commandline. If access to that directory is | ||
9 | permission denied (unreadable), gcc will error. | ||
10 | |||
11 | This happens when ccache is in use due to the fact it uses preprocessed source files. | ||
12 | |||
13 | The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, | ||
14 | -isystem, -isysroot happen and the correct sysroot is used. | ||
15 | |||
16 | [YOCTO #2074] | ||
17 | |||
18 | RP 2012/04/13 | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | |||
22 | Upstream-Status: Pending | ||
23 | --- | ||
24 | gcc/cp/lang-specs.h | 2 +- | ||
25 | gcc/gcc.c | 2 +- | ||
26 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h | ||
29 | index a001c3e..1aae1e4 100644 | ||
30 | --- a/gcc/cp/lang-specs.h | ||
31 | +++ b/gcc/cp/lang-specs.h | ||
32 | @@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see | ||
33 | {".ii", "@c++-cpp-output", 0, 0, 0}, | ||
34 | {"@c++-cpp-output", | ||
35 | "%{!M:%{!MM:%{!E:\ | ||
36 | - cc1plus -fpreprocessed %i %(cc1_options) %2\ | ||
37 | + cc1plus -fpreprocessed %i %I %(cc1_options) %2\ | ||
38 | %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
39 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
40 | index 51062aa..cf6b99e 100644 | ||
41 | --- a/gcc/gcc.c | ||
42 | +++ b/gcc/gcc.c | ||
43 | @@ -1042,7 +1042,7 @@ static const struct compiler default_compilers[] = | ||
44 | %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, | ||
45 | {".i", "@cpp-output", 0, 0, 0}, | ||
46 | {"@cpp-output", | ||
47 | - "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
48 | + "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
49 | {".s", "@assembler", 0, 0, 0}, | ||
50 | {"@assembler", | ||
51 | "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, | ||
52 | -- | ||
53 | 1.7.10.4 | ||
54 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0028-MIPS64-Default-to-N64-ABI.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0028-MIPS64-Default-to-N64-ABI.patch new file mode 100644 index 0000000..2638720 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0028-MIPS64-Default-to-N64-ABI.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 301e18d4711db5925e767fad08dffa9cfe0a2f1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:23:08 +0400 | ||
4 | Subject: [PATCH 28/35] MIPS64: Default to N64 ABI | ||
5 | |||
6 | MIPS64 defaults to n32 ABI, this patch makes it | ||
7 | so that it defaults to N64 ABI | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE config specific] | ||
12 | --- | ||
13 | gcc/config.gcc | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/gcc/config.gcc b/gcc/config.gcc | ||
17 | index 1a0be50..989c2fb 100644 | ||
18 | --- a/gcc/config.gcc | ||
19 | +++ b/gcc/config.gcc | ||
20 | @@ -1797,7 +1797,7 @@ mips*-mti-linux*) | ||
21 | mips64*-*-linux* | mipsisa64*-*-linux*) | ||
22 | tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h" | ||
23 | tmake_file="${tmake_file} mips/t-linux64" | ||
24 | - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" | ||
25 | + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" | ||
26 | case ${target} in | ||
27 | mips64el-st-linux-gnu) | ||
28 | tm_file="${tm_file} mips/st.h" | ||
29 | -- | ||
30 | 1.7.10.4 | ||
31 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 0000000..0e8fffc --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | |||
@@ -0,0 +1,190 @@ | |||
1 | From 29d12344fb682a053de53eb08b95704cf3b67af2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:24:50 +0400 | ||
4 | Subject: [PATCH 29/35] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
5 | relative to SYSTEMLIBS_DIR | ||
6 | |||
7 | This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
8 | relative to SYSTEMLIBS_DIR which can be set in generated headers | ||
9 | This breaks the assumption of hardcoded multilib in gcc | ||
10 | Change is only for the supported architectures in OE including | ||
11 | SH, sparc, alpha for possible future support (if any) | ||
12 | |||
13 | Removes the do_headerfix task in metadata | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Inappropriate [OE configuration] | ||
18 | --- | ||
19 | gcc/config/alpha/linux-elf.h | 4 ++-- | ||
20 | gcc/config/arm/linux-eabi.h | 4 ++-- | ||
21 | gcc/config/arm/linux-elf.h | 2 +- | ||
22 | gcc/config/i386/linux.h | 2 +- | ||
23 | gcc/config/i386/linux64.h | 6 +++--- | ||
24 | gcc/config/mips/linux.h | 2 +- | ||
25 | gcc/config/mips/linux64.h | 8 ++++---- | ||
26 | gcc/config/rs6000/linux64.h | 8 ++++---- | ||
27 | gcc/config/sh/linux.h | 2 +- | ||
28 | gcc/config/sparc/linux.h | 2 +- | ||
29 | gcc/config/sparc/linux64.h | 4 ++-- | ||
30 | 11 files changed, 22 insertions(+), 22 deletions(-) | ||
31 | |||
32 | diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h | ||
33 | index 84e0596..3a59d71 100644 | ||
34 | --- a/gcc/config/alpha/linux-elf.h | ||
35 | +++ b/gcc/config/alpha/linux-elf.h | ||
36 | @@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see | ||
37 | #define EXTRA_SPECS \ | ||
38 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | ||
39 | |||
40 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
41 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
42 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
43 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
44 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
45 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
46 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
47 | diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h | ||
48 | index 4a425c8..80f454d 100644 | ||
49 | --- a/gcc/config/arm/linux-eabi.h | ||
50 | +++ b/gcc/config/arm/linux-eabi.h | ||
51 | @@ -68,8 +68,8 @@ | ||
52 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ | ||
53 | |||
54 | #undef GLIBC_DYNAMIC_LINKER | ||
55 | -#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" | ||
56 | -#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" | ||
57 | +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" | ||
58 | +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" | ||
59 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT | ||
60 | |||
61 | #define GLIBC_DYNAMIC_LINKER \ | ||
62 | diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h | ||
63 | index 753dc3a..d593967 100644 | ||
64 | --- a/gcc/config/arm/linux-elf.h | ||
65 | +++ b/gcc/config/arm/linux-elf.h | ||
66 | @@ -57,7 +57,7 @@ | ||
67 | |||
68 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | ||
69 | |||
70 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
71 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
72 | |||
73 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
74 | %{static:-Bstatic} \ | ||
75 | diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h | ||
76 | index 3c95ee0..33b8acd 100644 | ||
77 | --- a/gcc/config/i386/linux.h | ||
78 | +++ b/gcc/config/i386/linux.h | ||
79 | @@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see | ||
80 | <http://www.gnu.org/licenses/>. */ | ||
81 | |||
82 | #define GNU_USER_LINK_EMULATION "elf_i386" | ||
83 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
84 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
85 | diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h | ||
86 | index b793e08..da788b8 100644 | ||
87 | --- a/gcc/config/i386/linux64.h | ||
88 | +++ b/gcc/config/i386/linux64.h | ||
89 | @@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
90 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | ||
91 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | ||
92 | |||
93 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
94 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
95 | -#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | ||
96 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
97 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | ||
98 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | ||
99 | diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h | ||
100 | index 9b4c68d..7ee5ba8 100644 | ||
101 | --- a/gcc/config/mips/linux.h | ||
102 | +++ b/gcc/config/mips/linux.h | ||
103 | @@ -17,4 +17,4 @@ You should have received a copy of the GNU General Public License | ||
104 | along with GCC; see the file COPYING3. If not see | ||
105 | <http://www.gnu.org/licenses/>. */ | ||
106 | |||
107 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
108 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" | ||
109 | diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h | ||
110 | index dbba47a..c7ed573 100644 | ||
111 | --- a/gcc/config/mips/linux64.h | ||
112 | +++ b/gcc/config/mips/linux64.h | ||
113 | @@ -22,10 +22,10 @@ along with GCC; see the file COPYING3. If not see | ||
114 | #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" | ||
115 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | ||
116 | |||
117 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
118 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1" | ||
119 | -#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" | ||
120 | -#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" | ||
121 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
122 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld.so.1" | ||
123 | +#define GLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld.so.1" | ||
124 | +#define UCLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
125 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | ||
126 | #define GNU_USER_DYNAMIC_LINKERN32 \ | ||
127 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ | ||
128 | diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h | ||
129 | index dc6f67f..bc60769 100644 | ||
130 | --- a/gcc/config/rs6000/linux64.h | ||
131 | +++ b/gcc/config/rs6000/linux64.h | ||
132 | @@ -360,10 +360,10 @@ extern int dot_symbols; | ||
133 | #undef LINK_OS_DEFAULT_SPEC | ||
134 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
135 | |||
136 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
137 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" | ||
138 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
139 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
140 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
141 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1" | ||
142 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
143 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
144 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
145 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
146 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
147 | diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h | ||
148 | index 9e8f32d..86bf81e 100644 | ||
149 | --- a/gcc/config/sh/linux.h | ||
150 | +++ b/gcc/config/sh/linux.h | ||
151 | @@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see | ||
152 | |||
153 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | ||
154 | |||
155 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
156 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
157 | |||
158 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
159 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" | ||
160 | diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h | ||
161 | index 49283d3..6f0b03a 100644 | ||
162 | --- a/gcc/config/sparc/linux.h | ||
163 | +++ b/gcc/config/sparc/linux.h | ||
164 | @@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); | ||
165 | When the -shared link option is used a final link is not being | ||
166 | done. */ | ||
167 | |||
168 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
169 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
170 | |||
171 | #undef LINK_SPEC | ||
172 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ | ||
173 | diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h | ||
174 | index 7d48e96..b01993f 100644 | ||
175 | --- a/gcc/config/sparc/linux64.h | ||
176 | +++ b/gcc/config/sparc/linux64.h | ||
177 | @@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. If not see | ||
178 | When the -shared link option is used a final link is not being | ||
179 | done. */ | ||
180 | |||
181 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
182 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | ||
183 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
184 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
185 | |||
186 | #ifdef SPARC_BI_ARCH | ||
187 | |||
188 | -- | ||
189 | 1.7.10.4 | ||
190 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0030-gcc-Fix-argument-list-too-long-error.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0030-gcc-Fix-argument-list-too-long-error.patch new file mode 100644 index 0000000..2ceaff6 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0030-gcc-Fix-argument-list-too-long-error.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From c1816c160156f99c34e6a0a0311bb0219326804e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:26:37 +0400 | ||
4 | Subject: [PATCH 30/35] gcc: Fix argument list too long error. | ||
5 | |||
6 | There would be an "Argument list too long" error when the | ||
7 | build directory is longer than 200, this is caused by: | ||
8 | |||
9 | headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` | ||
10 | |||
11 | The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle | ||
12 | it, use the $(sort list) of GNU make which can handle the too long list | ||
13 | would fix the problem, the header would be short enough after sorted. | ||
14 | The "tr ' ' '\012'" was used for translating the space to "\n", the | ||
15 | $(sort list) doesn't need this. | ||
16 | |||
17 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | --- | ||
22 | gcc/Makefile.in | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
26 | index 2320497..8562a62 100644 | ||
27 | --- a/gcc/Makefile.in | ||
28 | +++ b/gcc/Makefile.in | ||
29 | @@ -4627,7 +4627,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype | ||
30 | # We keep the directory structure for files in config or c-family and .def | ||
31 | # files. All other files are flattened to a single directory. | ||
32 | $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) | ||
33 | - headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \ | ||
34 | + headers="$(sort $(PLUGIN_HEADERS))"; \ | ||
35 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ | ||
36 | for file in $$headers; do \ | ||
37 | if [ -f $$file ] ; then \ | ||
38 | -- | ||
39 | 1.7.10.4 | ||
40 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0031-Disable-sdt.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0031-Disable-sdt.patch new file mode 100644 index 0000000..c714239 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0031-Disable-sdt.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From eb70cb2785af7171897f363298bbfcd83de5ec57 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:28:10 +0400 | ||
4 | Subject: [PATCH 31/35] Disable sdt. | ||
5 | |||
6 | We don't list dtrace in DEPENDS so we shouldn't be depending on this header. | ||
7 | It may or may not exist from preivous builds though. To be determinstic, disable | ||
8 | sdt.h usage always. This avoids build failures if the header is removed after configure | ||
9 | but before libgcc is compiled for example. | ||
10 | |||
11 | RP 2012/8/7 | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | Upstream-Status: Inappropriate [hack] | ||
16 | --- | ||
17 | gcc/configure | 12 ++++++------ | ||
18 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/configure b/gcc/configure | ||
21 | index d587993..8bc0c98 100755 | ||
22 | --- a/gcc/configure | ||
23 | +++ b/gcc/configure | ||
24 | @@ -26792,12 +26792,12 @@ fi | ||
25 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 | ||
26 | $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } | ||
27 | have_sys_sdt_h=no | ||
28 | -if test -f $target_header_dir/sys/sdt.h; then | ||
29 | - have_sys_sdt_h=yes | ||
30 | - | ||
31 | -$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h | ||
32 | - | ||
33 | -fi | ||
34 | +#if test -f $target_header_dir/sys/sdt.h; then | ||
35 | +# have_sys_sdt_h=yes | ||
36 | +# | ||
37 | +#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h | ||
38 | +# | ||
39 | +#fi | ||
40 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 | ||
41 | $as_echo "$have_sys_sdt_h" >&6; } | ||
42 | |||
43 | -- | ||
44 | 1.7.10.4 | ||
45 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0032-libtool.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0032-libtool.patch new file mode 100644 index 0000000..3b3d1b6 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0032-libtool.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 6c715fcfa262adadca81c68a1f3f69aa3187a501 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:29:11 +0400 | ||
4 | Subject: [PATCH 32/35] libtool | ||
5 | |||
6 | libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 | ||
7 | when running on am x86_64 build host. | ||
8 | |||
9 | This patch stops this speading to libdir in the libstdc++.la file within libtool. | ||
10 | Arguably, it shouldn't be passing this into libtool in the first place but | ||
11 | for now this resolves the nastiest problems this causes. | ||
12 | |||
13 | func_normal_abspath would resolve an empty path to `pwd` so we need | ||
14 | to filter the zero case. | ||
15 | |||
16 | RP 2012/8/24 | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | --- | ||
22 | ltmain.sh | 4 ++++ | ||
23 | 1 file changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/ltmain.sh b/ltmain.sh | ||
26 | index a03433f..46f47c2 100644 | ||
27 | --- a/ltmain.sh | ||
28 | +++ b/ltmain.sh | ||
29 | @@ -6359,6 +6359,10 @@ func_mode_link () | ||
30 | func_warning "ignoring multiple \`-rpath's for a libtool library" | ||
31 | |||
32 | install_libdir="$1" | ||
33 | + if test -n "$install_libdir"; then | ||
34 | + func_normal_abspath "$install_libdir" | ||
35 | + install_libdir=$func_normal_abspath_result | ||
36 | + fi | ||
37 | |||
38 | oldlibs= | ||
39 | if test -z "$rpath"; then | ||
40 | -- | ||
41 | 1.7.10.4 | ||
42 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file mode 100644 index 0000000..199984d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 97e4591c20310425e7aca0e6712a8d9480e7744c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:30:32 +0400 | ||
4 | Subject: [PATCH 33/35] gcc: armv4: pass fix-v4bx to linker to support EABI. | ||
5 | |||
6 | The LINK_SPEC for linux gets overwritten by linux-eabi.h which | ||
7 | means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result | ||
8 | the option is not passed to linker when chosing march=armv4 | ||
9 | This patch redefines this in linux-eabi.h and reinserts it | ||
10 | for eabi defaulting toolchains. | ||
11 | |||
12 | We might want to send it upstream. | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | --- | ||
18 | gcc/config/arm/linux-eabi.h | 6 +++++- | ||
19 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h | ||
22 | index 80f454d..4db3eb9 100644 | ||
23 | --- a/gcc/config/arm/linux-eabi.h | ||
24 | +++ b/gcc/config/arm/linux-eabi.h | ||
25 | @@ -77,10 +77,14 @@ | ||
26 | %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ | ||
27 | %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" | ||
28 | |||
29 | +/* For armv4 we pass --fix-v4bx to linker to support EABI */ | ||
30 | +#undef TARGET_FIX_V4BX_SPEC | ||
31 | +#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" | ||
32 | + | ||
33 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
34 | use the GNU/Linux version, not the generic BPABI version. */ | ||
35 | #undef LINK_SPEC | ||
36 | -#define LINK_SPEC BE8_LINK_SPEC \ | ||
37 | +#define LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC \ | ||
38 | LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ | ||
39 | LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) | ||
40 | |||
41 | -- | ||
42 | 1.7.10.4 | ||
43 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file mode 100644 index 0000000..66b9f89 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From fc5e4beaea856a2b486c770ad3addc0f5bb3100e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:33:04 +0400 | ||
4 | Subject: [PATCH 34/35] Use the multilib config files from ${B} instead of | ||
5 | using the ones from ${S} | ||
6 | |||
7 | Use the multilib config files from ${B} instead of using the ones from ${S} | ||
8 | so that the source can be shared between gcc-cross-initial, | ||
9 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | ||
13 | |||
14 | Upstream-Status: Inappropriate [configuration] | ||
15 | --- | ||
16 | gcc/configure | 22 ++++++++++++++++++---- | ||
17 | gcc/configure.ac | 22 ++++++++++++++++++---- | ||
18 | 2 files changed, 36 insertions(+), 8 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/configure b/gcc/configure | ||
21 | index 8bc0c98..3cd0817 100755 | ||
22 | --- a/gcc/configure | ||
23 | +++ b/gcc/configure | ||
24 | @@ -11519,10 +11519,20 @@ done | ||
25 | tmake_file_= | ||
26 | for f in ${tmake_file} | ||
27 | do | ||
28 | - if test -f ${srcdir}/config/$f | ||
29 | - then | ||
30 | - tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
31 | - fi | ||
32 | + case $f in | ||
33 | + */t-linux64 ) | ||
34 | + if test -f ./config/$f | ||
35 | + then | ||
36 | + tmake_file_="${tmake_file_} ./config/$f" | ||
37 | + fi | ||
38 | + ;; | ||
39 | + * ) | ||
40 | + if test -f ${srcdir}/config/$f | ||
41 | + then | ||
42 | + tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
43 | + fi | ||
44 | + ;; | ||
45 | + esac | ||
46 | done | ||
47 | tmake_file="${tmake_file_}" | ||
48 | |||
49 | @@ -11533,6 +11543,10 @@ tm_file_list="options.h" | ||
50 | tm_include_list="options.h insn-constants.h" | ||
51 | for f in $tm_file; do | ||
52 | case $f in | ||
53 | + */linux64.h ) | ||
54 | + tm_file_list="${tm_file_list} ./config/$f" | ||
55 | + tm_include_list="${tm_include_list} ./config/$f" | ||
56 | + ;; | ||
57 | ./* ) | ||
58 | f=`echo $f | sed 's/^..//'` | ||
59 | tm_file_list="${tm_file_list} $f" | ||
60 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
61 | index 5e5e84f..415a6df 100644 | ||
62 | --- a/gcc/configure.ac | ||
63 | +++ b/gcc/configure.ac | ||
64 | @@ -1700,10 +1700,20 @@ done | ||
65 | tmake_file_= | ||
66 | for f in ${tmake_file} | ||
67 | do | ||
68 | - if test -f ${srcdir}/config/$f | ||
69 | - then | ||
70 | - tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
71 | - fi | ||
72 | + case $f in | ||
73 | + */t-linux64 ) | ||
74 | + if test -f ./config/$f | ||
75 | + then | ||
76 | + tmake_file_="${tmake_file_} ./config/$f" | ||
77 | + fi | ||
78 | + ;; | ||
79 | + * ) | ||
80 | + if test -f ${srcdir}/config/$f | ||
81 | + then | ||
82 | + tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
83 | + fi | ||
84 | + ;; | ||
85 | + esac | ||
86 | done | ||
87 | tmake_file="${tmake_file_}" | ||
88 | |||
89 | @@ -1714,6 +1724,10 @@ tm_file_list="options.h" | ||
90 | tm_include_list="options.h insn-constants.h" | ||
91 | for f in $tm_file; do | ||
92 | case $f in | ||
93 | + */linux64.h ) | ||
94 | + tm_file_list="${tm_file_list} ./config/$f" | ||
95 | + tm_include_list="${tm_include_list} ./config/$f" | ||
96 | + ;; | ||
97 | ./* ) | ||
98 | f=`echo $f | sed 's/^..//'` | ||
99 | tm_file_list="${tm_file_list} $f" | ||
100 | -- | ||
101 | 1.7.10.4 | ||
102 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0035-wcast-qual-PR-55383.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0035-wcast-qual-PR-55383.patch new file mode 100644 index 0000000..be4cf4a --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0035-wcast-qual-PR-55383.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From deffdb0b2497a106061d3ea2c6a3fef4fba3445e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:39:51 +0400 | ||
4 | Subject: [PATCH 35/35] wcast-qual PR/55383 | ||
5 | |||
6 | This is a backport from gcc bugzilla | ||
7 | |||
8 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55383 | ||
9 | |||
10 | This commit fixes a wrong warning behavior. This bug which has no | ||
11 | workaround other than disabling the warning. | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | --- | ||
17 | gcc/c/c-typeck.c | 2 +- | ||
18 | gcc/testsuite/c-c++-common/Wcast-qual-1.c | 6 +++--- | ||
19 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c | ||
22 | index ddb6d39..c624120 100644 | ||
23 | --- a/gcc/c/c-typeck.c | ||
24 | +++ b/gcc/c/c-typeck.c | ||
25 | @@ -4464,7 +4464,7 @@ handle_warn_cast_qual (location_t loc, tree type, tree otype) | ||
26 | /* There are qualifiers present in IN_OTYPE that are not present | ||
27 | in IN_TYPE. */ | ||
28 | warning_at (loc, OPT_Wcast_qual, | ||
29 | - "cast discards %q#v qualifier from pointer target type", | ||
30 | + "cast discards %qv qualifier from pointer target type", | ||
31 | discarded); | ||
32 | |||
33 | if (added || discarded) | ||
34 | diff --git a/gcc/testsuite/c-c++-common/Wcast-qual-1.c b/gcc/testsuite/c-c++-common/Wcast-qual-1.c | ||
35 | index 640e4f0..56382c7 100644 | ||
36 | --- a/gcc/testsuite/c-c++-common/Wcast-qual-1.c | ||
37 | +++ b/gcc/testsuite/c-c++-common/Wcast-qual-1.c | ||
38 | @@ -85,11 +85,11 @@ f3 (void ***bar) | ||
39 | void | ||
40 | f4 (void * const **bar) | ||
41 | { | ||
42 | - const void ***p9 = (const void ***) bar; /* { dg-warning "cast" } */ | ||
43 | + const void ***p9 = (const void ***) bar; /* { dg-warning "cast discards .const. qualifier" } */ | ||
44 | void * const **p11 = (void * const **) bar; | ||
45 | - void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast" } */ | ||
46 | + void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */ | ||
47 | const void * const **p15 = (const void * const **) bar; /* { dg-warning "cast" } */ | ||
48 | - const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast" } */ | ||
49 | + const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */ | ||
50 | void * const * const * p19 = (void * const * const *) bar; | ||
51 | const void * const * const *p21 = (const void * const * const *) bar; | ||
52 | } | ||
53 | -- | ||
54 | 1.7.10.4 | ||
55 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0037-gcc-4.8-PR56797.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0037-gcc-4.8-PR56797.patch new file mode 100644 index 0000000..b5d7b86 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0037-gcc-4.8-PR56797.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | From patchwork Fri Apr 19 09:34:49 2013 | ||
5 | Content-Type: text/plain; charset="utf-8" | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Transfer-Encoding: 7bit | ||
8 | Subject: [ARM] Fix PR56797 | ||
9 | Date: Thu, 18 Apr 2013 23:34:49 -0000 | ||
10 | From: Greta Yorsh <Greta.Yorsh@arm.com> | ||
11 | X-Patchwork-Id: 237891 | ||
12 | Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com> | ||
13 | To: "GCC Patches" <gcc-patches@gcc.gnu.org> | ||
14 | Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>, | ||
15 | "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com> | ||
16 | |||
17 | Fix PR56797 | ||
18 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797 | ||
19 | |||
20 | The problem is that peephole optimizer thinks it can generate an ldm, but | ||
21 | the pattern for ldm no longer matches, because after r188738 it requires | ||
22 | that if one of the destination registers is SP then the base register must | ||
23 | be SP, and it's not SP in the test case. | ||
24 | |||
25 | The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because | ||
26 | peephole doesn't trigger there (because there is a different epilogue | ||
27 | sequence). It looks like a latent problem for other architecture or CPUs. | ||
28 | |||
29 | This patch adds this condition to the peephole optimizer. | ||
30 | |||
31 | No regression on qemu for arm-none-eabi and fixes the test reported in the | ||
32 | PR. I couldn't minimize the test sufficiently to include it in the | ||
33 | testsuite. | ||
34 | |||
35 | Ok for trunk? | ||
36 | |||
37 | Thanks, | ||
38 | Greta | ||
39 | |||
40 | gcc/ | ||
41 | |||
42 | 2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com> | ||
43 | |||
44 | PR target/56797 | ||
45 | * config/arm/arm.c (load_multiple_sequence): Require SP | ||
46 | as base register for loads if SP is in the register list. | ||
47 | |||
48 | |||
49 | diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c | ||
50 | index d00849c..60fef78 100644 | ||
51 | --- a/gcc/config/arm/arm.c | ||
52 | +++ b/gcc/config/arm/arm.c | ||
53 | @@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order, | ||
54 | || (i != nops - 1 && unsorted_regs[i] == base_reg)) | ||
55 | return 0; | ||
56 | |||
57 | + /* Don't allow SP to be loaded unless it is also the base | ||
58 | + register. It guarantees that SP is reset correctly when | ||
59 | + an LDM instruction is interruptted. Otherwise, we might | ||
60 | + end up with a corrupt stack. */ | ||
61 | + if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM) | ||
62 | + return 0; | ||
63 | + | ||
64 | unsorted_offsets[i] = INTVAL (offset); | ||
65 | if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]]) | ||
66 | order[0] = i; | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0038-gcc-4.8-build-args.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0038-gcc-4.8-build-args.patch new file mode 100644 index 0000000..c27e009 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0038-gcc-4.8-build-args.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | When cross compiling a target gcc, target flags may be used on the host | ||
2 | |||
3 | Configure identifies a number of warning flags (WARN_CFLAGS and | ||
4 | WARN_CXXFLAGS) from the $CC value. The cross compiler may be different | ||
5 | from the host compiler and may not support the same set of flags. This | ||
6 | leads to problems such as: | ||
7 | |||
8 | cc1plus: error: unrecognized command line option "-Wno-narrowing" | ||
9 | cc1plus: error: unrecognized command line option "-Wno-overlength-strings" | ||
10 | |||
11 | Work around this problem by removing the warning flags from the | ||
12 | BUILD_CXXFLAGS value, in a way similar to the BUILD_CFLAGS. | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
17 | |||
18 | Index: gcc-4.8.0/gcc/configure | ||
19 | =================================================================== | ||
20 | --- gcc-4.8.0.orig/gcc/configure | ||
21 | +++ gcc-4.8.0/gcc/configure | ||
22 | @@ -11720,6 +10581,7 @@ STMP_FIXINC=stmp-fixinc | ||
23 | if test x$build != x$host || test "x$coverage_flags" != x | ||
24 | then | ||
25 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' | ||
26 | + BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' | ||
27 | BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' | ||
28 | fi | ||
29 | |||
30 | Index: gcc-4.8.0/gcc/configure.ac | ||
31 | =================================================================== | ||
32 | --- gcc-4.8.0.orig/gcc/configure.ac | ||
33 | +++ gcc-4.8.0/gcc/configure.ac | ||
34 | @@ -1901,6 +1901,7 @@ STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_F | ||
35 | if test x$build != x$host || test "x$coverage_flags" != x | ||
36 | then | ||
37 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' | ||
38 | + BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' | ||
39 | BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' | ||
40 | fi | ||
41 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0039-gcc-4.8-PR57717.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0039-gcc-4.8-PR57717.patch new file mode 100644 index 0000000..f983f70 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0039-gcc-4.8-PR57717.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717 | ||
2 | |||
3 | Upstream-Status: Backport | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | Index: gcc-4.8.1/gcc/config/rs6000/rs6000.c | ||
7 | =================================================================== | ||
8 | --- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.c 2013-05-09 18:54:06.000000000 -0700 | ||
9 | +++ gcc-4.8.1/gcc/config/rs6000/rs6000.c 2013-06-27 08:22:40.459021366 -0700 | ||
10 | @@ -5431,11 +5431,12 @@ | ||
11 | |||
12 | case TFmode: | ||
13 | case TDmode: | ||
14 | - case TImode: | ||
15 | if (TARGET_E500_DOUBLE) | ||
16 | return (SPE_CONST_OFFSET_OK (offset) | ||
17 | && SPE_CONST_OFFSET_OK (offset + 8)); | ||
18 | + /* Fall through. */ | ||
19 | |||
20 | + case TImode: | ||
21 | extra = 8; | ||
22 | if (!worst_case) | ||
23 | break; | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0040-fix-g++-sysroot.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0040-fix-g++-sysroot.patch new file mode 100644 index 0000000..d50aa5c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0040-fix-g++-sysroot.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | Portions of | ||
2 | |||
3 | http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html | ||
4 | |||
5 | are not upstreamed yet. So lets keep missing pieces. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Index: gcc-4.8.1/gcc/configure.ac | ||
12 | =================================================================== | ||
13 | --- gcc-4.8.1.orig/gcc/configure.ac 2013-07-15 15:55:49.488399132 -0700 | ||
14 | +++ gcc-4.8.1/gcc/configure.ac 2013-07-15 16:02:31.772406679 -0700 | ||
15 | @@ -148,7 +148,9 @@ | ||
16 | if test "${with_sysroot+set}" = set; then | ||
17 | gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` | ||
18 | if test "${gcc_gxx_without_sysroot}"; then | ||
19 | - gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
20 | + if test x${with_sysroot} != x/; then | ||
21 | + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
22 | + fi | ||
23 | gcc_gxx_include_dir_add_sysroot=1 | ||
24 | fi | ||
25 | fi | ||
26 | Index: gcc-4.8.1/gcc/configure | ||
27 | =================================================================== | ||
28 | --- gcc-4.8.1.orig/gcc/configure 2013-07-15 15:55:49.472399132 -0700 | ||
29 | +++ gcc-4.8.1/gcc/configure 2013-07-15 16:02:31.780406680 -0700 | ||
30 | @@ -3325,7 +3325,9 @@ | ||
31 | if test "${with_sysroot+set}" = set; then | ||
32 | gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` | ||
33 | if test "${gcc_gxx_without_sysroot}"; then | ||
34 | - gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
35 | + if test x${with_sysroot} != x/; then | ||
36 | + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
37 | + fi | ||
38 | gcc_gxx_include_dir_add_sysroot=1 | ||
39 | fi | ||
40 | fi | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0041-libtool-avoid-libdir.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0041-libtool-avoid-libdir.patch new file mode 100644 index 0000000..2dd9610 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0041-libtool-avoid-libdir.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Avoid using libdir from .la which usually points to a host path | ||
2 | |||
3 | Upstream-Status: Inappropriate [embedded specific] | ||
4 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
5 | |||
6 | diff --git a/ltmain.sh b/ltmain.sh | ||
7 | index a03433f..1902a90 100644 | ||
8 | --- a/ltmain.sh | ||
9 | +++ b/ltmain.sh | ||
10 | @@ -5628,6 +5628,9 @@ func_mode_link () | ||
11 | absdir="$abs_ladir" | ||
12 | libdir="$abs_ladir" | ||
13 | else | ||
14 | + # Instead of using libdir from .la which usually points to a host path, | ||
15 | + # use the path the .la is contained in. | ||
16 | + libdir="$abs_ladir" | ||
17 | dir="$libdir" | ||
18 | absdir="$libdir" | ||
19 | fi | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0042-pr57748.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0042-pr57748.patch new file mode 100644 index 0000000..5356f72 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0042-pr57748.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Khem Raj | ||
3 | |||
4 | 2013-08-01 Martin Jambor <mjambor@suse.cz> | ||
5 | |||
6 | PR middle-end/57748 | ||
7 | * stor-layout.c (compute_record_mode): Treat zero-sized array fields | ||
8 | like incomplete types. | ||
9 | |||
10 | testsuite/ | ||
11 | * gcc.dg/torture/pr57748.c: New test. | ||
12 | |||
13 | |||
14 | Index: gcc-4.8.1/gcc/stor-layout.c | ||
15 | =================================================================== | ||
16 | --- gcc-4.8.1.orig/gcc/stor-layout.c 2013-04-28 10:29:18.000000000 -0700 | ||
17 | +++ gcc-4.8.1/gcc/stor-layout.c 2013-08-01 15:02:08.018006125 -0700 | ||
18 | @@ -1618,7 +1618,9 @@ | ||
19 | && integer_zerop (TYPE_SIZE (TREE_TYPE (field))))) | ||
20 | || ! host_integerp (bit_position (field), 1) | ||
21 | || DECL_SIZE (field) == 0 | ||
22 | - || ! host_integerp (DECL_SIZE (field), 1)) | ||
23 | + || ! host_integerp (DECL_SIZE (field), 1) | ||
24 | + || (TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE | ||
25 | + && tree_low_cst (DECL_SIZE (field), 1) == 0)) | ||
26 | return; | ||
27 | |||
28 | /* If this field is the whole struct, remember its mode so | ||
29 | Index: gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr57748.c | ||
30 | =================================================================== | ||
31 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
32 | +++ gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr57748.c 2013-08-01 15:02:08.062006126 -0700 | ||
33 | @@ -0,0 +1,45 @@ | ||
34 | +/* PR middle-end/57748 */ | ||
35 | +/* { dg-do run } */ | ||
36 | + | ||
37 | +#include <stdlib.h> | ||
38 | + | ||
39 | +extern void abort (void); | ||
40 | + | ||
41 | +typedef long long V | ||
42 | + __attribute__ ((vector_size (2 * sizeof (long long)), may_alias)); | ||
43 | + | ||
44 | +typedef struct S { V a; V b[0]; } P __attribute__((aligned (1))); | ||
45 | + | ||
46 | +struct __attribute__((packed)) T { char c; P s; }; | ||
47 | + | ||
48 | +void __attribute__((noinline, noclone)) | ||
49 | +check (struct T *t) | ||
50 | +{ | ||
51 | + if (t->s.b[0][0] != 3 || t->s.b[0][1] != 4) | ||
52 | + abort (); | ||
53 | +} | ||
54 | + | ||
55 | +int __attribute__((noinline, noclone)) | ||
56 | +get_i (void) | ||
57 | +{ | ||
58 | + return 0; | ||
59 | +} | ||
60 | + | ||
61 | +void __attribute__((noinline, noclone)) | ||
62 | +foo (P *p) | ||
63 | +{ | ||
64 | + V a = { 3, 4 }; | ||
65 | + int i = get_i(); | ||
66 | + p->b[i] = a; | ||
67 | +} | ||
68 | + | ||
69 | +int | ||
70 | +main () | ||
71 | +{ | ||
72 | + struct T *t = (struct T *) malloc (128); | ||
73 | + | ||
74 | + foo (&t->s); | ||
75 | + check (t); | ||
76 | + | ||
77 | + return 0; | ||
78 | +} | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0043-cpp.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0043-cpp.patch new file mode 100644 index 0000000..eaf8646 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0043-cpp.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | The OE environment sets and exports CPP as being the target gcc. When building | ||
2 | gcc-cross-canadian for a mingw targetted sdk, the following can be found in | ||
3 | build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: | ||
4 | |||
5 | configure:3641: checking for _FILE_OFFSET_BITS value needed for large files | ||
6 | configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 | ||
7 | configure:3666: $? = 0 | ||
8 | configure:3698: result: no | ||
9 | configure:3786: checking how to run the C preprocessor | ||
10 | configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 | ||
11 | configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c | ||
12 | configure:3876: $? = 0 | ||
13 | |||
14 | Note this is a *build* target (in build-x86_64-linux) so it should be using | ||
15 | the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 headers are | ||
16 | very different, using the wrong cpp is a real problem. It is leaking into | ||
17 | configure through the CPP variable. Ultimately this leads to build failures | ||
18 | related to not being able to include a process.h file for pem-unix.c. | ||
19 | |||
20 | The fix is to ensure we export a sane CPP value into the build environment when | ||
21 | using build targets. We could define a CPP_FOR_BUILD value which may be the version | ||
22 | which needs to be upstreamed but for now, this fix is good enough to avoid the | ||
23 | problem. | ||
24 | |||
25 | RP 22/08/2013 | ||
26 | |||
27 | Upstream-Status: Pending | ||
28 | |||
29 | Index: gcc-4.8.1/Makefile.in | ||
30 | =================================================================== | ||
31 | --- gcc-4.8.1.orig/Makefile.in 2013-03-30 11:25:03.000000000 +0000 | ||
32 | +++ gcc-4.8.1/Makefile.in 2013-08-13 12:03:17.151988882 +0000 | ||
33 | @@ -149,6 +149,7 @@ | ||
34 | AR="$(AR_FOR_BUILD)"; export AR; \ | ||
35 | AS="$(AS_FOR_BUILD)"; export AS; \ | ||
36 | CC="$(CC_FOR_BUILD)"; export CC; \ | ||
37 | + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ | ||
38 | CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ | ||
39 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
40 | CXX="$(CXX_FOR_BUILD)"; export CXX; \ | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0044-gengtypes.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0044-gengtypes.patch new file mode 100644 index 0000000..e38761d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0044-gengtypes.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | gengtype is generated for both the build system and the target. -DGENERATOR_FILE | ||
2 | was added in the patch http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00273.html | ||
3 | and was applied to both versions of gengtype. | ||
4 | |||
5 | Unfortunately the presence of this flag triggers the build configuration (bconfig.h) | ||
6 | to be included for the target build of gengtype. Compiling gengtype with the target | ||
7 | compiler and bconfig.h can result in errors if the build and target systems are | ||
8 | dissimilar. An example case this fails is cross compiling gcc on linux for a darwin | ||
9 | target system: | ||
10 | |||
11 | In file included from /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c:25:0: | ||
12 | | /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c: In function 'void parse_error(const char*, ...)': | ||
13 | | /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/system.h:93:53: error: 'fputc_unlocked' was not declared in this scope | ||
14 | | # define fputc(C, Stream) fputc_unlocked (C, Stream) | ||
15 | |||
16 | which occurs since auto-build.h and auto-host.h have differnet values of | ||
17 | HAVE_FPUTC_UNLOCKED: | ||
18 | |||
19 | #define HAVE_FPUTC_UNLOCKED 1 | ||
20 | /* #undef HAVE_FPUTS_UNLOCKED */ | ||
21 | |||
22 | The obvious fix is to only include the flag on build/ targets which this patch does, however | ||
23 | this also leads to compile errors due to const_tree being undefined but used in double_int.h | ||
24 | |||
25 | I added a GENERATOR_FILE2 flag to workaround those in the | ||
26 | target case and allow the build to succeed. | ||
27 | |||
28 | Only the build/gengtypes should have the -DGENERATOR_FILE | ||
29 | |||
30 | RP 22/8/2013 | ||
31 | |||
32 | Upstream-Status: Pending | ||
33 | |||
34 | Index: gcc-4.8.1/gcc/Makefile.in | ||
35 | =================================================================== | ||
36 | --- gcc-4.8.1.orig/gcc/Makefile.in 2013-08-19 11:40:36.844014424 +0000 | ||
37 | +++ gcc-4.8.1/gcc/Makefile.in 2013-08-19 11:40:37.784014402 +0000 | ||
38 | @@ -3903,27 +3903,29 @@ | ||
39 | |||
40 | gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H) | ||
41 | gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H) | ||
42 | -CFLAGS-gengtype-lex.o += -DGENERATOR_FILE | ||
43 | +CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE | ||
44 | build/gengtype-lex.o: $(BCONFIG_H) | ||
45 | |||
46 | gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \ | ||
47 | $(SYSTEM_H) | ||
48 | gengtype-parse.o: $(CONFIG_H) | ||
49 | -CFLAGS-gengtype-parse.o += -DGENERATOR_FILE | ||
50 | +CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE | ||
51 | build/gengtype-parse.o: $(BCONFIG_H) | ||
52 | |||
53 | gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ | ||
54 | gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ | ||
55 | $(XREGEX_H) | ||
56 | gengtype-state.o: $(CONFIG_H) | ||
57 | -CFLAGS-gengtype-state.o += -DGENERATOR_FILE | ||
58 | +CFLAGS-gengtype-state.o += -DGENERATOR_FILE2 | ||
59 | +CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE | ||
60 | build/gengtype-state.o: $(BCONFIG_H) | ||
61 | |||
62 | gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \ | ||
63 | rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \ | ||
64 | $(OBSTACK_H) $(XREGEX_H) | ||
65 | gengtype.o: $(CONFIG_H) | ||
66 | -CFLAGS-gengtype.o += -DGENERATOR_FILE | ||
67 | +CFLAGS-gengtype.o += -DGENERATOR_FILE2 | ||
68 | +CFLAGS-build/gengtype.o += -DGENERATOR_FILE | ||
69 | build/gengtype.o: $(BCONFIG_H) | ||
70 | |||
71 | build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ | ||
72 | @@ -3988,7 +3990,7 @@ | ||
73 | # any system header is included. | ||
74 | gengtype-lex.c : gengtype-lex.l | ||
75 | -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ | ||
76 | - echo '#include "bconfig.h"' > $@.tmp; \ | ||
77 | + echo '' > $@.tmp; \ | ||
78 | cat $@ >> $@.tmp; \ | ||
79 | mv $@.tmp $@; \ | ||
80 | } | ||
81 | Index: gcc-4.8.1/gcc/double-int.h | ||
82 | =================================================================== | ||
83 | --- gcc-4.8.1.orig/gcc/double-int.h 2013-01-30 11:04:30.000000000 +0000 | ||
84 | +++ gcc-4.8.1/gcc/double-int.h 2013-08-19 11:41:51.564012719 +0000 | ||
85 | @@ -448,10 +448,12 @@ | ||
86 | |||
87 | |||
88 | #ifndef GENERATOR_FILE | ||
89 | +#ifndef GENERATOR_FILE2 | ||
90 | /* Conversion to and from GMP integer representations. */ | ||
91 | |||
92 | void mpz_set_double_int (mpz_t, double_int, bool); | ||
93 | double_int mpz_get_double_int (const_tree, mpz_t, bool); | ||
94 | #endif | ||
95 | +#endif | ||
96 | |||
97 | #endif /* DOUBLE_INT_H */ | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch new file mode 100644 index 0000000..96fa1da --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0045-gcc-4.8-PR57717-PowerPC-E500v2.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717 | ||
2 | |||
3 | Upstream-Status: Backport | ||
4 | Signed-off-by: Julian Brown <Julian_Brown@mentor.com> | ||
5 | |||
6 | fix for PR57717 (PowerPC E500v2) | ||
7 | http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html | ||
8 | |||
9 | --- a/gcc/config/rs6000/rs6000.c 2013-05-09 20:54:06.000000000 -0500 | ||
10 | +++ b/gcc/config/rs6000/rs6000.c 2013-08-28 01:25:24.865218744 -0500 | ||
11 | @@ -6337,9 +6337,7 @@ | ||
12 | && GET_CODE (XEXP (x, 1)) == CONST_INT | ||
13 | && reg_offset_p | ||
14 | && !SPE_VECTOR_MODE (mode) | ||
15 | - && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode | ||
16 | - || mode == DDmode || mode == TDmode | ||
17 | - || mode == DImode)) | ||
18 | + && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD) | ||
19 | && VECTOR_MEM_NONE_P (mode)) | ||
20 | { | ||
21 | HOST_WIDE_INT val = INTVAL (XEXP (x, 1)); | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0046-libatomic-deptracking.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0046-libatomic-deptracking.patch new file mode 100644 index 0000000..6ea4f42 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0046-libatomic-deptracking.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | gcc 4.8 won't build with --disable-dependency-tracking since the *.Ppo files | ||
2 | don't get created unless --enable-dependency-tracking is true. | ||
3 | |||
4 | This patch ensures we only use those compiler options when its enabled. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | |||
8 | (Problem was already reported upstream, attached this patch there | ||
9 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) | ||
10 | |||
11 | RP | ||
12 | 2012/09/22 | ||
13 | |||
14 | Index: gcc-4.8.1/libatomic/Makefile.am | ||
15 | =================================================================== | ||
16 | --- gcc-4.8.1.orig/libatomic/Makefile.am 2013-01-14 18:16:23.000000000 +0000 | ||
17 | +++ gcc-4.8.1/libatomic/Makefile.am 2013-09-22 10:38:18.904064750 +0000 | ||
18 | @@ -100,7 +100,8 @@ | ||
19 | IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) | ||
20 | IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) | ||
21 | |||
22 | -M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
23 | +@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
24 | +@AMDEP_FALSE@M_DEPS = | ||
25 | M_SIZE = -DN=$(PAT_N) | ||
26 | M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) | ||
27 | M_FILE = $(PAT_BASE)_n.c | ||
28 | Index: gcc-4.8.1/libatomic/Makefile.in | ||
29 | =================================================================== | ||
30 | --- gcc-4.8.1.orig/libatomic/Makefile.in 2013-05-31 09:09:26.000000000 +0000 | ||
31 | +++ gcc-4.8.1/libatomic/Makefile.in 2013-09-22 10:40:42.520059917 +0000 | ||
32 | @@ -298,7 +298,8 @@ | ||
33 | PAT_S = $(word 3,$(PAT_SPLIT)) | ||
34 | IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) | ||
35 | IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) | ||
36 | -M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
37 | +@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
38 | +@AMDEP_FALSE@M_DEPS = | ||
39 | M_SIZE = -DN=$(PAT_N) | ||
40 | M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) | ||
41 | M_FILE = $(PAT_BASE)_n.c | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0047-repomembug.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0047-repomembug.patch new file mode 100644 index 0000000..868a4f3 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0047-repomembug.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | When compiling a project using -frepo, .rpo files are written alongside | ||
2 | the .o file, the symbols either have O or C against them. During final linking, | ||
3 | the objects can be recompiled with some of the entries tweaked/chosen by the | ||
4 | tlink.c code (visible with TLINK_VERBOSE=3), it does this by changing O -> C | ||
5 | in the .rpo files. | ||
6 | |||
7 | My tests showed that init_repo (cp/repo.c) was correctly calling | ||
8 | IDENTIFIER_REPO_CHOSEN against the right identifers and setting the | ||
9 | chosen bit. | ||
10 | |||
11 | By the time finish_repo() or emit_repo_p() were called, the pointer returned | ||
12 | by get_identifier() for the symbol marked during init_repo had changed and | ||
13 | the chosen bit was no longer set. This lead to linking bugs like: | ||
14 | |||
15 | collect: relinking | ||
16 | collect2: error: '_ZNK6sudoku5ClearINS_8SequenceEEclERS1_' was assigned to 'board.rpo', but was not defined during recompilation, or vice versa | ||
17 | |||
18 | The problem is that the garbage collection is getting called before | ||
19 | finish_repo() is called and ggc_protect_identifiers is set to false | ||
20 | so the identifiers are not preserved. They are recreated but the | ||
21 | chosen bits get wiped out which is why the pointer changes and the | ||
22 | chosen bit is not set. | ||
23 | |||
24 | The fix is to change ggc_protect_identifiers *after* the finish_repo | ||
25 | calls are made. | ||
26 | |||
27 | Reproduction is tricky since you need to trigger the garbage collector at | ||
28 | just the right moment. | ||
29 | |||
30 | RP 2013/10/9 | ||
31 | |||
32 | [YOCTO #5133] | ||
33 | |||
34 | Upstream-State: Pending | ||
35 | |||
36 | Index: gcc-4.8.1/gcc/toplev.c | ||
37 | =================================================================== | ||
38 | --- gcc-4.8.1.orig/gcc/toplev.c 2013-03-28 08:29:51.000000000 +0000 | ||
39 | +++ gcc-4.8.1/gcc/toplev.c 2013-10-09 20:27:17.089228023 +0000 | ||
40 | @@ -551,11 +551,11 @@ | ||
41 | if (flag_syntax_only || flag_wpa) | ||
42 | return; | ||
43 | |||
44 | - ggc_protect_identifiers = false; | ||
45 | - | ||
46 | /* This must also call finalize_compilation_unit. */ | ||
47 | lang_hooks.decls.final_write_globals (); | ||
48 | |||
49 | + ggc_protect_identifiers = false; | ||
50 | + | ||
51 | if (seen_error ()) | ||
52 | return; | ||
53 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch new file mode 100644 index 0000000..0ef245a --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Backport fix for PR target/58854 | ||
2 | |||
3 | 2013-11-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> | ||
4 | |||
5 | Backported from mainline | ||
6 | 2013-10-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> | ||
7 | |||
8 | PR target/58854 | ||
9 | * config/arm/arm.c (arm_expand_epilogue_apcs_frame): Emit blockage | ||
10 | |||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | --- gcc-4_8-branch/gcc/config/arm/arm.c 2013/11/11 08:00:45 204664 | ||
15 | +++ gcc-4_8-branch/gcc/config/arm/arm.c 2013/11/11 09:38:14 204665 | ||
16 | @@ -23555,6 +23555,7 @@ | ||
17 | num_regs = bit_count (saved_regs_mask); | ||
18 | if ((offsets->outgoing_args != (1 + num_regs)) || cfun->calls_alloca) | ||
19 | { | ||
20 | + emit_insn (gen_blockage ()); | ||
21 | /* Unwind the stack to just below the saved registers. */ | ||
22 | emit_insn (gen_addsi3 (stack_pointer_rtx, | ||
23 | hard_frame_pointer_rtx, | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch new file mode 100644 index 0000000..b98f8ff --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 9e0e19eac2562f73858602fe26e2044eb8b20c47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com> | ||
3 | Date: Wed, 5 Feb 2014 16:52:31 +0200 | ||
4 | Subject: [PATCH] Enable SPE & AltiVec generation on powepc*linux target | ||
5 | |||
6 | When is configured with --target=powerpc-linux, the resulting GCC will | ||
7 | not be able to generate code for SPE targets (e500v1/v2). | ||
8 | GCC configured with --target=powerpc-linuxspe will not be able to | ||
9 | generate AltiVec instructions (for e6500). | ||
10 | This patch modifies the configured file such that SPE or AltiVec code | ||
11 | can be generated when gcc is configured with --target=powerpc-linux. | ||
12 | The ABI and speciffic instructions can be selected through the | ||
13 | "-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters. | ||
14 | |||
15 | Upstream-Status: Inappropriate [configuration] | ||
16 | |||
17 | Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com> | ||
18 | --- | ||
19 | gcc/config.gcc | 7 ++++++- | ||
20 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/gcc/config.gcc b/gcc/config.gcc | ||
23 | index cb7a94e..d392c2b 100644 | ||
24 | --- a/gcc/config.gcc | ||
25 | +++ b/gcc/config.gcc | ||
26 | @@ -2068,7 +2068,12 @@ powerpc-*-rtems*) | ||
27 | tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm" | ||
28 | ;; | ||
29 | powerpc*-*-linux*) | ||
30 | - tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" | ||
31 | + case ${target} in | ||
32 | + powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*) | ||
33 | + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" ;; | ||
34 | + *) | ||
35 | + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" ;; | ||
36 | + esac | ||
37 | extra_options="${extra_options} rs6000/sysv4.opt" | ||
38 | tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" | ||
39 | case ${target} in | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0050-PR-target-58595.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0050-PR-target-58595.patch new file mode 100644 index 0000000..62a3994 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0050-PR-target-58595.patch | |||
@@ -0,0 +1,101 @@ | |||
1 | Backport fix for PR target/58595 | ||
2 | |||
3 | From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
4 | Date: Thu, 6 Mar 2014 12:07:07 +0000 | ||
5 | Subject: [PATCH] PR target/58595 * config/arm/arm.c | ||
6 | (arm_tls_symbol_p): Remove. (arm_legitimize_address): Call | ||
7 | legitimize_tls_address for any arm_tls_referenced_p expression, | ||
8 | handle constant addend. Call it before testing for !TARGET_ARM. | ||
9 | (thumb_legitimize_address): Don't handle arm_tls_symbol_p here. | ||
10 | |||
11 | * gcc.dg/tls/pr58595.c: New test. | ||
12 | |||
13 | |||
14 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208380 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
15 | |||
16 | Index: gcc-4.8.2/gcc/config/arm/arm.c | ||
17 | =================================================================== | ||
18 | --- gcc-4.8.2.orig/gcc/config/arm/arm.c | ||
19 | +++ gcc-4.8.2/gcc/config/arm/arm.c | ||
20 | @@ -230,7 +230,6 @@ static tree arm_gimplify_va_arg_expr (tr | ||
21 | static void arm_option_override (void); | ||
22 | static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode); | ||
23 | static bool arm_cannot_copy_insn_p (rtx); | ||
24 | -static bool arm_tls_symbol_p (rtx x); | ||
25 | static int arm_issue_rate (void); | ||
26 | static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; | ||
27 | static bool arm_output_addr_const_extra (FILE *, rtx); | ||
28 | @@ -6573,6 +6572,32 @@ legitimize_tls_address (rtx x, rtx reg) | ||
29 | rtx | ||
30 | arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) | ||
31 | { | ||
32 | + if (arm_tls_referenced_p (x)) | ||
33 | + { | ||
34 | + rtx addend = NULL; | ||
35 | + | ||
36 | + if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS) | ||
37 | + { | ||
38 | + addend = XEXP (XEXP (x, 0), 1); | ||
39 | + x = XEXP (XEXP (x, 0), 0); | ||
40 | + } | ||
41 | + | ||
42 | + if (GET_CODE (x) != SYMBOL_REF) | ||
43 | + return x; | ||
44 | + | ||
45 | + gcc_assert (SYMBOL_REF_TLS_MODEL (x) != 0); | ||
46 | + | ||
47 | + x = legitimize_tls_address (x, NULL_RTX); | ||
48 | + | ||
49 | + if (addend) | ||
50 | + { | ||
51 | + x = gen_rtx_PLUS (SImode, x, addend); | ||
52 | + orig_x = x; | ||
53 | + } | ||
54 | + else | ||
55 | + return x; | ||
56 | + } | ||
57 | + | ||
58 | if (!TARGET_ARM) | ||
59 | { | ||
60 | /* TODO: legitimize_address for Thumb2. */ | ||
61 | @@ -6581,9 +6606,6 @@ arm_legitimize_address (rtx x, rtx orig_ | ||
62 | return thumb_legitimize_address (x, orig_x, mode); | ||
63 | } | ||
64 | |||
65 | - if (arm_tls_symbol_p (x)) | ||
66 | - return legitimize_tls_address (x, NULL_RTX); | ||
67 | - | ||
68 | if (GET_CODE (x) == PLUS) | ||
69 | { | ||
70 | rtx xop0 = XEXP (x, 0); | ||
71 | @@ -6695,9 +6717,6 @@ arm_legitimize_address (rtx x, rtx orig_ | ||
72 | rtx | ||
73 | thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) | ||
74 | { | ||
75 | - if (arm_tls_symbol_p (x)) | ||
76 | - return legitimize_tls_address (x, NULL_RTX); | ||
77 | - | ||
78 | if (GET_CODE (x) == PLUS | ||
79 | && CONST_INT_P (XEXP (x, 1)) | ||
80 | && (INTVAL (XEXP (x, 1)) >= 32 * GET_MODE_SIZE (mode) | ||
81 | @@ -6988,20 +7007,6 @@ thumb_legitimize_reload_address (rtx *x_ | ||
82 | |||
83 | /* Test for various thread-local symbols. */ | ||
84 | |||
85 | -/* Return TRUE if X is a thread-local symbol. */ | ||
86 | - | ||
87 | -static bool | ||
88 | -arm_tls_symbol_p (rtx x) | ||
89 | -{ | ||
90 | - if (! TARGET_HAVE_TLS) | ||
91 | - return false; | ||
92 | - | ||
93 | - if (GET_CODE (x) != SYMBOL_REF) | ||
94 | - return false; | ||
95 | - | ||
96 | - return SYMBOL_REF_TLS_MODEL (x) != 0; | ||
97 | -} | ||
98 | - | ||
99 | /* Helper for arm_tls_referenced_p. */ | ||
100 | |||
101 | static int | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch new file mode 100644 index 0000000..eb8ff01 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Index: gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h | ||
2 | =================================================================== | ||
3 | --- gcc-linaro-4.8-2014.03.orig/gcc/config/aarch64/aarch64-linux.h | ||
4 | +++ gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h | ||
5 | @@ -21,10 +21,23 @@ | ||
6 | #ifndef GCC_AARCH64_LINUX_H | ||
7 | #define GCC_AARCH64_LINUX_H | ||
8 | |||
9 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" | ||
10 | - | ||
11 | #define CPP_SPEC "%{pthread:-D_REENTRANT}" | ||
12 | |||
13 | +#if TARGET_BIG_ENDIAN_DEFAULT | ||
14 | +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{!mlittle-endian:_be}.so.1" | ||
15 | + | ||
16 | +#define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
17 | + %{static:-Bstatic} \ | ||
18 | + %{shared:-shared} \ | ||
19 | + %{symbolic:-Bsymbolic} \ | ||
20 | + %{rdynamic:-export-dynamic} \ | ||
21 | + -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ | ||
22 | + -X \ | ||
23 | + %{mbig-endian:-EB} %{mlittle-endian:-EL} \ | ||
24 | + -maarch64linux%{!mlittle-endian:b}" | ||
25 | +#else | ||
26 | +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" | ||
27 | + | ||
28 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
29 | %{static:-Bstatic} \ | ||
30 | %{shared:-shared} \ | ||
31 | @@ -34,6 +47,7 @@ | ||
32 | -X \ | ||
33 | %{mbig-endian:-EB} %{mlittle-endian:-EL} \ | ||
34 | -maarch64linux%{mbig-endian:b}" | ||
35 | +#endif | ||
36 | |||
37 | #define LINK_SPEC LINUX_TARGET_LINK_SPEC | ||
38 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/gcc-4.8-PR56797.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/gcc-4.8-PR56797.patch new file mode 100644 index 0000000..b5d7b86 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/gcc-4.8-PR56797.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | From patchwork Fri Apr 19 09:34:49 2013 | ||
5 | Content-Type: text/plain; charset="utf-8" | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Transfer-Encoding: 7bit | ||
8 | Subject: [ARM] Fix PR56797 | ||
9 | Date: Thu, 18 Apr 2013 23:34:49 -0000 | ||
10 | From: Greta Yorsh <Greta.Yorsh@arm.com> | ||
11 | X-Patchwork-Id: 237891 | ||
12 | Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com> | ||
13 | To: "GCC Patches" <gcc-patches@gcc.gnu.org> | ||
14 | Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>, | ||
15 | "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com> | ||
16 | |||
17 | Fix PR56797 | ||
18 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797 | ||
19 | |||
20 | The problem is that peephole optimizer thinks it can generate an ldm, but | ||
21 | the pattern for ldm no longer matches, because after r188738 it requires | ||
22 | that if one of the destination registers is SP then the base register must | ||
23 | be SP, and it's not SP in the test case. | ||
24 | |||
25 | The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because | ||
26 | peephole doesn't trigger there (because there is a different epilogue | ||
27 | sequence). It looks like a latent problem for other architecture or CPUs. | ||
28 | |||
29 | This patch adds this condition to the peephole optimizer. | ||
30 | |||
31 | No regression on qemu for arm-none-eabi and fixes the test reported in the | ||
32 | PR. I couldn't minimize the test sufficiently to include it in the | ||
33 | testsuite. | ||
34 | |||
35 | Ok for trunk? | ||
36 | |||
37 | Thanks, | ||
38 | Greta | ||
39 | |||
40 | gcc/ | ||
41 | |||
42 | 2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com> | ||
43 | |||
44 | PR target/56797 | ||
45 | * config/arm/arm.c (load_multiple_sequence): Require SP | ||
46 | as base register for loads if SP is in the register list. | ||
47 | |||
48 | |||
49 | diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c | ||
50 | index d00849c..60fef78 100644 | ||
51 | --- a/gcc/config/arm/arm.c | ||
52 | +++ b/gcc/config/arm/arm.c | ||
53 | @@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order, | ||
54 | || (i != nops - 1 && unsorted_regs[i] == base_reg)) | ||
55 | return 0; | ||
56 | |||
57 | + /* Don't allow SP to be loaded unless it is also the base | ||
58 | + register. It guarantees that SP is reset correctly when | ||
59 | + an LDM instruction is interruptted. Otherwise, we might | ||
60 | + end up with a corrupt stack. */ | ||
61 | + if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM) | ||
62 | + return 0; | ||
63 | + | ||
64 | unsorted_offsets[i] = INTVAL (offset); | ||
65 | if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]]) | ||
66 | order[0] = i; | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/use-lib-for-aarch64.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/use-lib-for-aarch64.patch new file mode 100644 index 0000000..d6bacd8 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/use-lib-for-aarch64.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | --- | ||
2 | gcc/config/aarch64/t-aarch64-linux | 2 +- | ||
3 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4 | |||
5 | --- gcc-linaro-4.8-2013.04.orig/gcc/config/aarch64/t-aarch64-linux | ||
6 | +++ gcc-linaro-4.8-2013.04/gcc/config/aarch64/t-aarch64-linux | ||
7 | @@ -20,6 +20,6 @@ | ||
8 | |||
9 | LIB1ASMSRC = aarch64/lib1funcs.asm | ||
10 | LIB1ASMFUNCS = _aarch64_sync_cache_range | ||
11 | |||
12 | AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) | ||
13 | -MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) | ||
14 | +MULTILIB_OSDIRNAMES = .=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc new file mode 100644 index 0000000..2334719 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc | |||
@@ -0,0 +1,73 @@ | |||
1 | require recipes-devtools/gcc/gcc-4.9.inc | ||
2 | PV = "linaro-${BASEPV}" | ||
3 | |||
4 | MMYY = "14.11" | ||
5 | RELEASE = "20${MMYY}" | ||
6 | PR = "r${RELEASE}" | ||
7 | BINV = "4.9.3" | ||
8 | |||
9 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/gcc-${PV}' ], d)}" | ||
10 | FILESPATH_append := ":${COREBASE}/meta/recipes-devtools/gcc/gcc-4.9" | ||
11 | |||
12 | SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gcc-linaro/${BASEPV}/gcc-${PV}-${RELEASE}.tar.xz \ | ||
13 | file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ | ||
14 | file://0002-uclibc-conf.patch \ | ||
15 | file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \ | ||
16 | file://0004-uclibc-locale.patch \ | ||
17 | file://0005-uclibc-locale-no__x.patch \ | ||
18 | file://0006-uclibc-locale-wchar_fix.patch \ | ||
19 | file://0007-uclibc-locale-update.patch \ | ||
20 | file://0008-missing-execinfo_h.patch \ | ||
21 | file://0009-c99-snprintf.patch \ | ||
22 | file://0010-c99-complex-ugly-hack.patch \ | ||
23 | file://0011-index_macro.patch \ | ||
24 | file://0013-libstdc-namespace.patch \ | ||
25 | file://0014-sh-pr24836.patch \ | ||
26 | file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \ | ||
27 | file://0016-gcc-poison-system-directories.patch \ | ||
28 | file://0017-gcc-poison-dir-extend.patch \ | ||
29 | file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ | ||
30 | file://0019-64-bit-multilib-hack.patch \ | ||
31 | file://0020-optional-libstdc.patch \ | ||
32 | file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ | ||
33 | file://0022-COLLECT_GCC_OPTIONS.patch \ | ||
34 | file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ | ||
35 | file://0024-PR-target-32219.patch \ | ||
36 | file://0025-fortran-cross-compile-hack.patch \ | ||
37 | file://0026-libgcc-sjlj-check.patch \ | ||
38 | file://0027-cpp-honor-sysroot.patch \ | ||
39 | file://0028-MIPS64-Default-to-N64-ABI.patch \ | ||
40 | file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ | ||
41 | file://0030-gcc-Fix-argument-list-too-long-error.patch \ | ||
42 | file://0031-Disable-sdt.patch \ | ||
43 | file://0032-libtool.patch \ | ||
44 | file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ | ||
45 | file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ | ||
46 | file://0037-gcc-4.8-PR56797.patch \ | ||
47 | file://0040-fix-g++-sysroot.patch \ | ||
48 | file://0041-libtool-avoid-libdir.patch \ | ||
49 | file://0043-cpp.patch \ | ||
50 | file://0044-gengtypes.patch \ | ||
51 | file://0046-libatomic-deptracking.patch \ | ||
52 | file://0047-repomembug.patch \ | ||
53 | file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ | ||
54 | file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \ | ||
55 | file://0051-eabispe.patch \ | ||
56 | file://0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch;apply=no \ | ||
57 | file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \ | ||
58 | file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \ | ||
59 | file://0055-PR-rtl-optimization-61801.patch;apply=no \ | ||
60 | file://0056-top-level-reorder_gcc-bug-61144.patch \ | ||
61 | file://0058-gcc-r212171.patch \ | ||
62 | file://0059-gcc-PR-rtl-optimization-63348.patch \ | ||
63 | file://AArch64-Define-BE-loader-name-default-be.patch \ | ||
64 | file://use-lib-for-aarch64.patch \ | ||
65 | file://1001-add-install-ptest-to-Makefile.patch \ | ||
66 | file://run-ptest \ | ||
67 | " | ||
68 | |||
69 | SRC_URI[md5sum] = "a0fda0cc4408f935086bb156aeef5ff9" | ||
70 | SRC_URI[sha256sum] = "7e176614b4a39259bfe4dad08d89651f511f3e52c2201210037b48cce90cc32a" | ||
71 | |||
72 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}-${RELEASE}" | ||
73 | B = "${WORKDIR}/gcc-${PV}-${RELEASE}/build.${HOST_SYS}.${TARGET_SYS}" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 0000000..e588011 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From bf3d96ae58fa180b8b468d25dc2e0209daca2751 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:37:11 +0400 | ||
4 | Subject: [PATCH 01/35] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | --- | ||
10 | configure | 2 +- | ||
11 | configure.ac | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/configure b/configure | ||
15 | index d809535..1b76c90 100755 | ||
16 | --- a/configure | ||
17 | +++ b/configure | ||
18 | @@ -7439,7 +7439,7 @@ fi | ||
19 | # for target_alias and gcc doesn't manage it consistently. | ||
20 | target_configargs="--cache-file=./config.cache ${target_configargs}" | ||
21 | |||
22 | -FLAGS_FOR_TARGET= | ||
23 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
24 | case " $target_configdirs " in | ||
25 | *" newlib "*) | ||
26 | case " $target_configargs " in | ||
27 | diff --git a/configure.ac b/configure.ac | ||
28 | index 48ec1aa..89d1d3f 100644 | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -2873,7 +2873,7 @@ fi | ||
32 | # for target_alias and gcc doesn't manage it consistently. | ||
33 | target_configargs="--cache-file=./config.cache ${target_configargs}" | ||
34 | |||
35 | -FLAGS_FOR_TARGET= | ||
36 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
37 | case " $target_configdirs " in | ||
38 | *" newlib "*) | ||
39 | case " $target_configargs " in | ||
40 | -- | ||
41 | 1.7.10.4 | ||
42 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0002-uclibc-conf.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0002-uclibc-conf.patch new file mode 100644 index 0000000..dda3b10 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0002-uclibc-conf.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From d030973c872c00d916921d84deee0af2c0d38081 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:38:25 +0400 | ||
4 | Subject: [PATCH 02/35] uclibc-conf | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | contrib/regression/objs-gcc.sh | 4 ++++ | ||
11 | libjava/classpath/ltconfig | 4 ++-- | ||
12 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh | ||
15 | index 60b0497..6dc7ead 100755 | ||
16 | --- a/contrib/regression/objs-gcc.sh | ||
17 | +++ b/contrib/regression/objs-gcc.sh | ||
18 | @@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] | ||
19 | then | ||
20 | make all-gdb all-dejagnu all-ld || exit 1 | ||
21 | make install-gdb install-dejagnu install-ld || exit 1 | ||
22 | +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] | ||
23 | + then | ||
24 | + make all-gdb all-dejagnu all-ld || exit 1 | ||
25 | + make install-gdb install-dejagnu install-ld || exit 1 | ||
26 | elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then | ||
27 | make bootstrap || exit 1 | ||
28 | make install || exit 1 | ||
29 | diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig | ||
30 | index 743d951..ae4ea60 100755 | ||
31 | --- a/libjava/classpath/ltconfig | ||
32 | +++ b/libjava/classpath/ltconfig | ||
33 | @@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | ||
34 | |||
35 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | ||
36 | case $host_os in | ||
37 | -linux-gnu*) ;; | ||
38 | +linux-gnu*|linux-uclibc*) ;; | ||
39 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | ||
40 | esac | ||
41 | |||
42 | @@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) | ||
43 | ;; | ||
44 | |||
45 | # This must be Linux ELF. | ||
46 | -linux-gnu*) | ||
47 | +linux*) | ||
48 | version_type=linux | ||
49 | need_lib_prefix=no | ||
50 | need_version=no | ||
51 | -- | ||
52 | 1.7.10.4 | ||
53 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch new file mode 100644 index 0000000..7098e99 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From d2d9dd756c4356d14dd7ae003856344cb4f37985 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:40:12 +0400 | ||
4 | Subject: [PATCH 03/35] gcc-uclibc-locale-ctype_touplow_t | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++ | ||
11 | libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++ | ||
12 | libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++ | ||
13 | 3 files changed, 23 insertions(+) | ||
14 | |||
15 | diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc | ||
16 | index 0d309a5..f2f1e1f 100644 | ||
17 | --- a/libstdc++-v3/config/locale/generic/c_locale.cc | ||
18 | +++ b/libstdc++-v3/config/locale/generic/c_locale.cc | ||
19 | @@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION | ||
20 | #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT | ||
21 | #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ | ||
22 | extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) | ||
23 | +#ifdef __UCLIBC__ | ||
24 | +// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* | ||
25 | +_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); | ||
26 | +#else | ||
27 | _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); | ||
28 | +#endif | ||
29 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT | ||
30 | diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h | ||
31 | index b5fd989..3da9a5d 100644 | ||
32 | --- a/libstdc++-v3/config/locale/generic/c_locale.h | ||
33 | +++ b/libstdc++-v3/config/locale/generic/c_locale.h | ||
34 | @@ -40,13 +40,22 @@ | ||
35 | |||
36 | #include <clocale> | ||
37 | |||
38 | +#ifdef __UCLIBC__ | ||
39 | +#include <features.h> | ||
40 | +#include <ctype.h> | ||
41 | +#endif | ||
42 | + | ||
43 | #define _GLIBCXX_NUM_CATEGORIES 0 | ||
44 | |||
45 | namespace std _GLIBCXX_VISIBILITY(default) | ||
46 | { | ||
47 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
48 | |||
49 | +#ifdef __UCLIBC__ | ||
50 | + typedef __ctype_touplow_t* __c_locale; | ||
51 | +#else | ||
52 | typedef int* __c_locale; | ||
53 | +#endif | ||
54 | |||
55 | // Convert numeric value of type double and long double to string and | ||
56 | // return length of string. If vsnprintf is available use it, otherwise | ||
57 | diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
58 | index 2d8e978..14eb08f 100644 | ||
59 | --- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
60 | +++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
61 | @@ -33,6 +33,11 @@ | ||
62 | |||
63 | // Information as gleaned from /usr/include/ctype.h | ||
64 | |||
65 | +#ifdef __UCLIBC__ | ||
66 | +#include <features.h> | ||
67 | +#include <ctype.h> | ||
68 | +#endif | ||
69 | + | ||
70 | namespace std _GLIBCXX_VISIBILITY(default) | ||
71 | { | ||
72 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
73 | @@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
74 | struct ctype_base | ||
75 | { | ||
76 | // Non-standard typedefs. | ||
77 | +#ifdef __UCLIBC__ | ||
78 | + typedef const __ctype_touplow_t* __to_type; | ||
79 | +#else | ||
80 | typedef const int* __to_type; | ||
81 | +#endif | ||
82 | |||
83 | // NB: Offsets into ctype<char>::_M_table force a particular size | ||
84 | // on the mask type. Because of this, we don't use an enum. | ||
85 | -- | ||
86 | 1.7.10.4 | ||
87 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0004-uclibc-locale.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0004-uclibc-locale.patch new file mode 100644 index 0000000..49f5f33 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0004-uclibc-locale.patch | |||
@@ -0,0 +1,2862 @@ | |||
1 | From a55c751a449c2cbf0b3fcc07aab1b86bf9661510 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:41:39 +0400 | ||
4 | Subject: [PATCH 04/35] uclibc-locale | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/acinclude.m4 | 37 ++ | ||
11 | .../config/locale/uclibc/c++locale_internal.h | 63 ++ | ||
12 | libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++ | ||
13 | libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++ | ||
14 | .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++ | ||
15 | .../config/locale/uclibc/collate_members.cc | 80 +++ | ||
16 | libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++ | ||
17 | .../config/locale/uclibc/messages_members.cc | 100 +++ | ||
18 | .../config/locale/uclibc/messages_members.h | 118 ++++ | ||
19 | .../config/locale/uclibc/monetary_members.cc | 692 ++++++++++++++++++++ | ||
20 | .../config/locale/uclibc/numeric_members.cc | 160 +++++ | ||
21 | libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++ | ||
22 | libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++ | ||
23 | libstdc++-v3/configure | 75 +++ | ||
24 | libstdc++-v3/include/c_compatibility/wchar.h | 2 + | ||
25 | libstdc++-v3/include/c_std/cwchar | 2 + | ||
26 | 16 files changed, 2688 insertions(+) | ||
27 | create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
28 | create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
29 | create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h | ||
30 | create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
31 | create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
32 | create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
33 | create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
34 | create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h | ||
35 | create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
36 | create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
37 | create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc | ||
38 | create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h | ||
39 | |||
40 | diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 | ||
41 | index 0871a6a..326d7ef 100644 | ||
42 | --- a/libstdc++-v3/acinclude.m4 | ||
43 | +++ b/libstdc++-v3/acinclude.m4 | ||
44 | @@ -1905,6 +1905,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ | ||
45 | # Default to "generic". | ||
46 | if test $enable_clocale_flag = auto; then | ||
47 | case ${target_os} in | ||
48 | + *-uclibc*) | ||
49 | + enable_clocale_flag=uclibc | ||
50 | + ;; | ||
51 | linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) | ||
52 | enable_clocale_flag=gnu | ||
53 | ;; | ||
54 | @@ -2069,6 +2072,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ | ||
55 | CTIME_CC=config/locale/generic/time_members.cc | ||
56 | CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h | ||
57 | ;; | ||
58 | + uclibc) | ||
59 | + AC_MSG_RESULT(uclibc) | ||
60 | + | ||
61 | + # Declare intention to use gettext, and add support for specific | ||
62 | + # languages. | ||
63 | + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT | ||
64 | + ALL_LINGUAS="de fr" | ||
65 | + | ||
66 | + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. | ||
67 | + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) | ||
68 | + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then | ||
69 | + USE_NLS=yes | ||
70 | + fi | ||
71 | + # Export the build objects. | ||
72 | + for ling in $ALL_LINGUAS; do \ | ||
73 | + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ | ||
74 | + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ | ||
75 | + done | ||
76 | + AC_SUBST(glibcxx_MOFILES) | ||
77 | + AC_SUBST(glibcxx_POFILES) | ||
78 | + | ||
79 | + CLOCALE_H=config/locale/uclibc/c_locale.h | ||
80 | + CLOCALE_CC=config/locale/uclibc/c_locale.cc | ||
81 | + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc | ||
82 | + CCOLLATE_CC=config/locale/uclibc/collate_members.cc | ||
83 | + CCTYPE_CC=config/locale/uclibc/ctype_members.cc | ||
84 | + CMESSAGES_H=config/locale/uclibc/messages_members.h | ||
85 | + CMESSAGES_CC=config/locale/uclibc/messages_members.cc | ||
86 | + CMONEY_CC=config/locale/uclibc/monetary_members.cc | ||
87 | + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc | ||
88 | + CTIME_H=config/locale/uclibc/time_members.h | ||
89 | + CTIME_CC=config/locale/uclibc/time_members.cc | ||
90 | + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h | ||
91 | + ;; | ||
92 | esac | ||
93 | |||
94 | # This is where the testsuite looks for locale catalogs, using the | ||
95 | diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
96 | new file mode 100644 | ||
97 | index 0000000..2ae3e4a | ||
98 | --- /dev/null | ||
99 | +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
100 | @@ -0,0 +1,63 @@ | ||
101 | +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- | ||
102 | + | ||
103 | +// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. | ||
104 | +// | ||
105 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
106 | +// software; you can redistribute it and/or modify it under the | ||
107 | +// terms of the GNU General Public License as published by the | ||
108 | +// Free Software Foundation; either version 2, or (at your option) | ||
109 | +// any later version. | ||
110 | + | ||
111 | +// This library is distributed in the hope that it will be useful, | ||
112 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
113 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
114 | +// GNU General Public License for more details. | ||
115 | + | ||
116 | +// You should have received a copy of the GNU General Public License along | ||
117 | +// with this library; see the file COPYING. If not, write to the Free | ||
118 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
119 | +// USA. | ||
120 | + | ||
121 | +// As a special exception, you may use this file as part of a free software | ||
122 | +// library without restriction. Specifically, if other files instantiate | ||
123 | +// templates or use macros or inline functions from this file, or you compile | ||
124 | +// this file and link it with other files to produce an executable, this | ||
125 | +// file does not by itself cause the resulting executable to be covered by | ||
126 | +// the GNU General Public License. This exception does not however | ||
127 | +// invalidate any other reasons why the executable file might be covered by | ||
128 | +// the GNU General Public License. | ||
129 | + | ||
130 | +// Written by Jakub Jelinek <jakub@redhat.com> | ||
131 | + | ||
132 | +#include <bits/c++config.h> | ||
133 | +#include <clocale> | ||
134 | + | ||
135 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
136 | +#warning clean this up | ||
137 | +#endif | ||
138 | + | ||
139 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
140 | + | ||
141 | +extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; | ||
142 | +extern "C" __typeof(strcoll_l) __strcoll_l; | ||
143 | +extern "C" __typeof(strftime_l) __strftime_l; | ||
144 | +extern "C" __typeof(strtod_l) __strtod_l; | ||
145 | +extern "C" __typeof(strtof_l) __strtof_l; | ||
146 | +extern "C" __typeof(strtold_l) __strtold_l; | ||
147 | +extern "C" __typeof(strxfrm_l) __strxfrm_l; | ||
148 | +extern "C" __typeof(newlocale) __newlocale; | ||
149 | +extern "C" __typeof(freelocale) __freelocale; | ||
150 | +extern "C" __typeof(duplocale) __duplocale; | ||
151 | +extern "C" __typeof(uselocale) __uselocale; | ||
152 | + | ||
153 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
154 | +extern "C" __typeof(iswctype_l) __iswctype_l; | ||
155 | +extern "C" __typeof(towlower_l) __towlower_l; | ||
156 | +extern "C" __typeof(towupper_l) __towupper_l; | ||
157 | +extern "C" __typeof(wcscoll_l) __wcscoll_l; | ||
158 | +extern "C" __typeof(wcsftime_l) __wcsftime_l; | ||
159 | +extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; | ||
160 | +extern "C" __typeof(wctype_l) __wctype_l; | ||
161 | +#endif | ||
162 | + | ||
163 | +#endif // GLIBC 2.3 and later | ||
164 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
165 | new file mode 100644 | ||
166 | index 0000000..5081dc1 | ||
167 | --- /dev/null | ||
168 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
169 | @@ -0,0 +1,160 @@ | ||
170 | +// Wrapper for underlying C-language localization -*- C++ -*- | ||
171 | + | ||
172 | +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. | ||
173 | +// | ||
174 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
175 | +// software; you can redistribute it and/or modify it under the | ||
176 | +// terms of the GNU General Public License as published by the | ||
177 | +// Free Software Foundation; either version 2, or (at your option) | ||
178 | +// any later version. | ||
179 | + | ||
180 | +// This library is distributed in the hope that it will be useful, | ||
181 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
182 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
183 | +// GNU General Public License for more details. | ||
184 | + | ||
185 | +// You should have received a copy of the GNU General Public License along | ||
186 | +// with this library; see the file COPYING. If not, write to the Free | ||
187 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
188 | +// USA. | ||
189 | + | ||
190 | +// As a special exception, you may use this file as part of a free software | ||
191 | +// library without restriction. Specifically, if other files instantiate | ||
192 | +// templates or use macros or inline functions from this file, or you compile | ||
193 | +// this file and link it with other files to produce an executable, this | ||
194 | +// file does not by itself cause the resulting executable to be covered by | ||
195 | +// the GNU General Public License. This exception does not however | ||
196 | +// invalidate any other reasons why the executable file might be covered by | ||
197 | +// the GNU General Public License. | ||
198 | + | ||
199 | +// | ||
200 | +// ISO C++ 14882: 22.8 Standard locale categories. | ||
201 | +// | ||
202 | + | ||
203 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
204 | + | ||
205 | +#include <cerrno> // For errno | ||
206 | +#include <locale> | ||
207 | +#include <stdexcept> | ||
208 | +#include <langinfo.h> | ||
209 | +#include <bits/c++locale_internal.h> | ||
210 | + | ||
211 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
212 | +#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) | ||
213 | +#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) | ||
214 | +#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) | ||
215 | +#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) | ||
216 | +#define __strtof_l(S, E, L) strtof((S), (E)) | ||
217 | +#define __strtod_l(S, E, L) strtod((S), (E)) | ||
218 | +#define __strtold_l(S, E, L) strtold((S), (E)) | ||
219 | +#warning should dummy __newlocale check for C|POSIX ? | ||
220 | +#define __newlocale(a, b, c) NULL | ||
221 | +#define __freelocale(a) ((void)0) | ||
222 | +#define __duplocale(a) __c_locale() | ||
223 | +#endif | ||
224 | + | ||
225 | +namespace std | ||
226 | +{ | ||
227 | + template<> | ||
228 | + void | ||
229 | + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, | ||
230 | + const __c_locale& __cloc) | ||
231 | + { | ||
232 | + if (!(__err & ios_base::failbit)) | ||
233 | + { | ||
234 | + char* __sanity; | ||
235 | + errno = 0; | ||
236 | + float __f = __strtof_l(__s, &__sanity, __cloc); | ||
237 | + if (__sanity != __s && errno != ERANGE) | ||
238 | + __v = __f; | ||
239 | + else | ||
240 | + __err |= ios_base::failbit; | ||
241 | + } | ||
242 | + } | ||
243 | + | ||
244 | + template<> | ||
245 | + void | ||
246 | + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, | ||
247 | + const __c_locale& __cloc) | ||
248 | + { | ||
249 | + if (!(__err & ios_base::failbit)) | ||
250 | + { | ||
251 | + char* __sanity; | ||
252 | + errno = 0; | ||
253 | + double __d = __strtod_l(__s, &__sanity, __cloc); | ||
254 | + if (__sanity != __s && errno != ERANGE) | ||
255 | + __v = __d; | ||
256 | + else | ||
257 | + __err |= ios_base::failbit; | ||
258 | + } | ||
259 | + } | ||
260 | + | ||
261 | + template<> | ||
262 | + void | ||
263 | + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, | ||
264 | + const __c_locale& __cloc) | ||
265 | + { | ||
266 | + if (!(__err & ios_base::failbit)) | ||
267 | + { | ||
268 | + char* __sanity; | ||
269 | + errno = 0; | ||
270 | + long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
271 | + if (__sanity != __s && errno != ERANGE) | ||
272 | + __v = __ld; | ||
273 | + else | ||
274 | + __err |= ios_base::failbit; | ||
275 | + } | ||
276 | + } | ||
277 | + | ||
278 | + void | ||
279 | + locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, | ||
280 | + __c_locale __old) | ||
281 | + { | ||
282 | + __cloc = __newlocale(1 << LC_ALL, __s, __old); | ||
283 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
284 | + if (!__cloc) | ||
285 | + { | ||
286 | + // This named locale is not supported by the underlying OS. | ||
287 | + __throw_runtime_error(__N("locale::facet::_S_create_c_locale " | ||
288 | + "name not valid")); | ||
289 | + } | ||
290 | +#endif | ||
291 | + } | ||
292 | + | ||
293 | + void | ||
294 | + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) | ||
295 | + { | ||
296 | + if (_S_get_c_locale() != __cloc) | ||
297 | + __freelocale(__cloc); | ||
298 | + } | ||
299 | + | ||
300 | + __c_locale | ||
301 | + locale::facet::_S_clone_c_locale(__c_locale& __cloc) | ||
302 | + { return __duplocale(__cloc); } | ||
303 | +} // namespace std | ||
304 | + | ||
305 | +namespace __gnu_cxx | ||
306 | +{ | ||
307 | + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = | ||
308 | + { | ||
309 | + "LC_CTYPE", | ||
310 | + "LC_NUMERIC", | ||
311 | + "LC_TIME", | ||
312 | + "LC_COLLATE", | ||
313 | + "LC_MONETARY", | ||
314 | + "LC_MESSAGES", | ||
315 | +#if _GLIBCXX_NUM_CATEGORIES != 0 | ||
316 | + "LC_PAPER", | ||
317 | + "LC_NAME", | ||
318 | + "LC_ADDRESS", | ||
319 | + "LC_TELEPHONE", | ||
320 | + "LC_MEASUREMENT", | ||
321 | + "LC_IDENTIFICATION" | ||
322 | +#endif | ||
323 | + }; | ||
324 | +} | ||
325 | + | ||
326 | +namespace std | ||
327 | +{ | ||
328 | + const char* const* const locale::_S_categories = __gnu_cxx::category_names; | ||
329 | +} // namespace std | ||
330 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
331 | new file mode 100644 | ||
332 | index 0000000..da07c1f | ||
333 | --- /dev/null | ||
334 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
335 | @@ -0,0 +1,117 @@ | ||
336 | +// Wrapper for underlying C-language localization -*- C++ -*- | ||
337 | + | ||
338 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
339 | +// | ||
340 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
341 | +// software; you can redistribute it and/or modify it under the | ||
342 | +// terms of the GNU General Public License as published by the | ||
343 | +// Free Software Foundation; either version 2, or (at your option) | ||
344 | +// any later version. | ||
345 | + | ||
346 | +// This library is distributed in the hope that it will be useful, | ||
347 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
348 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
349 | +// GNU General Public License for more details. | ||
350 | + | ||
351 | +// You should have received a copy of the GNU General Public License along | ||
352 | +// with this library; see the file COPYING. If not, write to the Free | ||
353 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
354 | +// USA. | ||
355 | + | ||
356 | +// As a special exception, you may use this file as part of a free software | ||
357 | +// library without restriction. Specifically, if other files instantiate | ||
358 | +// templates or use macros or inline functions from this file, or you compile | ||
359 | +// this file and link it with other files to produce an executable, this | ||
360 | +// file does not by itself cause the resulting executable to be covered by | ||
361 | +// the GNU General Public License. This exception does not however | ||
362 | +// invalidate any other reasons why the executable file might be covered by | ||
363 | +// the GNU General Public License. | ||
364 | + | ||
365 | +// | ||
366 | +// ISO C++ 14882: 22.8 Standard locale categories. | ||
367 | +// | ||
368 | + | ||
369 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
370 | + | ||
371 | +#ifndef _C_LOCALE_H | ||
372 | +#define _C_LOCALE_H 1 | ||
373 | + | ||
374 | +#pragma GCC system_header | ||
375 | + | ||
376 | +#include <cstring> // get std::strlen | ||
377 | +#include <cstdio> // get std::snprintf or std::sprintf | ||
378 | +#include <clocale> | ||
379 | +#include <langinfo.h> // For codecvt | ||
380 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
381 | +#warning fix this | ||
382 | +#endif | ||
383 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
384 | +#include <iconv.h> // For codecvt using iconv, iconv_t | ||
385 | +#endif | ||
386 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
387 | +#include <libintl.h> // For messages | ||
388 | +#endif | ||
389 | + | ||
390 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
391 | +#warning what is _GLIBCXX_C_LOCALE_GNU for | ||
392 | +#endif | ||
393 | +#define _GLIBCXX_C_LOCALE_GNU 1 | ||
394 | + | ||
395 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
396 | +#warning fix categories | ||
397 | +#endif | ||
398 | +// #define _GLIBCXX_NUM_CATEGORIES 6 | ||
399 | +#define _GLIBCXX_NUM_CATEGORIES 0 | ||
400 | + | ||
401 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
402 | +namespace __gnu_cxx | ||
403 | +{ | ||
404 | + extern "C" __typeof(uselocale) __uselocale; | ||
405 | +} | ||
406 | +#endif | ||
407 | + | ||
408 | +namespace std | ||
409 | +{ | ||
410 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
411 | + typedef __locale_t __c_locale; | ||
412 | +#else | ||
413 | + typedef int* __c_locale; | ||
414 | +#endif | ||
415 | + | ||
416 | + // Convert numeric value of type _Tv to string and return length of | ||
417 | + // string. If snprintf is available use it, otherwise fall back to | ||
418 | + // the unsafe sprintf which, in general, can be dangerous and should | ||
419 | + // be avoided. | ||
420 | + template<typename _Tv> | ||
421 | + int | ||
422 | + __convert_from_v(char* __out, | ||
423 | + const int __size __attribute__ ((__unused__)), | ||
424 | + const char* __fmt, | ||
425 | +#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
426 | + _Tv __v, const __c_locale& __cloc, int __prec) | ||
427 | + { | ||
428 | + __c_locale __old = __gnu_cxx::__uselocale(__cloc); | ||
429 | +#else | ||
430 | + _Tv __v, const __c_locale&, int __prec) | ||
431 | + { | ||
432 | +# ifdef __UCLIBC_HAS_LOCALE__ | ||
433 | + char* __old = std::setlocale(LC_ALL, NULL); | ||
434 | + char* __sav = new char[std::strlen(__old) + 1]; | ||
435 | + std::strcpy(__sav, __old); | ||
436 | + std::setlocale(LC_ALL, "C"); | ||
437 | +# endif | ||
438 | +#endif | ||
439 | + | ||
440 | + const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | ||
441 | + | ||
442 | +#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
443 | + __gnu_cxx::__uselocale(__old); | ||
444 | +#elif defined __UCLIBC_HAS_LOCALE__ | ||
445 | + std::setlocale(LC_ALL, __sav); | ||
446 | + delete [] __sav; | ||
447 | +#endif | ||
448 | + return __ret; | ||
449 | + } | ||
450 | +} | ||
451 | + | ||
452 | +#endif | ||
453 | diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
454 | new file mode 100644 | ||
455 | index 0000000..64aa962 | ||
456 | --- /dev/null | ||
457 | +++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
458 | @@ -0,0 +1,308 @@ | ||
459 | +// std::codecvt implementation details, GNU version -*- C++ -*- | ||
460 | + | ||
461 | +// Copyright (C) 2002, 2003 Free Software Foundation, Inc. | ||
462 | +// | ||
463 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
464 | +// software; you can redistribute it and/or modify it under the | ||
465 | +// terms of the GNU General Public License as published by the | ||
466 | +// Free Software Foundation; either version 2, or (at your option) | ||
467 | +// any later version. | ||
468 | + | ||
469 | +// This library is distributed in the hope that it will be useful, | ||
470 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
471 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
472 | +// GNU General Public License for more details. | ||
473 | + | ||
474 | +// You should have received a copy of the GNU General Public License along | ||
475 | +// with this library; see the file COPYING. If not, write to the Free | ||
476 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
477 | +// USA. | ||
478 | + | ||
479 | +// As a special exception, you may use this file as part of a free software | ||
480 | +// library without restriction. Specifically, if other files instantiate | ||
481 | +// templates or use macros or inline functions from this file, or you compile | ||
482 | +// this file and link it with other files to produce an executable, this | ||
483 | +// file does not by itself cause the resulting executable to be covered by | ||
484 | +// the GNU General Public License. This exception does not however | ||
485 | +// invalidate any other reasons why the executable file might be covered by | ||
486 | +// the GNU General Public License. | ||
487 | + | ||
488 | +// | ||
489 | +// ISO C++ 14882: 22.2.1.5 - Template class codecvt | ||
490 | +// | ||
491 | + | ||
492 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
493 | + | ||
494 | +#include <locale> | ||
495 | +#include <cstdlib> // For MB_CUR_MAX | ||
496 | +#include <climits> // For MB_LEN_MAX | ||
497 | +#include <bits/c++locale_internal.h> | ||
498 | + | ||
499 | +namespace std | ||
500 | +{ | ||
501 | + // Specializations. | ||
502 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
503 | + codecvt_base::result | ||
504 | + codecvt<wchar_t, char, mbstate_t>:: | ||
505 | + do_out(state_type& __state, const intern_type* __from, | ||
506 | + const intern_type* __from_end, const intern_type*& __from_next, | ||
507 | + extern_type* __to, extern_type* __to_end, | ||
508 | + extern_type*& __to_next) const | ||
509 | + { | ||
510 | + result __ret = ok; | ||
511 | + state_type __tmp_state(__state); | ||
512 | + | ||
513 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
514 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
515 | +#endif | ||
516 | + | ||
517 | + // wcsnrtombs is *very* fast but stops if encounters NUL characters: | ||
518 | + // in case we fall back to wcrtomb and then continue, in a loop. | ||
519 | + // NB: wcsnrtombs is a GNU extension | ||
520 | + for (__from_next = __from, __to_next = __to; | ||
521 | + __from_next < __from_end && __to_next < __to_end | ||
522 | + && __ret == ok;) | ||
523 | + { | ||
524 | + const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', | ||
525 | + __from_end - __from_next); | ||
526 | + if (!__from_chunk_end) | ||
527 | + __from_chunk_end = __from_end; | ||
528 | + | ||
529 | + __from = __from_next; | ||
530 | + const size_t __conv = wcsnrtombs(__to_next, &__from_next, | ||
531 | + __from_chunk_end - __from_next, | ||
532 | + __to_end - __to_next, &__state); | ||
533 | + if (__conv == static_cast<size_t>(-1)) | ||
534 | + { | ||
535 | + // In case of error, in order to stop at the exact place we | ||
536 | + // have to start again from the beginning with a series of | ||
537 | + // wcrtomb. | ||
538 | + for (; __from < __from_next; ++__from) | ||
539 | + __to_next += wcrtomb(__to_next, *__from, &__tmp_state); | ||
540 | + __state = __tmp_state; | ||
541 | + __ret = error; | ||
542 | + } | ||
543 | + else if (__from_next && __from_next < __from_chunk_end) | ||
544 | + { | ||
545 | + __to_next += __conv; | ||
546 | + __ret = partial; | ||
547 | + } | ||
548 | + else | ||
549 | + { | ||
550 | + __from_next = __from_chunk_end; | ||
551 | + __to_next += __conv; | ||
552 | + } | ||
553 | + | ||
554 | + if (__from_next < __from_end && __ret == ok) | ||
555 | + { | ||
556 | + extern_type __buf[MB_LEN_MAX]; | ||
557 | + __tmp_state = __state; | ||
558 | + const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); | ||
559 | + if (__conv > static_cast<size_t>(__to_end - __to_next)) | ||
560 | + __ret = partial; | ||
561 | + else | ||
562 | + { | ||
563 | + memcpy(__to_next, __buf, __conv); | ||
564 | + __state = __tmp_state; | ||
565 | + __to_next += __conv; | ||
566 | + ++__from_next; | ||
567 | + } | ||
568 | + } | ||
569 | + } | ||
570 | + | ||
571 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
572 | + __uselocale(__old); | ||
573 | +#endif | ||
574 | + | ||
575 | + return __ret; | ||
576 | + } | ||
577 | + | ||
578 | + codecvt_base::result | ||
579 | + codecvt<wchar_t, char, mbstate_t>:: | ||
580 | + do_in(state_type& __state, const extern_type* __from, | ||
581 | + const extern_type* __from_end, const extern_type*& __from_next, | ||
582 | + intern_type* __to, intern_type* __to_end, | ||
583 | + intern_type*& __to_next) const | ||
584 | + { | ||
585 | + result __ret = ok; | ||
586 | + state_type __tmp_state(__state); | ||
587 | + | ||
588 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
589 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
590 | +#endif | ||
591 | + | ||
592 | + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: | ||
593 | + // in case we store a L'\0' and then continue, in a loop. | ||
594 | + // NB: mbsnrtowcs is a GNU extension | ||
595 | + for (__from_next = __from, __to_next = __to; | ||
596 | + __from_next < __from_end && __to_next < __to_end | ||
597 | + && __ret == ok;) | ||
598 | + { | ||
599 | + const extern_type* __from_chunk_end; | ||
600 | + __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0', | ||
601 | + __from_end | ||
602 | + - __from_next)); | ||
603 | + if (!__from_chunk_end) | ||
604 | + __from_chunk_end = __from_end; | ||
605 | + | ||
606 | + __from = __from_next; | ||
607 | + size_t __conv = mbsnrtowcs(__to_next, &__from_next, | ||
608 | + __from_chunk_end - __from_next, | ||
609 | + __to_end - __to_next, &__state); | ||
610 | + if (__conv == static_cast<size_t>(-1)) | ||
611 | + { | ||
612 | + // In case of error, in order to stop at the exact place we | ||
613 | + // have to start again from the beginning with a series of | ||
614 | + // mbrtowc. | ||
615 | + for (;; ++__to_next, __from += __conv) | ||
616 | + { | ||
617 | + __conv = mbrtowc(__to_next, __from, __from_end - __from, | ||
618 | + &__tmp_state); | ||
619 | + if (__conv == static_cast<size_t>(-1) | ||
620 | + || __conv == static_cast<size_t>(-2)) | ||
621 | + break; | ||
622 | + } | ||
623 | + __from_next = __from; | ||
624 | + __state = __tmp_state; | ||
625 | + __ret = error; | ||
626 | + } | ||
627 | + else if (__from_next && __from_next < __from_chunk_end) | ||
628 | + { | ||
629 | + // It is unclear what to return in this case (see DR 382). | ||
630 | + __to_next += __conv; | ||
631 | + __ret = partial; | ||
632 | + } | ||
633 | + else | ||
634 | + { | ||
635 | + __from_next = __from_chunk_end; | ||
636 | + __to_next += __conv; | ||
637 | + } | ||
638 | + | ||
639 | + if (__from_next < __from_end && __ret == ok) | ||
640 | + { | ||
641 | + if (__to_next < __to_end) | ||
642 | + { | ||
643 | + // XXX Probably wrong for stateful encodings | ||
644 | + __tmp_state = __state; | ||
645 | + ++__from_next; | ||
646 | + *__to_next++ = L'\0'; | ||
647 | + } | ||
648 | + else | ||
649 | + __ret = partial; | ||
650 | + } | ||
651 | + } | ||
652 | + | ||
653 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
654 | + __uselocale(__old); | ||
655 | +#endif | ||
656 | + | ||
657 | + return __ret; | ||
658 | + } | ||
659 | + | ||
660 | + int | ||
661 | + codecvt<wchar_t, char, mbstate_t>:: | ||
662 | + do_encoding() const throw() | ||
663 | + { | ||
664 | + // XXX This implementation assumes that the encoding is | ||
665 | + // stateless and is either single-byte or variable-width. | ||
666 | + int __ret = 0; | ||
667 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
668 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
669 | +#endif | ||
670 | + if (MB_CUR_MAX == 1) | ||
671 | + __ret = 1; | ||
672 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
673 | + __uselocale(__old); | ||
674 | +#endif | ||
675 | + return __ret; | ||
676 | + } | ||
677 | + | ||
678 | + int | ||
679 | + codecvt<wchar_t, char, mbstate_t>:: | ||
680 | + do_max_length() const throw() | ||
681 | + { | ||
682 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
683 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
684 | +#endif | ||
685 | + // XXX Probably wrong for stateful encodings. | ||
686 | + int __ret = MB_CUR_MAX; | ||
687 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
688 | + __uselocale(__old); | ||
689 | +#endif | ||
690 | + return __ret; | ||
691 | + } | ||
692 | + | ||
693 | + int | ||
694 | + codecvt<wchar_t, char, mbstate_t>:: | ||
695 | + do_length(state_type& __state, const extern_type* __from, | ||
696 | + const extern_type* __end, size_t __max) const | ||
697 | + { | ||
698 | + int __ret = 0; | ||
699 | + state_type __tmp_state(__state); | ||
700 | + | ||
701 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
702 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
703 | +#endif | ||
704 | + | ||
705 | + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: | ||
706 | + // in case we advance past it and then continue, in a loop. | ||
707 | + // NB: mbsnrtowcs is a GNU extension | ||
708 | + | ||
709 | + // A dummy internal buffer is needed in order for mbsnrtocws to consider | ||
710 | + // its fourth parameter (it wouldn't with NULL as first parameter). | ||
711 | + wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) | ||
712 | + * __max)); | ||
713 | + while (__from < __end && __max) | ||
714 | + { | ||
715 | + const extern_type* __from_chunk_end; | ||
716 | + __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0', | ||
717 | + __end | ||
718 | + - __from)); | ||
719 | + if (!__from_chunk_end) | ||
720 | + __from_chunk_end = __end; | ||
721 | + | ||
722 | + const extern_type* __tmp_from = __from; | ||
723 | + size_t __conv = mbsnrtowcs(__to, &__from, | ||
724 | + __from_chunk_end - __from, | ||
725 | + __max, &__state); | ||
726 | + if (__conv == static_cast<size_t>(-1)) | ||
727 | + { | ||
728 | + // In case of error, in order to stop at the exact place we | ||
729 | + // have to start again from the beginning with a series of | ||
730 | + // mbrtowc. | ||
731 | + for (__from = __tmp_from;; __from += __conv) | ||
732 | + { | ||
733 | + __conv = mbrtowc(NULL, __from, __end - __from, | ||
734 | + &__tmp_state); | ||
735 | + if (__conv == static_cast<size_t>(-1) | ||
736 | + || __conv == static_cast<size_t>(-2)) | ||
737 | + break; | ||
738 | + } | ||
739 | + __state = __tmp_state; | ||
740 | + __ret += __from - __tmp_from; | ||
741 | + break; | ||
742 | + } | ||
743 | + if (!__from) | ||
744 | + __from = __from_chunk_end; | ||
745 | + | ||
746 | + __ret += __from - __tmp_from; | ||
747 | + __max -= __conv; | ||
748 | + | ||
749 | + if (__from < __end && __max) | ||
750 | + { | ||
751 | + // XXX Probably wrong for stateful encodings | ||
752 | + __tmp_state = __state; | ||
753 | + ++__from; | ||
754 | + ++__ret; | ||
755 | + --__max; | ||
756 | + } | ||
757 | + } | ||
758 | + | ||
759 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
760 | + __uselocale(__old); | ||
761 | +#endif | ||
762 | + | ||
763 | + return __ret; | ||
764 | + } | ||
765 | +#endif | ||
766 | +} | ||
767 | diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
768 | new file mode 100644 | ||
769 | index 0000000..c2664a7 | ||
770 | --- /dev/null | ||
771 | +++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
772 | @@ -0,0 +1,80 @@ | ||
773 | +// std::collate implementation details, GNU version -*- C++ -*- | ||
774 | + | ||
775 | +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. | ||
776 | +// | ||
777 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
778 | +// software; you can redistribute it and/or modify it under the | ||
779 | +// terms of the GNU General Public License as published by the | ||
780 | +// Free Software Foundation; either version 2, or (at your option) | ||
781 | +// any later version. | ||
782 | + | ||
783 | +// This library is distributed in the hope that it will be useful, | ||
784 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
785 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
786 | +// GNU General Public License for more details. | ||
787 | + | ||
788 | +// You should have received a copy of the GNU General Public License along | ||
789 | +// with this library; see the file COPYING. If not, write to the Free | ||
790 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
791 | +// USA. | ||
792 | + | ||
793 | +// As a special exception, you may use this file as part of a free software | ||
794 | +// library without restriction. Specifically, if other files instantiate | ||
795 | +// templates or use macros or inline functions from this file, or you compile | ||
796 | +// this file and link it with other files to produce an executable, this | ||
797 | +// file does not by itself cause the resulting executable to be covered by | ||
798 | +// the GNU General Public License. This exception does not however | ||
799 | +// invalidate any other reasons why the executable file might be covered by | ||
800 | +// the GNU General Public License. | ||
801 | + | ||
802 | +// | ||
803 | +// ISO C++ 14882: 22.2.4.1.2 collate virtual functions | ||
804 | +// | ||
805 | + | ||
806 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
807 | + | ||
808 | +#include <locale> | ||
809 | +#include <bits/c++locale_internal.h> | ||
810 | + | ||
811 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
812 | +#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
813 | +#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
814 | +#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
815 | +#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
816 | +#endif | ||
817 | + | ||
818 | +namespace std | ||
819 | +{ | ||
820 | + // These are basically extensions to char_traits, and perhaps should | ||
821 | + // be put there instead of here. | ||
822 | + template<> | ||
823 | + int | ||
824 | + collate<char>::_M_compare(const char* __one, const char* __two) const | ||
825 | + { | ||
826 | + int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); | ||
827 | + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); | ||
828 | + } | ||
829 | + | ||
830 | + template<> | ||
831 | + size_t | ||
832 | + collate<char>::_M_transform(char* __to, const char* __from, | ||
833 | + size_t __n) const | ||
834 | + { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } | ||
835 | + | ||
836 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
837 | + template<> | ||
838 | + int | ||
839 | + collate<wchar_t>::_M_compare(const wchar_t* __one, | ||
840 | + const wchar_t* __two) const | ||
841 | + { | ||
842 | + int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); | ||
843 | + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); | ||
844 | + } | ||
845 | + | ||
846 | + template<> | ||
847 | + size_t | ||
848 | + collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, | ||
849 | + size_t __n) const | ||
850 | + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } | ||
851 | +#endif | ||
852 | +} | ||
853 | diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
854 | new file mode 100644 | ||
855 | index 0000000..7294e3a | ||
856 | --- /dev/null | ||
857 | +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
858 | @@ -0,0 +1,300 @@ | ||
859 | +// std::ctype implementation details, GNU version -*- C++ -*- | ||
860 | + | ||
861 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
862 | +// | ||
863 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
864 | +// software; you can redistribute it and/or modify it under the | ||
865 | +// terms of the GNU General Public License as published by the | ||
866 | +// Free Software Foundation; either version 2, or (at your option) | ||
867 | +// any later version. | ||
868 | + | ||
869 | +// This library is distributed in the hope that it will be useful, | ||
870 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
871 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
872 | +// GNU General Public License for more details. | ||
873 | + | ||
874 | +// You should have received a copy of the GNU General Public License along | ||
875 | +// with this library; see the file COPYING. If not, write to the Free | ||
876 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
877 | +// USA. | ||
878 | + | ||
879 | +// As a special exception, you may use this file as part of a free software | ||
880 | +// library without restriction. Specifically, if other files instantiate | ||
881 | +// templates or use macros or inline functions from this file, or you compile | ||
882 | +// this file and link it with other files to produce an executable, this | ||
883 | +// file does not by itself cause the resulting executable to be covered by | ||
884 | +// the GNU General Public License. This exception does not however | ||
885 | +// invalidate any other reasons why the executable file might be covered by | ||
886 | +// the GNU General Public License. | ||
887 | + | ||
888 | +// | ||
889 | +// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. | ||
890 | +// | ||
891 | + | ||
892 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
893 | + | ||
894 | +#define _LIBC | ||
895 | +#include <locale> | ||
896 | +#undef _LIBC | ||
897 | +#include <bits/c++locale_internal.h> | ||
898 | + | ||
899 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
900 | +#define __wctype_l(S, L) wctype((S)) | ||
901 | +#define __towupper_l(C, L) towupper((C)) | ||
902 | +#define __towlower_l(C, L) towlower((C)) | ||
903 | +#define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
904 | +#endif | ||
905 | + | ||
906 | +namespace std | ||
907 | +{ | ||
908 | + // NB: The other ctype<char> specializations are in src/locale.cc and | ||
909 | + // various /config/os/* files. | ||
910 | + template<> | ||
911 | + ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) | ||
912 | + : ctype<char>(0, false, __refs) | ||
913 | + { | ||
914 | + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | ||
915 | + { | ||
916 | + this->_S_destroy_c_locale(this->_M_c_locale_ctype); | ||
917 | + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); | ||
918 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
919 | + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; | ||
920 | + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; | ||
921 | + this->_M_table = this->_M_c_locale_ctype->__ctype_b; | ||
922 | +#endif | ||
923 | + } | ||
924 | + } | ||
925 | + | ||
926 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
927 | + ctype<wchar_t>::__wmask_type | ||
928 | + ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const | ||
929 | + { | ||
930 | + __wmask_type __ret; | ||
931 | + switch (__m) | ||
932 | + { | ||
933 | + case space: | ||
934 | + __ret = __wctype_l("space", _M_c_locale_ctype); | ||
935 | + break; | ||
936 | + case print: | ||
937 | + __ret = __wctype_l("print", _M_c_locale_ctype); | ||
938 | + break; | ||
939 | + case cntrl: | ||
940 | + __ret = __wctype_l("cntrl", _M_c_locale_ctype); | ||
941 | + break; | ||
942 | + case upper: | ||
943 | + __ret = __wctype_l("upper", _M_c_locale_ctype); | ||
944 | + break; | ||
945 | + case lower: | ||
946 | + __ret = __wctype_l("lower", _M_c_locale_ctype); | ||
947 | + break; | ||
948 | + case alpha: | ||
949 | + __ret = __wctype_l("alpha", _M_c_locale_ctype); | ||
950 | + break; | ||
951 | + case digit: | ||
952 | + __ret = __wctype_l("digit", _M_c_locale_ctype); | ||
953 | + break; | ||
954 | + case punct: | ||
955 | + __ret = __wctype_l("punct", _M_c_locale_ctype); | ||
956 | + break; | ||
957 | + case xdigit: | ||
958 | + __ret = __wctype_l("xdigit", _M_c_locale_ctype); | ||
959 | + break; | ||
960 | + case alnum: | ||
961 | + __ret = __wctype_l("alnum", _M_c_locale_ctype); | ||
962 | + break; | ||
963 | + case graph: | ||
964 | + __ret = __wctype_l("graph", _M_c_locale_ctype); | ||
965 | + break; | ||
966 | + default: | ||
967 | + __ret = __wmask_type(); | ||
968 | + } | ||
969 | + return __ret; | ||
970 | + } | ||
971 | + | ||
972 | + wchar_t | ||
973 | + ctype<wchar_t>::do_toupper(wchar_t __c) const | ||
974 | + { return __towupper_l(__c, _M_c_locale_ctype); } | ||
975 | + | ||
976 | + const wchar_t* | ||
977 | + ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const | ||
978 | + { | ||
979 | + while (__lo < __hi) | ||
980 | + { | ||
981 | + *__lo = __towupper_l(*__lo, _M_c_locale_ctype); | ||
982 | + ++__lo; | ||
983 | + } | ||
984 | + return __hi; | ||
985 | + } | ||
986 | + | ||
987 | + wchar_t | ||
988 | + ctype<wchar_t>::do_tolower(wchar_t __c) const | ||
989 | + { return __towlower_l(__c, _M_c_locale_ctype); } | ||
990 | + | ||
991 | + const wchar_t* | ||
992 | + ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const | ||
993 | + { | ||
994 | + while (__lo < __hi) | ||
995 | + { | ||
996 | + *__lo = __towlower_l(*__lo, _M_c_locale_ctype); | ||
997 | + ++__lo; | ||
998 | + } | ||
999 | + return __hi; | ||
1000 | + } | ||
1001 | + | ||
1002 | + bool | ||
1003 | + ctype<wchar_t>:: | ||
1004 | + do_is(mask __m, wchar_t __c) const | ||
1005 | + { | ||
1006 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
1007 | + // library for blank. | ||
1008 | + bool __ret = false; | ||
1009 | + const size_t __bitmasksize = 11; | ||
1010 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
1011 | + if (__m & _M_bit[__bitcur] | ||
1012 | + && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
1013 | + { | ||
1014 | + __ret = true; | ||
1015 | + break; | ||
1016 | + } | ||
1017 | + return __ret; | ||
1018 | + } | ||
1019 | + | ||
1020 | + const wchar_t* | ||
1021 | + ctype<wchar_t>:: | ||
1022 | + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const | ||
1023 | + { | ||
1024 | + for (; __lo < __hi; ++__vec, ++__lo) | ||
1025 | + { | ||
1026 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
1027 | + // library for blank. | ||
1028 | + const size_t __bitmasksize = 11; | ||
1029 | + mask __m = 0; | ||
1030 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
1031 | + if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
1032 | + __m |= _M_bit[__bitcur]; | ||
1033 | + *__vec = __m; | ||
1034 | + } | ||
1035 | + return __hi; | ||
1036 | + } | ||
1037 | + | ||
1038 | + const wchar_t* | ||
1039 | + ctype<wchar_t>:: | ||
1040 | + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const | ||
1041 | + { | ||
1042 | + while (__lo < __hi && !this->do_is(__m, *__lo)) | ||
1043 | + ++__lo; | ||
1044 | + return __lo; | ||
1045 | + } | ||
1046 | + | ||
1047 | + const wchar_t* | ||
1048 | + ctype<wchar_t>:: | ||
1049 | + do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const | ||
1050 | + { | ||
1051 | + while (__lo < __hi && this->do_is(__m, *__lo) != 0) | ||
1052 | + ++__lo; | ||
1053 | + return __lo; | ||
1054 | + } | ||
1055 | + | ||
1056 | + wchar_t | ||
1057 | + ctype<wchar_t>:: | ||
1058 | + do_widen(char __c) const | ||
1059 | + { return _M_widen[static_cast<unsigned char>(__c)]; } | ||
1060 | + | ||
1061 | + const char* | ||
1062 | + ctype<wchar_t>:: | ||
1063 | + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const | ||
1064 | + { | ||
1065 | + while (__lo < __hi) | ||
1066 | + { | ||
1067 | + *__dest = _M_widen[static_cast<unsigned char>(*__lo)]; | ||
1068 | + ++__lo; | ||
1069 | + ++__dest; | ||
1070 | + } | ||
1071 | + return __hi; | ||
1072 | + } | ||
1073 | + | ||
1074 | + char | ||
1075 | + ctype<wchar_t>:: | ||
1076 | + do_narrow(wchar_t __wc, char __dfault) const | ||
1077 | + { | ||
1078 | + if (__wc >= 0 && __wc < 128 && _M_narrow_ok) | ||
1079 | + return _M_narrow[__wc]; | ||
1080 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1081 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1082 | +#endif | ||
1083 | + const int __c = wctob(__wc); | ||
1084 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1085 | + __uselocale(__old); | ||
1086 | +#endif | ||
1087 | + return (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1088 | + } | ||
1089 | + | ||
1090 | + const wchar_t* | ||
1091 | + ctype<wchar_t>:: | ||
1092 | + do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, | ||
1093 | + char* __dest) const | ||
1094 | + { | ||
1095 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1096 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1097 | +#endif | ||
1098 | + if (_M_narrow_ok) | ||
1099 | + while (__lo < __hi) | ||
1100 | + { | ||
1101 | + if (*__lo >= 0 && *__lo < 128) | ||
1102 | + *__dest = _M_narrow[*__lo]; | ||
1103 | + else | ||
1104 | + { | ||
1105 | + const int __c = wctob(*__lo); | ||
1106 | + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1107 | + } | ||
1108 | + ++__lo; | ||
1109 | + ++__dest; | ||
1110 | + } | ||
1111 | + else | ||
1112 | + while (__lo < __hi) | ||
1113 | + { | ||
1114 | + const int __c = wctob(*__lo); | ||
1115 | + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1116 | + ++__lo; | ||
1117 | + ++__dest; | ||
1118 | + } | ||
1119 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1120 | + __uselocale(__old); | ||
1121 | +#endif | ||
1122 | + return __hi; | ||
1123 | + } | ||
1124 | + | ||
1125 | + void | ||
1126 | + ctype<wchar_t>::_M_initialize_ctype() | ||
1127 | + { | ||
1128 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1129 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1130 | +#endif | ||
1131 | + wint_t __i; | ||
1132 | + for (__i = 0; __i < 128; ++__i) | ||
1133 | + { | ||
1134 | + const int __c = wctob(__i); | ||
1135 | + if (__c == EOF) | ||
1136 | + break; | ||
1137 | + else | ||
1138 | + _M_narrow[__i] = static_cast<char>(__c); | ||
1139 | + } | ||
1140 | + if (__i == 128) | ||
1141 | + _M_narrow_ok = true; | ||
1142 | + else | ||
1143 | + _M_narrow_ok = false; | ||
1144 | + for (size_t __j = 0; | ||
1145 | + __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) | ||
1146 | + _M_widen[__j] = btowc(__j); | ||
1147 | + | ||
1148 | + for (size_t __k = 0; __k <= 11; ++__k) | ||
1149 | + { | ||
1150 | + _M_bit[__k] = static_cast<mask>(_ISbit(__k)); | ||
1151 | + _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); | ||
1152 | + } | ||
1153 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1154 | + __uselocale(__old); | ||
1155 | +#endif | ||
1156 | + } | ||
1157 | +#endif // _GLIBCXX_USE_WCHAR_T | ||
1158 | +} | ||
1159 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
1160 | new file mode 100644 | ||
1161 | index 0000000..13594d9 | ||
1162 | --- /dev/null | ||
1163 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
1164 | @@ -0,0 +1,100 @@ | ||
1165 | +// std::messages implementation details, GNU version -*- C++ -*- | ||
1166 | + | ||
1167 | +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. | ||
1168 | +// | ||
1169 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1170 | +// software; you can redistribute it and/or modify it under the | ||
1171 | +// terms of the GNU General Public License as published by the | ||
1172 | +// Free Software Foundation; either version 2, or (at your option) | ||
1173 | +// any later version. | ||
1174 | + | ||
1175 | +// This library is distributed in the hope that it will be useful, | ||
1176 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1177 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1178 | +// GNU General Public License for more details. | ||
1179 | + | ||
1180 | +// You should have received a copy of the GNU General Public License along | ||
1181 | +// with this library; see the file COPYING. If not, write to the Free | ||
1182 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
1183 | +// USA. | ||
1184 | + | ||
1185 | +// As a special exception, you may use this file as part of a free software | ||
1186 | +// library without restriction. Specifically, if other files instantiate | ||
1187 | +// templates or use macros or inline functions from this file, or you compile | ||
1188 | +// this file and link it with other files to produce an executable, this | ||
1189 | +// file does not by itself cause the resulting executable to be covered by | ||
1190 | +// the GNU General Public License. This exception does not however | ||
1191 | +// invalidate any other reasons why the executable file might be covered by | ||
1192 | +// the GNU General Public License. | ||
1193 | + | ||
1194 | +// | ||
1195 | +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions | ||
1196 | +// | ||
1197 | + | ||
1198 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1199 | + | ||
1200 | +#include <locale> | ||
1201 | +#include <bits/c++locale_internal.h> | ||
1202 | + | ||
1203 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1204 | +#warning fix gettext stuff | ||
1205 | +#endif | ||
1206 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
1207 | +extern "C" char *__dcgettext(const char *domainname, | ||
1208 | + const char *msgid, int category); | ||
1209 | +#undef gettext | ||
1210 | +#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) | ||
1211 | +#else | ||
1212 | +#undef gettext | ||
1213 | +#define gettext(msgid) (msgid) | ||
1214 | +#endif | ||
1215 | + | ||
1216 | +namespace std | ||
1217 | +{ | ||
1218 | + // Specializations. | ||
1219 | + template<> | ||
1220 | + string | ||
1221 | + messages<char>::do_get(catalog, int, int, const string& __dfault) const | ||
1222 | + { | ||
1223 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1224 | + __c_locale __old = __uselocale(_M_c_locale_messages); | ||
1225 | + const char* __msg = const_cast<const char*>(gettext(__dfault.c_str())); | ||
1226 | + __uselocale(__old); | ||
1227 | + return string(__msg); | ||
1228 | +#elif defined __UCLIBC_HAS_LOCALE__ | ||
1229 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1230 | + setlocale(LC_ALL, _M_name_messages); | ||
1231 | + const char* __msg = gettext(__dfault.c_str()); | ||
1232 | + setlocale(LC_ALL, __old); | ||
1233 | + free(__old); | ||
1234 | + return string(__msg); | ||
1235 | +#else | ||
1236 | + const char* __msg = gettext(__dfault.c_str()); | ||
1237 | + return string(__msg); | ||
1238 | +#endif | ||
1239 | + } | ||
1240 | + | ||
1241 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
1242 | + template<> | ||
1243 | + wstring | ||
1244 | + messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const | ||
1245 | + { | ||
1246 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1247 | + __c_locale __old = __uselocale(_M_c_locale_messages); | ||
1248 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1249 | + __uselocale(__old); | ||
1250 | + return _M_convert_from_char(__msg); | ||
1251 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
1252 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1253 | + setlocale(LC_ALL, _M_name_messages); | ||
1254 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1255 | + setlocale(LC_ALL, __old); | ||
1256 | + free(__old); | ||
1257 | + return _M_convert_from_char(__msg); | ||
1258 | +# else | ||
1259 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1260 | + return _M_convert_from_char(__msg); | ||
1261 | +# endif | ||
1262 | + } | ||
1263 | +#endif | ||
1264 | +} | ||
1265 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
1266 | new file mode 100644 | ||
1267 | index 0000000..1424078 | ||
1268 | --- /dev/null | ||
1269 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
1270 | @@ -0,0 +1,118 @@ | ||
1271 | +// std::messages implementation details, GNU version -*- C++ -*- | ||
1272 | + | ||
1273 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
1274 | +// | ||
1275 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1276 | +// software; you can redistribute it and/or modify it under the | ||
1277 | +// terms of the GNU General Public License as published by the | ||
1278 | +// Free Software Foundation; either version 2, or (at your option) | ||
1279 | +// any later version. | ||
1280 | + | ||
1281 | +// This library is distributed in the hope that it will be useful, | ||
1282 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1283 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1284 | +// GNU General Public License for more details. | ||
1285 | + | ||
1286 | +// You should have received a copy of the GNU General Public License along | ||
1287 | +// with this library; see the file COPYING. If not, write to the Free | ||
1288 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
1289 | +// USA. | ||
1290 | + | ||
1291 | +// As a special exception, you may use this file as part of a free software | ||
1292 | +// library without restriction. Specifically, if other files instantiate | ||
1293 | +// templates or use macros or inline functions from this file, or you compile | ||
1294 | +// this file and link it with other files to produce an executable, this | ||
1295 | +// file does not by itself cause the resulting executable to be covered by | ||
1296 | +// the GNU General Public License. This exception does not however | ||
1297 | +// invalidate any other reasons why the executable file might be covered by | ||
1298 | +// the GNU General Public License. | ||
1299 | + | ||
1300 | +// | ||
1301 | +// ISO C++ 14882: 22.2.7.1.2 messages functions | ||
1302 | +// | ||
1303 | + | ||
1304 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1305 | + | ||
1306 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1307 | +#warning fix prototypes for *textdomain funcs | ||
1308 | +#endif | ||
1309 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
1310 | +extern "C" char *__textdomain(const char *domainname); | ||
1311 | +extern "C" char *__bindtextdomain(const char *domainname, | ||
1312 | + const char *dirname); | ||
1313 | +#else | ||
1314 | +#undef __textdomain | ||
1315 | +#undef __bindtextdomain | ||
1316 | +#define __textdomain(D) ((void)0) | ||
1317 | +#define __bindtextdomain(D,P) ((void)0) | ||
1318 | +#endif | ||
1319 | + | ||
1320 | + // Non-virtual member functions. | ||
1321 | + template<typename _CharT> | ||
1322 | + messages<_CharT>::messages(size_t __refs) | ||
1323 | + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), | ||
1324 | + _M_name_messages(_S_get_c_name()) | ||
1325 | + { } | ||
1326 | + | ||
1327 | + template<typename _CharT> | ||
1328 | + messages<_CharT>::messages(__c_locale __cloc, const char* __s, | ||
1329 | + size_t __refs) | ||
1330 | + : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), | ||
1331 | + _M_name_messages(__s) | ||
1332 | + { | ||
1333 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
1334 | + std::strcpy(__tmp, __s); | ||
1335 | + _M_name_messages = __tmp; | ||
1336 | + } | ||
1337 | + | ||
1338 | + template<typename _CharT> | ||
1339 | + typename messages<_CharT>::catalog | ||
1340 | + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | ||
1341 | + const char* __dir) const | ||
1342 | + { | ||
1343 | + __bindtextdomain(__s.c_str(), __dir); | ||
1344 | + return this->do_open(__s, __loc); | ||
1345 | + } | ||
1346 | + | ||
1347 | + // Virtual member functions. | ||
1348 | + template<typename _CharT> | ||
1349 | + messages<_CharT>::~messages() | ||
1350 | + { | ||
1351 | + if (_M_name_messages != _S_get_c_name()) | ||
1352 | + delete [] _M_name_messages; | ||
1353 | + _S_destroy_c_locale(_M_c_locale_messages); | ||
1354 | + } | ||
1355 | + | ||
1356 | + template<typename _CharT> | ||
1357 | + typename messages<_CharT>::catalog | ||
1358 | + messages<_CharT>::do_open(const basic_string<char>& __s, | ||
1359 | + const locale&) const | ||
1360 | + { | ||
1361 | + // No error checking is done, assume the catalog exists and can | ||
1362 | + // be used. | ||
1363 | + __textdomain(__s.c_str()); | ||
1364 | + return 0; | ||
1365 | + } | ||
1366 | + | ||
1367 | + template<typename _CharT> | ||
1368 | + void | ||
1369 | + messages<_CharT>::do_close(catalog) const | ||
1370 | + { } | ||
1371 | + | ||
1372 | + // messages_byname | ||
1373 | + template<typename _CharT> | ||
1374 | + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) | ||
1375 | + : messages<_CharT>(__refs) | ||
1376 | + { | ||
1377 | + if (this->_M_name_messages != locale::facet::_S_get_c_name()) | ||
1378 | + delete [] this->_M_name_messages; | ||
1379 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
1380 | + std::strcpy(__tmp, __s); | ||
1381 | + this->_M_name_messages = __tmp; | ||
1382 | + | ||
1383 | + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | ||
1384 | + { | ||
1385 | + this->_S_destroy_c_locale(this->_M_c_locale_messages); | ||
1386 | + this->_S_create_c_locale(this->_M_c_locale_messages, __s); | ||
1387 | + } | ||
1388 | + } | ||
1389 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
1390 | new file mode 100644 | ||
1391 | index 0000000..aa52731 | ||
1392 | --- /dev/null | ||
1393 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
1394 | @@ -0,0 +1,692 @@ | ||
1395 | +// std::moneypunct implementation details, GNU version -*- C++ -*- | ||
1396 | + | ||
1397 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
1398 | +// | ||
1399 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1400 | +// software; you can redistribute it and/or modify it under the | ||
1401 | +// terms of the GNU General Public License as published by the | ||
1402 | +// Free Software Foundation; either version 2, or (at your option) | ||
1403 | +// any later version. | ||
1404 | + | ||
1405 | +// This library is distributed in the hope that it will be useful, | ||
1406 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1407 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1408 | +// GNU General Public License for more details. | ||
1409 | + | ||
1410 | +// You should have received a copy of the GNU General Public License along | ||
1411 | +// with this library; see the file COPYING. If not, write to the Free | ||
1412 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
1413 | +// USA. | ||
1414 | + | ||
1415 | +// As a special exception, you may use this file as part of a free software | ||
1416 | +// library without restriction. Specifically, if other files instantiate | ||
1417 | +// templates or use macros or inline functions from this file, or you compile | ||
1418 | +// this file and link it with other files to produce an executable, this | ||
1419 | +// file does not by itself cause the resulting executable to be covered by | ||
1420 | +// the GNU General Public License. This exception does not however | ||
1421 | +// invalidate any other reasons why the executable file might be covered by | ||
1422 | +// the GNU General Public License. | ||
1423 | + | ||
1424 | +// | ||
1425 | +// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions | ||
1426 | +// | ||
1427 | + | ||
1428 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1429 | + | ||
1430 | +#define _LIBC | ||
1431 | +#include <locale> | ||
1432 | +#undef _LIBC | ||
1433 | +#include <bits/c++locale_internal.h> | ||
1434 | + | ||
1435 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1436 | +#warning optimize this for uclibc | ||
1437 | +#warning tailor for stub locale support | ||
1438 | +#endif | ||
1439 | + | ||
1440 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
1441 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
1442 | +#endif | ||
1443 | + | ||
1444 | +namespace std | ||
1445 | +{ | ||
1446 | + // Construct and return valid pattern consisting of some combination of: | ||
1447 | + // space none symbol sign value | ||
1448 | + money_base::pattern | ||
1449 | + money_base::_S_construct_pattern(char __precedes, char __space, char __posn) | ||
1450 | + { | ||
1451 | + pattern __ret; | ||
1452 | + | ||
1453 | + // This insanely complicated routine attempts to construct a valid | ||
1454 | + // pattern for use with monyepunct. A couple of invariants: | ||
1455 | + | ||
1456 | + // if (__precedes) symbol -> value | ||
1457 | + // else value -> symbol | ||
1458 | + | ||
1459 | + // if (__space) space | ||
1460 | + // else none | ||
1461 | + | ||
1462 | + // none == never first | ||
1463 | + // space never first or last | ||
1464 | + | ||
1465 | + // Any elegant implementations of this are welcome. | ||
1466 | + switch (__posn) | ||
1467 | + { | ||
1468 | + case 0: | ||
1469 | + case 1: | ||
1470 | + // 1 The sign precedes the value and symbol. | ||
1471 | + __ret.field[0] = sign; | ||
1472 | + if (__space) | ||
1473 | + { | ||
1474 | + // Pattern starts with sign. | ||
1475 | + if (__precedes) | ||
1476 | + { | ||
1477 | + __ret.field[1] = symbol; | ||
1478 | + __ret.field[3] = value; | ||
1479 | + } | ||
1480 | + else | ||
1481 | + { | ||
1482 | + __ret.field[1] = value; | ||
1483 | + __ret.field[3] = symbol; | ||
1484 | + } | ||
1485 | + __ret.field[2] = space; | ||
1486 | + } | ||
1487 | + else | ||
1488 | + { | ||
1489 | + // Pattern starts with sign and ends with none. | ||
1490 | + if (__precedes) | ||
1491 | + { | ||
1492 | + __ret.field[1] = symbol; | ||
1493 | + __ret.field[2] = value; | ||
1494 | + } | ||
1495 | + else | ||
1496 | + { | ||
1497 | + __ret.field[1] = value; | ||
1498 | + __ret.field[2] = symbol; | ||
1499 | + } | ||
1500 | + __ret.field[3] = none; | ||
1501 | + } | ||
1502 | + break; | ||
1503 | + case 2: | ||
1504 | + // 2 The sign follows the value and symbol. | ||
1505 | + if (__space) | ||
1506 | + { | ||
1507 | + // Pattern either ends with sign. | ||
1508 | + if (__precedes) | ||
1509 | + { | ||
1510 | + __ret.field[0] = symbol; | ||
1511 | + __ret.field[2] = value; | ||
1512 | + } | ||
1513 | + else | ||
1514 | + { | ||
1515 | + __ret.field[0] = value; | ||
1516 | + __ret.field[2] = symbol; | ||
1517 | + } | ||
1518 | + __ret.field[1] = space; | ||
1519 | + __ret.field[3] = sign; | ||
1520 | + } | ||
1521 | + else | ||
1522 | + { | ||
1523 | + // Pattern ends with sign then none. | ||
1524 | + if (__precedes) | ||
1525 | + { | ||
1526 | + __ret.field[0] = symbol; | ||
1527 | + __ret.field[1] = value; | ||
1528 | + } | ||
1529 | + else | ||
1530 | + { | ||
1531 | + __ret.field[0] = value; | ||
1532 | + __ret.field[1] = symbol; | ||
1533 | + } | ||
1534 | + __ret.field[2] = sign; | ||
1535 | + __ret.field[3] = none; | ||
1536 | + } | ||
1537 | + break; | ||
1538 | + case 3: | ||
1539 | + // 3 The sign immediately precedes the symbol. | ||
1540 | + if (__precedes) | ||
1541 | + { | ||
1542 | + __ret.field[0] = sign; | ||
1543 | + __ret.field[1] = symbol; | ||
1544 | + if (__space) | ||
1545 | + { | ||
1546 | + __ret.field[2] = space; | ||
1547 | + __ret.field[3] = value; | ||
1548 | + } | ||
1549 | + else | ||
1550 | + { | ||
1551 | + __ret.field[2] = value; | ||
1552 | + __ret.field[3] = none; | ||
1553 | + } | ||
1554 | + } | ||
1555 | + else | ||
1556 | + { | ||
1557 | + __ret.field[0] = value; | ||
1558 | + if (__space) | ||
1559 | + { | ||
1560 | + __ret.field[1] = space; | ||
1561 | + __ret.field[2] = sign; | ||
1562 | + __ret.field[3] = symbol; | ||
1563 | + } | ||
1564 | + else | ||
1565 | + { | ||
1566 | + __ret.field[1] = sign; | ||
1567 | + __ret.field[2] = symbol; | ||
1568 | + __ret.field[3] = none; | ||
1569 | + } | ||
1570 | + } | ||
1571 | + break; | ||
1572 | + case 4: | ||
1573 | + // 4 The sign immediately follows the symbol. | ||
1574 | + if (__precedes) | ||
1575 | + { | ||
1576 | + __ret.field[0] = symbol; | ||
1577 | + __ret.field[1] = sign; | ||
1578 | + if (__space) | ||
1579 | + { | ||
1580 | + __ret.field[2] = space; | ||
1581 | + __ret.field[3] = value; | ||
1582 | + } | ||
1583 | + else | ||
1584 | + { | ||
1585 | + __ret.field[2] = value; | ||
1586 | + __ret.field[3] = none; | ||
1587 | + } | ||
1588 | + } | ||
1589 | + else | ||
1590 | + { | ||
1591 | + __ret.field[0] = value; | ||
1592 | + if (__space) | ||
1593 | + { | ||
1594 | + __ret.field[1] = space; | ||
1595 | + __ret.field[2] = symbol; | ||
1596 | + __ret.field[3] = sign; | ||
1597 | + } | ||
1598 | + else | ||
1599 | + { | ||
1600 | + __ret.field[1] = symbol; | ||
1601 | + __ret.field[2] = sign; | ||
1602 | + __ret.field[3] = none; | ||
1603 | + } | ||
1604 | + } | ||
1605 | + break; | ||
1606 | + default: | ||
1607 | + ; | ||
1608 | + } | ||
1609 | + return __ret; | ||
1610 | + } | ||
1611 | + | ||
1612 | + template<> | ||
1613 | + void | ||
1614 | + moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1615 | + const char*) | ||
1616 | + { | ||
1617 | + if (!_M_data) | ||
1618 | + _M_data = new __moneypunct_cache<char, true>; | ||
1619 | + | ||
1620 | + if (!__cloc) | ||
1621 | + { | ||
1622 | + // "C" locale | ||
1623 | + _M_data->_M_decimal_point = '.'; | ||
1624 | + _M_data->_M_thousands_sep = ','; | ||
1625 | + _M_data->_M_grouping = ""; | ||
1626 | + _M_data->_M_grouping_size = 0; | ||
1627 | + _M_data->_M_curr_symbol = ""; | ||
1628 | + _M_data->_M_curr_symbol_size = 0; | ||
1629 | + _M_data->_M_positive_sign = ""; | ||
1630 | + _M_data->_M_positive_sign_size = 0; | ||
1631 | + _M_data->_M_negative_sign = ""; | ||
1632 | + _M_data->_M_negative_sign_size = 0; | ||
1633 | + _M_data->_M_frac_digits = 0; | ||
1634 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1635 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1636 | + | ||
1637 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1638 | + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; | ||
1639 | + } | ||
1640 | + else | ||
1641 | + { | ||
1642 | + // Named locale. | ||
1643 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, | ||
1644 | + __cloc)); | ||
1645 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, | ||
1646 | + __cloc)); | ||
1647 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1648 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1649 | + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1650 | + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); | ||
1651 | + | ||
1652 | + char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); | ||
1653 | + if (!__nposn) | ||
1654 | + _M_data->_M_negative_sign = "()"; | ||
1655 | + else | ||
1656 | + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, | ||
1657 | + __cloc); | ||
1658 | + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); | ||
1659 | + | ||
1660 | + // _Intl == true | ||
1661 | + _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); | ||
1662 | + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); | ||
1663 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, | ||
1664 | + __cloc)); | ||
1665 | + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); | ||
1666 | + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); | ||
1667 | + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); | ||
1668 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1669 | + __pposn); | ||
1670 | + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); | ||
1671 | + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); | ||
1672 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1673 | + __nposn); | ||
1674 | + } | ||
1675 | + } | ||
1676 | + | ||
1677 | + template<> | ||
1678 | + void | ||
1679 | + moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1680 | + const char*) | ||
1681 | + { | ||
1682 | + if (!_M_data) | ||
1683 | + _M_data = new __moneypunct_cache<char, false>; | ||
1684 | + | ||
1685 | + if (!__cloc) | ||
1686 | + { | ||
1687 | + // "C" locale | ||
1688 | + _M_data->_M_decimal_point = '.'; | ||
1689 | + _M_data->_M_thousands_sep = ','; | ||
1690 | + _M_data->_M_grouping = ""; | ||
1691 | + _M_data->_M_grouping_size = 0; | ||
1692 | + _M_data->_M_curr_symbol = ""; | ||
1693 | + _M_data->_M_curr_symbol_size = 0; | ||
1694 | + _M_data->_M_positive_sign = ""; | ||
1695 | + _M_data->_M_positive_sign_size = 0; | ||
1696 | + _M_data->_M_negative_sign = ""; | ||
1697 | + _M_data->_M_negative_sign_size = 0; | ||
1698 | + _M_data->_M_frac_digits = 0; | ||
1699 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1700 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1701 | + | ||
1702 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1703 | + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; | ||
1704 | + } | ||
1705 | + else | ||
1706 | + { | ||
1707 | + // Named locale. | ||
1708 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, | ||
1709 | + __cloc)); | ||
1710 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, | ||
1711 | + __cloc)); | ||
1712 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1713 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1714 | + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1715 | + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); | ||
1716 | + | ||
1717 | + char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); | ||
1718 | + if (!__nposn) | ||
1719 | + _M_data->_M_negative_sign = "()"; | ||
1720 | + else | ||
1721 | + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, | ||
1722 | + __cloc); | ||
1723 | + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); | ||
1724 | + | ||
1725 | + // _Intl == false | ||
1726 | + _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); | ||
1727 | + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); | ||
1728 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); | ||
1729 | + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); | ||
1730 | + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); | ||
1731 | + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); | ||
1732 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1733 | + __pposn); | ||
1734 | + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); | ||
1735 | + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); | ||
1736 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1737 | + __nposn); | ||
1738 | + } | ||
1739 | + } | ||
1740 | + | ||
1741 | + template<> | ||
1742 | + moneypunct<char, true>::~moneypunct() | ||
1743 | + { delete _M_data; } | ||
1744 | + | ||
1745 | + template<> | ||
1746 | + moneypunct<char, false>::~moneypunct() | ||
1747 | + { delete _M_data; } | ||
1748 | + | ||
1749 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
1750 | + template<> | ||
1751 | + void | ||
1752 | + moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1753 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1754 | + const char*) | ||
1755 | +#else | ||
1756 | + const char* __name) | ||
1757 | +#endif | ||
1758 | + { | ||
1759 | + if (!_M_data) | ||
1760 | + _M_data = new __moneypunct_cache<wchar_t, true>; | ||
1761 | + | ||
1762 | + if (!__cloc) | ||
1763 | + { | ||
1764 | + // "C" locale | ||
1765 | + _M_data->_M_decimal_point = L'.'; | ||
1766 | + _M_data->_M_thousands_sep = L','; | ||
1767 | + _M_data->_M_grouping = ""; | ||
1768 | + _M_data->_M_grouping_size = 0; | ||
1769 | + _M_data->_M_curr_symbol = L""; | ||
1770 | + _M_data->_M_curr_symbol_size = 0; | ||
1771 | + _M_data->_M_positive_sign = L""; | ||
1772 | + _M_data->_M_positive_sign_size = 0; | ||
1773 | + _M_data->_M_negative_sign = L""; | ||
1774 | + _M_data->_M_negative_sign_size = 0; | ||
1775 | + _M_data->_M_frac_digits = 0; | ||
1776 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1777 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1778 | + | ||
1779 | + // Use ctype::widen code without the facet... | ||
1780 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1781 | + _M_data->_M_atoms[__i] = | ||
1782 | + static_cast<wchar_t>(money_base::_S_atoms[__i]); | ||
1783 | + } | ||
1784 | + else | ||
1785 | + { | ||
1786 | + // Named locale. | ||
1787 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1788 | + __c_locale __old = __uselocale(__cloc); | ||
1789 | +#else | ||
1790 | + // Switch to named locale so that mbsrtowcs will work. | ||
1791 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1792 | + setlocale(LC_ALL, __name); | ||
1793 | +#endif | ||
1794 | + | ||
1795 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1796 | +#warning fix this... should be monetary | ||
1797 | +#endif | ||
1798 | +#ifdef __UCLIBC__ | ||
1799 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1800 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
1801 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
1802 | +# else | ||
1803 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
1804 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
1805 | +# endif | ||
1806 | +#else | ||
1807 | + union { char *__s; wchar_t __w; } __u; | ||
1808 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); | ||
1809 | + _M_data->_M_decimal_point = __u.__w; | ||
1810 | + | ||
1811 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); | ||
1812 | + _M_data->_M_thousands_sep = __u.__w; | ||
1813 | +#endif | ||
1814 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1815 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1816 | + | ||
1817 | + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1818 | + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); | ||
1819 | + const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); | ||
1820 | + | ||
1821 | + wchar_t* __wcs_ps = 0; | ||
1822 | + wchar_t* __wcs_ns = 0; | ||
1823 | + const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); | ||
1824 | + try | ||
1825 | + { | ||
1826 | + mbstate_t __state; | ||
1827 | + size_t __len = strlen(__cpossign); | ||
1828 | + if (__len) | ||
1829 | + { | ||
1830 | + ++__len; | ||
1831 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1832 | + __wcs_ps = new wchar_t[__len]; | ||
1833 | + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); | ||
1834 | + _M_data->_M_positive_sign = __wcs_ps; | ||
1835 | + } | ||
1836 | + else | ||
1837 | + _M_data->_M_positive_sign = L""; | ||
1838 | + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); | ||
1839 | + | ||
1840 | + __len = strlen(__cnegsign); | ||
1841 | + if (!__nposn) | ||
1842 | + _M_data->_M_negative_sign = L"()"; | ||
1843 | + else if (__len) | ||
1844 | + { | ||
1845 | + ++__len; | ||
1846 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1847 | + __wcs_ns = new wchar_t[__len]; | ||
1848 | + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); | ||
1849 | + _M_data->_M_negative_sign = __wcs_ns; | ||
1850 | + } | ||
1851 | + else | ||
1852 | + _M_data->_M_negative_sign = L""; | ||
1853 | + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); | ||
1854 | + | ||
1855 | + // _Intl == true. | ||
1856 | + __len = strlen(__ccurr); | ||
1857 | + if (__len) | ||
1858 | + { | ||
1859 | + ++__len; | ||
1860 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1861 | + wchar_t* __wcs = new wchar_t[__len]; | ||
1862 | + mbsrtowcs(__wcs, &__ccurr, __len, &__state); | ||
1863 | + _M_data->_M_curr_symbol = __wcs; | ||
1864 | + } | ||
1865 | + else | ||
1866 | + _M_data->_M_curr_symbol = L""; | ||
1867 | + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); | ||
1868 | + } | ||
1869 | + catch (...) | ||
1870 | + { | ||
1871 | + delete _M_data; | ||
1872 | + _M_data = 0; | ||
1873 | + delete __wcs_ps; | ||
1874 | + delete __wcs_ns; | ||
1875 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1876 | + __uselocale(__old); | ||
1877 | +#else | ||
1878 | + setlocale(LC_ALL, __old); | ||
1879 | + free(__old); | ||
1880 | +#endif | ||
1881 | + __throw_exception_again; | ||
1882 | + } | ||
1883 | + | ||
1884 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, | ||
1885 | + __cloc)); | ||
1886 | + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); | ||
1887 | + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); | ||
1888 | + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); | ||
1889 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1890 | + __pposn); | ||
1891 | + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); | ||
1892 | + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); | ||
1893 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1894 | + __nposn); | ||
1895 | + | ||
1896 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1897 | + __uselocale(__old); | ||
1898 | +#else | ||
1899 | + setlocale(LC_ALL, __old); | ||
1900 | + free(__old); | ||
1901 | +#endif | ||
1902 | + } | ||
1903 | + } | ||
1904 | + | ||
1905 | + template<> | ||
1906 | + void | ||
1907 | + moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1908 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1909 | + const char*) | ||
1910 | +#else | ||
1911 | + const char* __name) | ||
1912 | +#endif | ||
1913 | + { | ||
1914 | + if (!_M_data) | ||
1915 | + _M_data = new __moneypunct_cache<wchar_t, false>; | ||
1916 | + | ||
1917 | + if (!__cloc) | ||
1918 | + { | ||
1919 | + // "C" locale | ||
1920 | + _M_data->_M_decimal_point = L'.'; | ||
1921 | + _M_data->_M_thousands_sep = L','; | ||
1922 | + _M_data->_M_grouping = ""; | ||
1923 | + _M_data->_M_grouping_size = 0; | ||
1924 | + _M_data->_M_curr_symbol = L""; | ||
1925 | + _M_data->_M_curr_symbol_size = 0; | ||
1926 | + _M_data->_M_positive_sign = L""; | ||
1927 | + _M_data->_M_positive_sign_size = 0; | ||
1928 | + _M_data->_M_negative_sign = L""; | ||
1929 | + _M_data->_M_negative_sign_size = 0; | ||
1930 | + _M_data->_M_frac_digits = 0; | ||
1931 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1932 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1933 | + | ||
1934 | + // Use ctype::widen code without the facet... | ||
1935 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1936 | + _M_data->_M_atoms[__i] = | ||
1937 | + static_cast<wchar_t>(money_base::_S_atoms[__i]); | ||
1938 | + } | ||
1939 | + else | ||
1940 | + { | ||
1941 | + // Named locale. | ||
1942 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1943 | + __c_locale __old = __uselocale(__cloc); | ||
1944 | +#else | ||
1945 | + // Switch to named locale so that mbsrtowcs will work. | ||
1946 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1947 | + setlocale(LC_ALL, __name); | ||
1948 | +#endif | ||
1949 | + | ||
1950 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1951 | +#warning fix this... should be monetary | ||
1952 | +#endif | ||
1953 | +#ifdef __UCLIBC__ | ||
1954 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1955 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
1956 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
1957 | +# else | ||
1958 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
1959 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
1960 | +# endif | ||
1961 | +#else | ||
1962 | + union { char *__s; wchar_t __w; } __u; | ||
1963 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); | ||
1964 | + _M_data->_M_decimal_point = __u.__w; | ||
1965 | + | ||
1966 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); | ||
1967 | + _M_data->_M_thousands_sep = __u.__w; | ||
1968 | +#endif | ||
1969 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1970 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1971 | + | ||
1972 | + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1973 | + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); | ||
1974 | + const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); | ||
1975 | + | ||
1976 | + wchar_t* __wcs_ps = 0; | ||
1977 | + wchar_t* __wcs_ns = 0; | ||
1978 | + const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); | ||
1979 | + try | ||
1980 | + { | ||
1981 | + mbstate_t __state; | ||
1982 | + size_t __len; | ||
1983 | + __len = strlen(__cpossign); | ||
1984 | + if (__len) | ||
1985 | + { | ||
1986 | + ++__len; | ||
1987 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1988 | + __wcs_ps = new wchar_t[__len]; | ||
1989 | + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); | ||
1990 | + _M_data->_M_positive_sign = __wcs_ps; | ||
1991 | + } | ||
1992 | + else | ||
1993 | + _M_data->_M_positive_sign = L""; | ||
1994 | + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); | ||
1995 | + | ||
1996 | + __len = strlen(__cnegsign); | ||
1997 | + if (!__nposn) | ||
1998 | + _M_data->_M_negative_sign = L"()"; | ||
1999 | + else if (__len) | ||
2000 | + { | ||
2001 | + ++__len; | ||
2002 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
2003 | + __wcs_ns = new wchar_t[__len]; | ||
2004 | + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); | ||
2005 | + _M_data->_M_negative_sign = __wcs_ns; | ||
2006 | + } | ||
2007 | + else | ||
2008 | + _M_data->_M_negative_sign = L""; | ||
2009 | + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); | ||
2010 | + | ||
2011 | + // _Intl == true. | ||
2012 | + __len = strlen(__ccurr); | ||
2013 | + if (__len) | ||
2014 | + { | ||
2015 | + ++__len; | ||
2016 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
2017 | + wchar_t* __wcs = new wchar_t[__len]; | ||
2018 | + mbsrtowcs(__wcs, &__ccurr, __len, &__state); | ||
2019 | + _M_data->_M_curr_symbol = __wcs; | ||
2020 | + } | ||
2021 | + else | ||
2022 | + _M_data->_M_curr_symbol = L""; | ||
2023 | + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); | ||
2024 | + } | ||
2025 | + catch (...) | ||
2026 | + { | ||
2027 | + delete _M_data; | ||
2028 | + _M_data = 0; | ||
2029 | + delete __wcs_ps; | ||
2030 | + delete __wcs_ns; | ||
2031 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2032 | + __uselocale(__old); | ||
2033 | +#else | ||
2034 | + setlocale(LC_ALL, __old); | ||
2035 | + free(__old); | ||
2036 | +#endif | ||
2037 | + __throw_exception_again; | ||
2038 | + } | ||
2039 | + | ||
2040 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); | ||
2041 | + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); | ||
2042 | + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); | ||
2043 | + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); | ||
2044 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
2045 | + __pposn); | ||
2046 | + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); | ||
2047 | + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); | ||
2048 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
2049 | + __nposn); | ||
2050 | + | ||
2051 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2052 | + __uselocale(__old); | ||
2053 | +#else | ||
2054 | + setlocale(LC_ALL, __old); | ||
2055 | + free(__old); | ||
2056 | +#endif | ||
2057 | + } | ||
2058 | + } | ||
2059 | + | ||
2060 | + template<> | ||
2061 | + moneypunct<wchar_t, true>::~moneypunct() | ||
2062 | + { | ||
2063 | + if (_M_data->_M_positive_sign_size) | ||
2064 | + delete [] _M_data->_M_positive_sign; | ||
2065 | + if (_M_data->_M_negative_sign_size | ||
2066 | + && wcscmp(_M_data->_M_negative_sign, L"()") != 0) | ||
2067 | + delete [] _M_data->_M_negative_sign; | ||
2068 | + if (_M_data->_M_curr_symbol_size) | ||
2069 | + delete [] _M_data->_M_curr_symbol; | ||
2070 | + delete _M_data; | ||
2071 | + } | ||
2072 | + | ||
2073 | + template<> | ||
2074 | + moneypunct<wchar_t, false>::~moneypunct() | ||
2075 | + { | ||
2076 | + if (_M_data->_M_positive_sign_size) | ||
2077 | + delete [] _M_data->_M_positive_sign; | ||
2078 | + if (_M_data->_M_negative_sign_size | ||
2079 | + && wcscmp(_M_data->_M_negative_sign, L"()") != 0) | ||
2080 | + delete [] _M_data->_M_negative_sign; | ||
2081 | + if (_M_data->_M_curr_symbol_size) | ||
2082 | + delete [] _M_data->_M_curr_symbol; | ||
2083 | + delete _M_data; | ||
2084 | + } | ||
2085 | +#endif | ||
2086 | +} | ||
2087 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
2088 | new file mode 100644 | ||
2089 | index 0000000..883ec1a | ||
2090 | --- /dev/null | ||
2091 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
2092 | @@ -0,0 +1,160 @@ | ||
2093 | +// std::numpunct implementation details, GNU version -*- C++ -*- | ||
2094 | + | ||
2095 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2096 | +// | ||
2097 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2098 | +// software; you can redistribute it and/or modify it under the | ||
2099 | +// terms of the GNU General Public License as published by the | ||
2100 | +// Free Software Foundation; either version 2, or (at your option) | ||
2101 | +// any later version. | ||
2102 | + | ||
2103 | +// This library is distributed in the hope that it will be useful, | ||
2104 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2105 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2106 | +// GNU General Public License for more details. | ||
2107 | + | ||
2108 | +// You should have received a copy of the GNU General Public License along | ||
2109 | +// with this library; see the file COPYING. If not, write to the Free | ||
2110 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2111 | +// USA. | ||
2112 | + | ||
2113 | +// As a special exception, you may use this file as part of a free software | ||
2114 | +// library without restriction. Specifically, if other files instantiate | ||
2115 | +// templates or use macros or inline functions from this file, or you compile | ||
2116 | +// this file and link it with other files to produce an executable, this | ||
2117 | +// file does not by itself cause the resulting executable to be covered by | ||
2118 | +// the GNU General Public License. This exception does not however | ||
2119 | +// invalidate any other reasons why the executable file might be covered by | ||
2120 | +// the GNU General Public License. | ||
2121 | + | ||
2122 | +// | ||
2123 | +// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions | ||
2124 | +// | ||
2125 | + | ||
2126 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2127 | + | ||
2128 | +#define _LIBC | ||
2129 | +#include <locale> | ||
2130 | +#undef _LIBC | ||
2131 | +#include <bits/c++locale_internal.h> | ||
2132 | + | ||
2133 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2134 | +#warning tailor for stub locale support | ||
2135 | +#endif | ||
2136 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
2137 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
2138 | +#endif | ||
2139 | + | ||
2140 | +namespace std | ||
2141 | +{ | ||
2142 | + template<> | ||
2143 | + void | ||
2144 | + numpunct<char>::_M_initialize_numpunct(__c_locale __cloc) | ||
2145 | + { | ||
2146 | + if (!_M_data) | ||
2147 | + _M_data = new __numpunct_cache<char>; | ||
2148 | + | ||
2149 | + if (!__cloc) | ||
2150 | + { | ||
2151 | + // "C" locale | ||
2152 | + _M_data->_M_grouping = ""; | ||
2153 | + _M_data->_M_grouping_size = 0; | ||
2154 | + _M_data->_M_use_grouping = false; | ||
2155 | + | ||
2156 | + _M_data->_M_decimal_point = '.'; | ||
2157 | + _M_data->_M_thousands_sep = ','; | ||
2158 | + | ||
2159 | + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) | ||
2160 | + _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; | ||
2161 | + | ||
2162 | + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) | ||
2163 | + _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; | ||
2164 | + } | ||
2165 | + else | ||
2166 | + { | ||
2167 | + // Named locale. | ||
2168 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, | ||
2169 | + __cloc)); | ||
2170 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, | ||
2171 | + __cloc)); | ||
2172 | + | ||
2173 | + // Check for NULL, which implies no grouping. | ||
2174 | + if (_M_data->_M_thousands_sep == '\0') | ||
2175 | + _M_data->_M_grouping = ""; | ||
2176 | + else | ||
2177 | + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); | ||
2178 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
2179 | + } | ||
2180 | + | ||
2181 | + // NB: There is no way to extact this info from posix locales. | ||
2182 | + // _M_truename = __nl_langinfo_l(YESSTR, __cloc); | ||
2183 | + _M_data->_M_truename = "true"; | ||
2184 | + _M_data->_M_truename_size = 4; | ||
2185 | + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); | ||
2186 | + _M_data->_M_falsename = "false"; | ||
2187 | + _M_data->_M_falsename_size = 5; | ||
2188 | + } | ||
2189 | + | ||
2190 | + template<> | ||
2191 | + numpunct<char>::~numpunct() | ||
2192 | + { delete _M_data; } | ||
2193 | + | ||
2194 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
2195 | + template<> | ||
2196 | + void | ||
2197 | + numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc) | ||
2198 | + { | ||
2199 | + if (!_M_data) | ||
2200 | + _M_data = new __numpunct_cache<wchar_t>; | ||
2201 | + | ||
2202 | + if (!__cloc) | ||
2203 | + { | ||
2204 | + // "C" locale | ||
2205 | + _M_data->_M_grouping = ""; | ||
2206 | + _M_data->_M_grouping_size = 0; | ||
2207 | + _M_data->_M_use_grouping = false; | ||
2208 | + | ||
2209 | + _M_data->_M_decimal_point = L'.'; | ||
2210 | + _M_data->_M_thousands_sep = L','; | ||
2211 | + | ||
2212 | + // Use ctype::widen code without the facet... | ||
2213 | + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) | ||
2214 | + _M_data->_M_atoms_out[__i] = | ||
2215 | + static_cast<wchar_t>(__num_base::_S_atoms_out[__i]); | ||
2216 | + | ||
2217 | + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) | ||
2218 | + _M_data->_M_atoms_in[__j] = | ||
2219 | + static_cast<wchar_t>(__num_base::_S_atoms_in[__j]); | ||
2220 | + } | ||
2221 | + else | ||
2222 | + { | ||
2223 | + // Named locale. | ||
2224 | + // NB: In the GNU model wchar_t is always 32 bit wide. | ||
2225 | + union { char *__s; wchar_t __w; } __u; | ||
2226 | + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); | ||
2227 | + _M_data->_M_decimal_point = __u.__w; | ||
2228 | + | ||
2229 | + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); | ||
2230 | + _M_data->_M_thousands_sep = __u.__w; | ||
2231 | + | ||
2232 | + if (_M_data->_M_thousands_sep == L'\0') | ||
2233 | + _M_data->_M_grouping = ""; | ||
2234 | + else | ||
2235 | + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); | ||
2236 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
2237 | + } | ||
2238 | + | ||
2239 | + // NB: There is no way to extact this info from posix locales. | ||
2240 | + // _M_truename = __nl_langinfo_l(YESSTR, __cloc); | ||
2241 | + _M_data->_M_truename = L"true"; | ||
2242 | + _M_data->_M_truename_size = 4; | ||
2243 | + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); | ||
2244 | + _M_data->_M_falsename = L"false"; | ||
2245 | + _M_data->_M_falsename_size = 5; | ||
2246 | + } | ||
2247 | + | ||
2248 | + template<> | ||
2249 | + numpunct<wchar_t>::~numpunct() | ||
2250 | + { delete _M_data; } | ||
2251 | + #endif | ||
2252 | +} | ||
2253 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
2254 | new file mode 100644 | ||
2255 | index 0000000..e0707d7 | ||
2256 | --- /dev/null | ||
2257 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
2258 | @@ -0,0 +1,406 @@ | ||
2259 | +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- | ||
2260 | + | ||
2261 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2262 | +// | ||
2263 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2264 | +// software; you can redistribute it and/or modify it under the | ||
2265 | +// terms of the GNU General Public License as published by the | ||
2266 | +// Free Software Foundation; either version 2, or (at your option) | ||
2267 | +// any later version. | ||
2268 | + | ||
2269 | +// This library is distributed in the hope that it will be useful, | ||
2270 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2271 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2272 | +// GNU General Public License for more details. | ||
2273 | + | ||
2274 | +// You should have received a copy of the GNU General Public License along | ||
2275 | +// with this library; see the file COPYING. If not, write to the Free | ||
2276 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2277 | +// USA. | ||
2278 | + | ||
2279 | +// As a special exception, you may use this file as part of a free software | ||
2280 | +// library without restriction. Specifically, if other files instantiate | ||
2281 | +// templates or use macros or inline functions from this file, or you compile | ||
2282 | +// this file and link it with other files to produce an executable, this | ||
2283 | +// file does not by itself cause the resulting executable to be covered by | ||
2284 | +// the GNU General Public License. This exception does not however | ||
2285 | +// invalidate any other reasons why the executable file might be covered by | ||
2286 | +// the GNU General Public License. | ||
2287 | + | ||
2288 | +// | ||
2289 | +// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions | ||
2290 | +// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions | ||
2291 | +// | ||
2292 | + | ||
2293 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2294 | + | ||
2295 | +#include <locale> | ||
2296 | +#include <bits/c++locale_internal.h> | ||
2297 | + | ||
2298 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2299 | +#warning tailor for stub locale support | ||
2300 | +#endif | ||
2301 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
2302 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
2303 | +#endif | ||
2304 | + | ||
2305 | +namespace std | ||
2306 | +{ | ||
2307 | + template<> | ||
2308 | + void | ||
2309 | + __timepunct<char>:: | ||
2310 | + _M_put(char* __s, size_t __maxlen, const char* __format, | ||
2311 | + const tm* __tm) const | ||
2312 | + { | ||
2313 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2314 | + const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, | ||
2315 | + _M_c_locale_timepunct); | ||
2316 | +#else | ||
2317 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
2318 | + setlocale(LC_ALL, _M_name_timepunct); | ||
2319 | + const size_t __len = strftime(__s, __maxlen, __format, __tm); | ||
2320 | + setlocale(LC_ALL, __old); | ||
2321 | + free(__old); | ||
2322 | +#endif | ||
2323 | + // Make sure __s is null terminated. | ||
2324 | + if (__len == 0) | ||
2325 | + __s[0] = '\0'; | ||
2326 | + } | ||
2327 | + | ||
2328 | + template<> | ||
2329 | + void | ||
2330 | + __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc) | ||
2331 | + { | ||
2332 | + if (!_M_data) | ||
2333 | + _M_data = new __timepunct_cache<char>; | ||
2334 | + | ||
2335 | + if (!__cloc) | ||
2336 | + { | ||
2337 | + // "C" locale | ||
2338 | + _M_c_locale_timepunct = _S_get_c_locale(); | ||
2339 | + | ||
2340 | + _M_data->_M_date_format = "%m/%d/%y"; | ||
2341 | + _M_data->_M_date_era_format = "%m/%d/%y"; | ||
2342 | + _M_data->_M_time_format = "%H:%M:%S"; | ||
2343 | + _M_data->_M_time_era_format = "%H:%M:%S"; | ||
2344 | + _M_data->_M_date_time_format = ""; | ||
2345 | + _M_data->_M_date_time_era_format = ""; | ||
2346 | + _M_data->_M_am = "AM"; | ||
2347 | + _M_data->_M_pm = "PM"; | ||
2348 | + _M_data->_M_am_pm_format = ""; | ||
2349 | + | ||
2350 | + // Day names, starting with "C"'s Sunday. | ||
2351 | + _M_data->_M_day1 = "Sunday"; | ||
2352 | + _M_data->_M_day2 = "Monday"; | ||
2353 | + _M_data->_M_day3 = "Tuesday"; | ||
2354 | + _M_data->_M_day4 = "Wednesday"; | ||
2355 | + _M_data->_M_day5 = "Thursday"; | ||
2356 | + _M_data->_M_day6 = "Friday"; | ||
2357 | + _M_data->_M_day7 = "Saturday"; | ||
2358 | + | ||
2359 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2360 | + _M_data->_M_aday1 = "Sun"; | ||
2361 | + _M_data->_M_aday2 = "Mon"; | ||
2362 | + _M_data->_M_aday3 = "Tue"; | ||
2363 | + _M_data->_M_aday4 = "Wed"; | ||
2364 | + _M_data->_M_aday5 = "Thu"; | ||
2365 | + _M_data->_M_aday6 = "Fri"; | ||
2366 | + _M_data->_M_aday7 = "Sat"; | ||
2367 | + | ||
2368 | + // Month names, starting with "C"'s January. | ||
2369 | + _M_data->_M_month01 = "January"; | ||
2370 | + _M_data->_M_month02 = "February"; | ||
2371 | + _M_data->_M_month03 = "March"; | ||
2372 | + _M_data->_M_month04 = "April"; | ||
2373 | + _M_data->_M_month05 = "May"; | ||
2374 | + _M_data->_M_month06 = "June"; | ||
2375 | + _M_data->_M_month07 = "July"; | ||
2376 | + _M_data->_M_month08 = "August"; | ||
2377 | + _M_data->_M_month09 = "September"; | ||
2378 | + _M_data->_M_month10 = "October"; | ||
2379 | + _M_data->_M_month11 = "November"; | ||
2380 | + _M_data->_M_month12 = "December"; | ||
2381 | + | ||
2382 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2383 | + _M_data->_M_amonth01 = "Jan"; | ||
2384 | + _M_data->_M_amonth02 = "Feb"; | ||
2385 | + _M_data->_M_amonth03 = "Mar"; | ||
2386 | + _M_data->_M_amonth04 = "Apr"; | ||
2387 | + _M_data->_M_amonth05 = "May"; | ||
2388 | + _M_data->_M_amonth06 = "Jun"; | ||
2389 | + _M_data->_M_amonth07 = "Jul"; | ||
2390 | + _M_data->_M_amonth08 = "Aug"; | ||
2391 | + _M_data->_M_amonth09 = "Sep"; | ||
2392 | + _M_data->_M_amonth10 = "Oct"; | ||
2393 | + _M_data->_M_amonth11 = "Nov"; | ||
2394 | + _M_data->_M_amonth12 = "Dec"; | ||
2395 | + } | ||
2396 | + else | ||
2397 | + { | ||
2398 | + _M_c_locale_timepunct = _S_clone_c_locale(__cloc); | ||
2399 | + | ||
2400 | + _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); | ||
2401 | + _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); | ||
2402 | + _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); | ||
2403 | + _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); | ||
2404 | + _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); | ||
2405 | + _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, | ||
2406 | + __cloc); | ||
2407 | + _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); | ||
2408 | + _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); | ||
2409 | + _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); | ||
2410 | + | ||
2411 | + // Day names, starting with "C"'s Sunday. | ||
2412 | + _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); | ||
2413 | + _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); | ||
2414 | + _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); | ||
2415 | + _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); | ||
2416 | + _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); | ||
2417 | + _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); | ||
2418 | + _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); | ||
2419 | + | ||
2420 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2421 | + _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); | ||
2422 | + _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); | ||
2423 | + _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); | ||
2424 | + _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); | ||
2425 | + _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); | ||
2426 | + _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); | ||
2427 | + _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); | ||
2428 | + | ||
2429 | + // Month names, starting with "C"'s January. | ||
2430 | + _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); | ||
2431 | + _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); | ||
2432 | + _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); | ||
2433 | + _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); | ||
2434 | + _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); | ||
2435 | + _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); | ||
2436 | + _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); | ||
2437 | + _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); | ||
2438 | + _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); | ||
2439 | + _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); | ||
2440 | + _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); | ||
2441 | + _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); | ||
2442 | + | ||
2443 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2444 | + _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); | ||
2445 | + _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); | ||
2446 | + _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); | ||
2447 | + _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); | ||
2448 | + _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); | ||
2449 | + _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); | ||
2450 | + _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); | ||
2451 | + _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); | ||
2452 | + _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); | ||
2453 | + _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); | ||
2454 | + _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); | ||
2455 | + _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); | ||
2456 | + } | ||
2457 | + } | ||
2458 | + | ||
2459 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
2460 | + template<> | ||
2461 | + void | ||
2462 | + __timepunct<wchar_t>:: | ||
2463 | + _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, | ||
2464 | + const tm* __tm) const | ||
2465 | + { | ||
2466 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2467 | + __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); | ||
2468 | + const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, | ||
2469 | + _M_c_locale_timepunct); | ||
2470 | +#else | ||
2471 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
2472 | + setlocale(LC_ALL, _M_name_timepunct); | ||
2473 | + const size_t __len = wcsftime(__s, __maxlen, __format, __tm); | ||
2474 | + setlocale(LC_ALL, __old); | ||
2475 | + free(__old); | ||
2476 | +#endif | ||
2477 | + // Make sure __s is null terminated. | ||
2478 | + if (__len == 0) | ||
2479 | + __s[0] = L'\0'; | ||
2480 | + } | ||
2481 | + | ||
2482 | + template<> | ||
2483 | + void | ||
2484 | + __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc) | ||
2485 | + { | ||
2486 | + if (!_M_data) | ||
2487 | + _M_data = new __timepunct_cache<wchar_t>; | ||
2488 | + | ||
2489 | +#warning wide time stuff | ||
2490 | +// if (!__cloc) | ||
2491 | + { | ||
2492 | + // "C" locale | ||
2493 | + _M_c_locale_timepunct = _S_get_c_locale(); | ||
2494 | + | ||
2495 | + _M_data->_M_date_format = L"%m/%d/%y"; | ||
2496 | + _M_data->_M_date_era_format = L"%m/%d/%y"; | ||
2497 | + _M_data->_M_time_format = L"%H:%M:%S"; | ||
2498 | + _M_data->_M_time_era_format = L"%H:%M:%S"; | ||
2499 | + _M_data->_M_date_time_format = L""; | ||
2500 | + _M_data->_M_date_time_era_format = L""; | ||
2501 | + _M_data->_M_am = L"AM"; | ||
2502 | + _M_data->_M_pm = L"PM"; | ||
2503 | + _M_data->_M_am_pm_format = L""; | ||
2504 | + | ||
2505 | + // Day names, starting with "C"'s Sunday. | ||
2506 | + _M_data->_M_day1 = L"Sunday"; | ||
2507 | + _M_data->_M_day2 = L"Monday"; | ||
2508 | + _M_data->_M_day3 = L"Tuesday"; | ||
2509 | + _M_data->_M_day4 = L"Wednesday"; | ||
2510 | + _M_data->_M_day5 = L"Thursday"; | ||
2511 | + _M_data->_M_day6 = L"Friday"; | ||
2512 | + _M_data->_M_day7 = L"Saturday"; | ||
2513 | + | ||
2514 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2515 | + _M_data->_M_aday1 = L"Sun"; | ||
2516 | + _M_data->_M_aday2 = L"Mon"; | ||
2517 | + _M_data->_M_aday3 = L"Tue"; | ||
2518 | + _M_data->_M_aday4 = L"Wed"; | ||
2519 | + _M_data->_M_aday5 = L"Thu"; | ||
2520 | + _M_data->_M_aday6 = L"Fri"; | ||
2521 | + _M_data->_M_aday7 = L"Sat"; | ||
2522 | + | ||
2523 | + // Month names, starting with "C"'s January. | ||
2524 | + _M_data->_M_month01 = L"January"; | ||
2525 | + _M_data->_M_month02 = L"February"; | ||
2526 | + _M_data->_M_month03 = L"March"; | ||
2527 | + _M_data->_M_month04 = L"April"; | ||
2528 | + _M_data->_M_month05 = L"May"; | ||
2529 | + _M_data->_M_month06 = L"June"; | ||
2530 | + _M_data->_M_month07 = L"July"; | ||
2531 | + _M_data->_M_month08 = L"August"; | ||
2532 | + _M_data->_M_month09 = L"September"; | ||
2533 | + _M_data->_M_month10 = L"October"; | ||
2534 | + _M_data->_M_month11 = L"November"; | ||
2535 | + _M_data->_M_month12 = L"December"; | ||
2536 | + | ||
2537 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2538 | + _M_data->_M_amonth01 = L"Jan"; | ||
2539 | + _M_data->_M_amonth02 = L"Feb"; | ||
2540 | + _M_data->_M_amonth03 = L"Mar"; | ||
2541 | + _M_data->_M_amonth04 = L"Apr"; | ||
2542 | + _M_data->_M_amonth05 = L"May"; | ||
2543 | + _M_data->_M_amonth06 = L"Jun"; | ||
2544 | + _M_data->_M_amonth07 = L"Jul"; | ||
2545 | + _M_data->_M_amonth08 = L"Aug"; | ||
2546 | + _M_data->_M_amonth09 = L"Sep"; | ||
2547 | + _M_data->_M_amonth10 = L"Oct"; | ||
2548 | + _M_data->_M_amonth11 = L"Nov"; | ||
2549 | + _M_data->_M_amonth12 = L"Dec"; | ||
2550 | + } | ||
2551 | +#if 0 | ||
2552 | + else | ||
2553 | + { | ||
2554 | + _M_c_locale_timepunct = _S_clone_c_locale(__cloc); | ||
2555 | + | ||
2556 | + union { char *__s; wchar_t *__w; } __u; | ||
2557 | + | ||
2558 | + __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); | ||
2559 | + _M_data->_M_date_format = __u.__w; | ||
2560 | + __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); | ||
2561 | + _M_data->_M_date_era_format = __u.__w; | ||
2562 | + __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); | ||
2563 | + _M_data->_M_time_format = __u.__w; | ||
2564 | + __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); | ||
2565 | + _M_data->_M_time_era_format = __u.__w; | ||
2566 | + __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); | ||
2567 | + _M_data->_M_date_time_format = __u.__w; | ||
2568 | + __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); | ||
2569 | + _M_data->_M_date_time_era_format = __u.__w; | ||
2570 | + __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); | ||
2571 | + _M_data->_M_am = __u.__w; | ||
2572 | + __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); | ||
2573 | + _M_data->_M_pm = __u.__w; | ||
2574 | + __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); | ||
2575 | + _M_data->_M_am_pm_format = __u.__w; | ||
2576 | + | ||
2577 | + // Day names, starting with "C"'s Sunday. | ||
2578 | + __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); | ||
2579 | + _M_data->_M_day1 = __u.__w; | ||
2580 | + __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); | ||
2581 | + _M_data->_M_day2 = __u.__w; | ||
2582 | + __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); | ||
2583 | + _M_data->_M_day3 = __u.__w; | ||
2584 | + __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); | ||
2585 | + _M_data->_M_day4 = __u.__w; | ||
2586 | + __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); | ||
2587 | + _M_data->_M_day5 = __u.__w; | ||
2588 | + __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); | ||
2589 | + _M_data->_M_day6 = __u.__w; | ||
2590 | + __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); | ||
2591 | + _M_data->_M_day7 = __u.__w; | ||
2592 | + | ||
2593 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2594 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); | ||
2595 | + _M_data->_M_aday1 = __u.__w; | ||
2596 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); | ||
2597 | + _M_data->_M_aday2 = __u.__w; | ||
2598 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); | ||
2599 | + _M_data->_M_aday3 = __u.__w; | ||
2600 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); | ||
2601 | + _M_data->_M_aday4 = __u.__w; | ||
2602 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); | ||
2603 | + _M_data->_M_aday5 = __u.__w; | ||
2604 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); | ||
2605 | + _M_data->_M_aday6 = __u.__w; | ||
2606 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); | ||
2607 | + _M_data->_M_aday7 = __u.__w; | ||
2608 | + | ||
2609 | + // Month names, starting with "C"'s January. | ||
2610 | + __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); | ||
2611 | + _M_data->_M_month01 = __u.__w; | ||
2612 | + __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); | ||
2613 | + _M_data->_M_month02 = __u.__w; | ||
2614 | + __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); | ||
2615 | + _M_data->_M_month03 = __u.__w; | ||
2616 | + __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); | ||
2617 | + _M_data->_M_month04 = __u.__w; | ||
2618 | + __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); | ||
2619 | + _M_data->_M_month05 = __u.__w; | ||
2620 | + __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); | ||
2621 | + _M_data->_M_month06 = __u.__w; | ||
2622 | + __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); | ||
2623 | + _M_data->_M_month07 = __u.__w; | ||
2624 | + __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); | ||
2625 | + _M_data->_M_month08 = __u.__w; | ||
2626 | + __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); | ||
2627 | + _M_data->_M_month09 = __u.__w; | ||
2628 | + __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); | ||
2629 | + _M_data->_M_month10 = __u.__w; | ||
2630 | + __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); | ||
2631 | + _M_data->_M_month11 = __u.__w; | ||
2632 | + __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); | ||
2633 | + _M_data->_M_month12 = __u.__w; | ||
2634 | + | ||
2635 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2636 | + __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); | ||
2637 | + _M_data->_M_amonth01 = __u.__w; | ||
2638 | + __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); | ||
2639 | + _M_data->_M_amonth02 = __u.__w; | ||
2640 | + __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); | ||
2641 | + _M_data->_M_amonth03 = __u.__w; | ||
2642 | + __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); | ||
2643 | + _M_data->_M_amonth04 = __u.__w; | ||
2644 | + __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); | ||
2645 | + _M_data->_M_amonth05 = __u.__w; | ||
2646 | + __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); | ||
2647 | + _M_data->_M_amonth06 = __u.__w; | ||
2648 | + __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); | ||
2649 | + _M_data->_M_amonth07 = __u.__w; | ||
2650 | + __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); | ||
2651 | + _M_data->_M_amonth08 = __u.__w; | ||
2652 | + __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); | ||
2653 | + _M_data->_M_amonth09 = __u.__w; | ||
2654 | + __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); | ||
2655 | + _M_data->_M_amonth10 = __u.__w; | ||
2656 | + __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); | ||
2657 | + _M_data->_M_amonth11 = __u.__w; | ||
2658 | + __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); | ||
2659 | + _M_data->_M_amonth12 = __u.__w; | ||
2660 | + } | ||
2661 | +#endif // 0 | ||
2662 | + } | ||
2663 | +#endif | ||
2664 | +} | ||
2665 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
2666 | new file mode 100644 | ||
2667 | index 0000000..ba8e858 | ||
2668 | --- /dev/null | ||
2669 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
2670 | @@ -0,0 +1,68 @@ | ||
2671 | +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- | ||
2672 | + | ||
2673 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2674 | +// | ||
2675 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2676 | +// software; you can redistribute it and/or modify it under the | ||
2677 | +// terms of the GNU General Public License as published by the | ||
2678 | +// Free Software Foundation; either version 2, or (at your option) | ||
2679 | +// any later version. | ||
2680 | + | ||
2681 | +// This library is distributed in the hope that it will be useful, | ||
2682 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2683 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2684 | +// GNU General Public License for more details. | ||
2685 | + | ||
2686 | +// You should have received a copy of the GNU General Public License along | ||
2687 | +// with this library; see the file COPYING. If not, write to the Free | ||
2688 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2689 | +// USA. | ||
2690 | + | ||
2691 | +// As a special exception, you may use this file as part of a free software | ||
2692 | +// library without restriction. Specifically, if other files instantiate | ||
2693 | +// templates or use macros or inline functions from this file, or you compile | ||
2694 | +// this file and link it with other files to produce an executable, this | ||
2695 | +// file does not by itself cause the resulting executable to be covered by | ||
2696 | +// the GNU General Public License. This exception does not however | ||
2697 | +// invalidate any other reasons why the executable file might be covered by | ||
2698 | +// the GNU General Public License. | ||
2699 | + | ||
2700 | +// | ||
2701 | +// ISO C++ 14882: 22.2.5.1.2 - time_get functions | ||
2702 | +// ISO C++ 14882: 22.2.5.3.2 - time_put functions | ||
2703 | +// | ||
2704 | + | ||
2705 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2706 | + | ||
2707 | + template<typename _CharT> | ||
2708 | + __timepunct<_CharT>::__timepunct(size_t __refs) | ||
2709 | + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
2710 | + _M_name_timepunct(_S_get_c_name()) | ||
2711 | + { _M_initialize_timepunct(); } | ||
2712 | + | ||
2713 | + template<typename _CharT> | ||
2714 | + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) | ||
2715 | + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), | ||
2716 | + _M_name_timepunct(_S_get_c_name()) | ||
2717 | + { _M_initialize_timepunct(); } | ||
2718 | + | ||
2719 | + template<typename _CharT> | ||
2720 | + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | ||
2721 | + size_t __refs) | ||
2722 | + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
2723 | + _M_name_timepunct(__s) | ||
2724 | + { | ||
2725 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
2726 | + std::strcpy(__tmp, __s); | ||
2727 | + _M_name_timepunct = __tmp; | ||
2728 | + _M_initialize_timepunct(__cloc); | ||
2729 | + } | ||
2730 | + | ||
2731 | + template<typename _CharT> | ||
2732 | + __timepunct<_CharT>::~__timepunct() | ||
2733 | + { | ||
2734 | + if (_M_name_timepunct != _S_get_c_name()) | ||
2735 | + delete [] _M_name_timepunct; | ||
2736 | + delete _M_data; | ||
2737 | + _S_destroy_c_locale(_M_c_locale_timepunct); | ||
2738 | + } | ||
2739 | diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure | ||
2740 | index f40ddcf..c57a751 100755 | ||
2741 | --- a/libstdc++-v3/configure | ||
2742 | +++ b/libstdc++-v3/configure | ||
2743 | @@ -15822,6 +15822,9 @@ fi | ||
2744 | # Default to "generic". | ||
2745 | if test $enable_clocale_flag = auto; then | ||
2746 | case ${target_os} in | ||
2747 | + *-uclibc*) | ||
2748 | + enable_clocale_flag=uclibc | ||
2749 | + ;; | ||
2750 | linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) | ||
2751 | enable_clocale_flag=gnu | ||
2752 | ;; | ||
2753 | @@ -16079,6 +16082,78 @@ $as_echo "newlib" >&6; } | ||
2754 | CTIME_CC=config/locale/generic/time_members.cc | ||
2755 | CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h | ||
2756 | ;; | ||
2757 | + uclibc) | ||
2758 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5 | ||
2759 | +$as_echo "uclibc" >&6; } | ||
2760 | + | ||
2761 | + # Declare intention to use gettext, and add support for specific | ||
2762 | + # languages. | ||
2763 | + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT | ||
2764 | + ALL_LINGUAS="de fr" | ||
2765 | + | ||
2766 | + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. | ||
2767 | + # Extract the first word of "msgfmt", so it can be a program name with args. | ||
2768 | +set dummy msgfmt; ac_word=$2 | ||
2769 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
2770 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
2771 | +if test "${ac_cv_prog_check_msgfmt+set}" = set; then : | ||
2772 | + $as_echo_n "(cached) " >&6 | ||
2773 | +else | ||
2774 | + if test -n "$check_msgfmt"; then | ||
2775 | + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. | ||
2776 | +else | ||
2777 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2778 | +for as_dir in $PATH | ||
2779 | +do | ||
2780 | + IFS=$as_save_IFS | ||
2781 | + test -z "$as_dir" && as_dir=. | ||
2782 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
2783 | + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | ||
2784 | + ac_cv_prog_check_msgfmt="yes" | ||
2785 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2786 | + break 2 | ||
2787 | + fi | ||
2788 | +done | ||
2789 | + done | ||
2790 | +IFS=$as_save_IFS | ||
2791 | + | ||
2792 | + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" | ||
2793 | +fi | ||
2794 | +fi | ||
2795 | +check_msgfmt=$ac_cv_prog_check_msgfmt | ||
2796 | +if test -n "$check_msgfmt"; then | ||
2797 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5 | ||
2798 | +$as_echo "$check_msgfmt" >&6; } | ||
2799 | +else | ||
2800 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
2801 | +$as_echo "no" >&6; } | ||
2802 | +fi | ||
2803 | + | ||
2804 | + | ||
2805 | + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then | ||
2806 | + USE_NLS=yes | ||
2807 | + fi | ||
2808 | + # Export the build objects. | ||
2809 | + for ling in $ALL_LINGUAS; do \ | ||
2810 | + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ | ||
2811 | + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ | ||
2812 | + done | ||
2813 | + | ||
2814 | + | ||
2815 | + | ||
2816 | + CLOCALE_H=config/locale/uclibc/c_locale.h | ||
2817 | + CLOCALE_CC=config/locale/uclibc/c_locale.cc | ||
2818 | + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc | ||
2819 | + CCOLLATE_CC=config/locale/uclibc/collate_members.cc | ||
2820 | + CCTYPE_CC=config/locale/uclibc/ctype_members.cc | ||
2821 | + CMESSAGES_H=config/locale/uclibc/messages_members.h | ||
2822 | + CMESSAGES_CC=config/locale/uclibc/messages_members.cc | ||
2823 | + CMONEY_CC=config/locale/uclibc/monetary_members.cc | ||
2824 | + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc | ||
2825 | + CTIME_H=config/locale/uclibc/time_members.h | ||
2826 | + CTIME_CC=config/locale/uclibc/time_members.cc | ||
2827 | + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h | ||
2828 | + ;; | ||
2829 | esac | ||
2830 | |||
2831 | # This is where the testsuite looks for locale catalogs, using the | ||
2832 | diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h | ||
2833 | index 580d725..3fe61b8 100644 | ||
2834 | --- a/libstdc++-v3/include/c_compatibility/wchar.h | ||
2835 | +++ b/libstdc++-v3/include/c_compatibility/wchar.h | ||
2836 | @@ -101,7 +101,9 @@ using std::wmemcmp; | ||
2837 | using std::wmemcpy; | ||
2838 | using std::wmemmove; | ||
2839 | using std::wmemset; | ||
2840 | +#if _GLIBCXX_HAVE_WCSFTIME | ||
2841 | using std::wcsftime; | ||
2842 | +#endif | ||
2843 | |||
2844 | #if _GLIBCXX_USE_C99 | ||
2845 | using std::wcstold; | ||
2846 | diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar | ||
2847 | index 0e6b1fc..405aee2 100644 | ||
2848 | --- a/libstdc++-v3/include/c_std/cwchar | ||
2849 | +++ b/libstdc++-v3/include/c_std/cwchar | ||
2850 | @@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
2851 | using ::wcscoll; | ||
2852 | using ::wcscpy; | ||
2853 | using ::wcscspn; | ||
2854 | +#if _GLIBCXX_HAVE_WCSFTIME | ||
2855 | using ::wcsftime; | ||
2856 | +#endif | ||
2857 | using ::wcslen; | ||
2858 | using ::wcsncat; | ||
2859 | using ::wcsncmp; | ||
2860 | -- | ||
2861 | 1.7.10.4 | ||
2862 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0005-uclibc-locale-no__x.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0005-uclibc-locale-no__x.patch new file mode 100644 index 0000000..dcbbfe4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0005-uclibc-locale-no__x.patch | |||
@@ -0,0 +1,257 @@ | |||
1 | From 6a3e8506a12c12728d8b29901defd738be43757f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:42:36 +0400 | ||
4 | Subject: [PATCH 05/35] uclibc-locale-no__x | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++ | ||
11 | libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 ------ | ||
12 | libstdc++-v3/config/locale/uclibc/c_locale.h | 1 + | ||
13 | .../config/locale/uclibc/collate_members.cc | 7 --- | ||
14 | libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 --- | ||
15 | .../config/locale/uclibc/messages_members.cc | 7 +-- | ||
16 | .../config/locale/uclibc/messages_members.h | 18 +++----- | ||
17 | .../config/locale/uclibc/monetary_members.cc | 4 -- | ||
18 | .../config/locale/uclibc/numeric_members.cc | 3 -- | ||
19 | libstdc++-v3/config/locale/uclibc/time_members.cc | 3 -- | ||
20 | 10 files changed, 55 insertions(+), 54 deletions(-) | ||
21 | |||
22 | diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
23 | index 2ae3e4a..e74fddf 100644 | ||
24 | --- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
25 | +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
26 | @@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; | ||
27 | extern "C" __typeof(wctype_l) __wctype_l; | ||
28 | #endif | ||
29 | |||
30 | +# define __nl_langinfo_l nl_langinfo_l | ||
31 | +# define __strcoll_l strcoll_l | ||
32 | +# define __strftime_l strftime_l | ||
33 | +# define __strtod_l strtod_l | ||
34 | +# define __strtof_l strtof_l | ||
35 | +# define __strtold_l strtold_l | ||
36 | +# define __strxfrm_l strxfrm_l | ||
37 | +# define __newlocale newlocale | ||
38 | +# define __freelocale freelocale | ||
39 | +# define __duplocale duplocale | ||
40 | +# define __uselocale uselocale | ||
41 | + | ||
42 | +# ifdef _GLIBCXX_USE_WCHAR_T | ||
43 | +# define __iswctype_l iswctype_l | ||
44 | +# define __towlower_l towlower_l | ||
45 | +# define __towupper_l towupper_l | ||
46 | +# define __wcscoll_l wcscoll_l | ||
47 | +# define __wcsftime_l wcsftime_l | ||
48 | +# define __wcsxfrm_l wcsxfrm_l | ||
49 | +# define __wctype_l wctype_l | ||
50 | +# endif | ||
51 | + | ||
52 | +#else | ||
53 | +# define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
54 | +# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
55 | +# define __strtod_l(S, E, L) strtod((S), (E)) | ||
56 | +# define __strtof_l(S, E, L) strtof((S), (E)) | ||
57 | +# define __strtold_l(S, E, L) strtold((S), (E)) | ||
58 | +# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
59 | +# warning should dummy __newlocale check for C|POSIX ? | ||
60 | +# define __newlocale(a, b, c) NULL | ||
61 | +# define __freelocale(a) ((void)0) | ||
62 | +# define __duplocale(a) __c_locale() | ||
63 | +//# define __uselocale ? | ||
64 | +// | ||
65 | +# ifdef _GLIBCXX_USE_WCHAR_T | ||
66 | +# define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
67 | +# define __towlower_l(C, L) towlower((C)) | ||
68 | +# define __towupper_l(C, L) towupper((C)) | ||
69 | +# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
70 | +//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) | ||
71 | +# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
72 | +# define __wctype_l(S, L) wctype((S)) | ||
73 | +# endif | ||
74 | + | ||
75 | #endif // GLIBC 2.3 and later | ||
76 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
77 | index 5081dc1..21430d0 100644 | ||
78 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
79 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
80 | @@ -39,20 +39,6 @@ | ||
81 | #include <langinfo.h> | ||
82 | #include <bits/c++locale_internal.h> | ||
83 | |||
84 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
85 | -#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) | ||
86 | -#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) | ||
87 | -#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) | ||
88 | -#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) | ||
89 | -#define __strtof_l(S, E, L) strtof((S), (E)) | ||
90 | -#define __strtod_l(S, E, L) strtod((S), (E)) | ||
91 | -#define __strtold_l(S, E, L) strtold((S), (E)) | ||
92 | -#warning should dummy __newlocale check for C|POSIX ? | ||
93 | -#define __newlocale(a, b, c) NULL | ||
94 | -#define __freelocale(a) ((void)0) | ||
95 | -#define __duplocale(a) __c_locale() | ||
96 | -#endif | ||
97 | - | ||
98 | namespace std | ||
99 | { | ||
100 | template<> | ||
101 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
102 | index da07c1f..4bca5f1 100644 | ||
103 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
104 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
105 | @@ -68,6 +68,7 @@ namespace __gnu_cxx | ||
106 | { | ||
107 | extern "C" __typeof(uselocale) __uselocale; | ||
108 | } | ||
109 | +#define __uselocale uselocale | ||
110 | #endif | ||
111 | |||
112 | namespace std | ||
113 | diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
114 | index c2664a7..ec5c329 100644 | ||
115 | --- a/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
116 | +++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
117 | @@ -36,13 +36,6 @@ | ||
118 | #include <locale> | ||
119 | #include <bits/c++locale_internal.h> | ||
120 | |||
121 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
122 | -#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
123 | -#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
124 | -#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
125 | -#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
126 | -#endif | ||
127 | - | ||
128 | namespace std | ||
129 | { | ||
130 | // These are basically extensions to char_traits, and perhaps should | ||
131 | diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
132 | index 7294e3a..7b12861 100644 | ||
133 | --- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
134 | +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
135 | @@ -38,13 +38,6 @@ | ||
136 | #undef _LIBC | ||
137 | #include <bits/c++locale_internal.h> | ||
138 | |||
139 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
140 | -#define __wctype_l(S, L) wctype((S)) | ||
141 | -#define __towupper_l(C, L) towupper((C)) | ||
142 | -#define __towlower_l(C, L) towlower((C)) | ||
143 | -#define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
144 | -#endif | ||
145 | - | ||
146 | namespace std | ||
147 | { | ||
148 | // NB: The other ctype<char> specializations are in src/locale.cc and | ||
149 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
150 | index 13594d9..d7693b4 100644 | ||
151 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
152 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
153 | @@ -39,13 +39,10 @@ | ||
154 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
155 | #warning fix gettext stuff | ||
156 | #endif | ||
157 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
158 | -extern "C" char *__dcgettext(const char *domainname, | ||
159 | - const char *msgid, int category); | ||
160 | #undef gettext | ||
161 | -#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) | ||
162 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
163 | +#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) | ||
164 | #else | ||
165 | -#undef gettext | ||
166 | #define gettext(msgid) (msgid) | ||
167 | #endif | ||
168 | |||
169 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
170 | index 1424078..d89da33 100644 | ||
171 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
172 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
173 | @@ -36,15 +36,11 @@ | ||
174 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
175 | #warning fix prototypes for *textdomain funcs | ||
176 | #endif | ||
177 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
178 | -extern "C" char *__textdomain(const char *domainname); | ||
179 | -extern "C" char *__bindtextdomain(const char *domainname, | ||
180 | - const char *dirname); | ||
181 | -#else | ||
182 | -#undef __textdomain | ||
183 | -#undef __bindtextdomain | ||
184 | -#define __textdomain(D) ((void)0) | ||
185 | -#define __bindtextdomain(D,P) ((void)0) | ||
186 | +#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
187 | +#undef textdomain | ||
188 | +#undef bindtextdomain | ||
189 | +#define textdomain(D) ((void)0) | ||
190 | +#define bindtextdomain(D,P) ((void)0) | ||
191 | #endif | ||
192 | |||
193 | // Non-virtual member functions. | ||
194 | @@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname, | ||
195 | messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | ||
196 | const char* __dir) const | ||
197 | { | ||
198 | - __bindtextdomain(__s.c_str(), __dir); | ||
199 | + bindtextdomain(__s.c_str(), __dir); | ||
200 | return this->do_open(__s, __loc); | ||
201 | } | ||
202 | |||
203 | @@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname, | ||
204 | { | ||
205 | // No error checking is done, assume the catalog exists and can | ||
206 | // be used. | ||
207 | - __textdomain(__s.c_str()); | ||
208 | + textdomain(__s.c_str()); | ||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
213 | index aa52731..2e6f80a 100644 | ||
214 | --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
215 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
216 | @@ -43,10 +43,6 @@ | ||
217 | #warning tailor for stub locale support | ||
218 | #endif | ||
219 | |||
220 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
221 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
222 | -#endif | ||
223 | - | ||
224 | namespace std | ||
225 | { | ||
226 | // Construct and return valid pattern consisting of some combination of: | ||
227 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
228 | index 883ec1a..2c70642 100644 | ||
229 | --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
230 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
231 | @@ -41,9 +41,6 @@ | ||
232 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
233 | #warning tailor for stub locale support | ||
234 | #endif | ||
235 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
236 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
237 | -#endif | ||
238 | |||
239 | namespace std | ||
240 | { | ||
241 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
242 | index e0707d7..d848ed5 100644 | ||
243 | --- a/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
244 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
245 | @@ -40,9 +40,6 @@ | ||
246 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
247 | #warning tailor for stub locale support | ||
248 | #endif | ||
249 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
250 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
251 | -#endif | ||
252 | |||
253 | namespace std | ||
254 | { | ||
255 | -- | ||
256 | 1.7.10.4 | ||
257 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0006-uclibc-locale-wchar_fix.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0006-uclibc-locale-wchar_fix.patch new file mode 100644 index 0000000..3406859 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0006-uclibc-locale-wchar_fix.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 225511a3aeb193a916b3999f0b640a392caa67cd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:45:57 +0400 | ||
4 | Subject: [PATCH 06/35] uclibc-locale-wchar_fix | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++-- | ||
11 | libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++ | ||
12 | 2 files changed, 15 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
15 | index 2e6f80a..31ebb9f 100644 | ||
16 | --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
17 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
18 | @@ -401,7 +401,7 @@ namespace std | ||
19 | # ifdef __UCLIBC_HAS_XLOCALE__ | ||
20 | _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
21 | _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
22 | -# else | ||
23 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
24 | _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
25 | _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
26 | # endif | ||
27 | @@ -556,7 +556,7 @@ namespace std | ||
28 | # ifdef __UCLIBC_HAS_XLOCALE__ | ||
29 | _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
30 | _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
31 | -# else | ||
32 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
33 | _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
34 | _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
35 | # endif | ||
36 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
37 | index 2c70642..d5c8961 100644 | ||
38 | --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
39 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
40 | @@ -127,12 +127,25 @@ namespace std | ||
41 | { | ||
42 | // Named locale. | ||
43 | // NB: In the GNU model wchar_t is always 32 bit wide. | ||
44 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
45 | +#warning fix this... should be numeric | ||
46 | +#endif | ||
47 | +#ifdef __UCLIBC__ | ||
48 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
49 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
50 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
51 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
52 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
53 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
54 | +# endif | ||
55 | +#else | ||
56 | union { char *__s; wchar_t __w; } __u; | ||
57 | __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); | ||
58 | _M_data->_M_decimal_point = __u.__w; | ||
59 | |||
60 | __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); | ||
61 | _M_data->_M_thousands_sep = __u.__w; | ||
62 | +#endif | ||
63 | |||
64 | if (_M_data->_M_thousands_sep == L'\0') | ||
65 | _M_data->_M_grouping = ""; | ||
66 | -- | ||
67 | 1.7.10.4 | ||
68 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0007-uclibc-locale-update.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0007-uclibc-locale-update.patch new file mode 100644 index 0000000..5851123 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0007-uclibc-locale-update.patch | |||
@@ -0,0 +1,542 @@ | |||
1 | From 6ffe7c46f52d27864c3df3663e16ec9ddee71e8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:46:58 +0400 | ||
4 | Subject: [PATCH 07/35] uclibc-locale-update | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | .../config/locale/uclibc/c++locale_internal.h | 3 + | ||
11 | libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 +++++++++----------- | ||
12 | libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++----- | ||
13 | libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 ++++++++++---- | ||
14 | .../config/locale/uclibc/messages_members.h | 12 ++-- | ||
15 | .../config/locale/uclibc/monetary_members.cc | 34 +++++---- | ||
16 | .../config/locale/uclibc/numeric_members.cc | 5 ++ | ||
17 | libstdc++-v3/config/locale/uclibc/time_members.cc | 18 +++-- | ||
18 | libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++-- | ||
19 | 9 files changed, 158 insertions(+), 98 deletions(-) | ||
20 | |||
21 | diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
22 | index e74fddf..971a6b4 100644 | ||
23 | --- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
24 | +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
25 | @@ -31,6 +31,9 @@ | ||
26 | |||
27 | #include <bits/c++config.h> | ||
28 | #include <clocale> | ||
29 | +#include <cstdlib> | ||
30 | +#include <cstring> | ||
31 | +#include <cstddef> | ||
32 | |||
33 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
34 | #warning clean this up | ||
35 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
36 | index 21430d0..1b9d8e1 100644 | ||
37 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
38 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
39 | @@ -39,23 +39,20 @@ | ||
40 | #include <langinfo.h> | ||
41 | #include <bits/c++locale_internal.h> | ||
42 | |||
43 | -namespace std | ||
44 | -{ | ||
45 | +_GLIBCXX_BEGIN_NAMESPACE(std) | ||
46 | + | ||
47 | template<> | ||
48 | void | ||
49 | __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, | ||
50 | const __c_locale& __cloc) | ||
51 | { | ||
52 | - if (!(__err & ios_base::failbit)) | ||
53 | - { | ||
54 | - char* __sanity; | ||
55 | - errno = 0; | ||
56 | - float __f = __strtof_l(__s, &__sanity, __cloc); | ||
57 | - if (__sanity != __s && errno != ERANGE) | ||
58 | - __v = __f; | ||
59 | - else | ||
60 | - __err |= ios_base::failbit; | ||
61 | - } | ||
62 | + char* __sanity; | ||
63 | + errno = 0; | ||
64 | + float __f = __strtof_l(__s, &__sanity, __cloc); | ||
65 | + if (__sanity != __s && errno != ERANGE) | ||
66 | + __v = __f; | ||
67 | + else | ||
68 | + __err |= ios_base::failbit; | ||
69 | } | ||
70 | |||
71 | template<> | ||
72 | @@ -63,16 +60,13 @@ namespace std | ||
73 | __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, | ||
74 | const __c_locale& __cloc) | ||
75 | { | ||
76 | - if (!(__err & ios_base::failbit)) | ||
77 | - { | ||
78 | - char* __sanity; | ||
79 | - errno = 0; | ||
80 | - double __d = __strtod_l(__s, &__sanity, __cloc); | ||
81 | - if (__sanity != __s && errno != ERANGE) | ||
82 | - __v = __d; | ||
83 | - else | ||
84 | - __err |= ios_base::failbit; | ||
85 | - } | ||
86 | + char* __sanity; | ||
87 | + errno = 0; | ||
88 | + double __d = __strtod_l(__s, &__sanity, __cloc); | ||
89 | + if (__sanity != __s && errno != ERANGE) | ||
90 | + __v = __d; | ||
91 | + else | ||
92 | + __err |= ios_base::failbit; | ||
93 | } | ||
94 | |||
95 | template<> | ||
96 | @@ -80,16 +74,13 @@ namespace std | ||
97 | __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, | ||
98 | const __c_locale& __cloc) | ||
99 | { | ||
100 | - if (!(__err & ios_base::failbit)) | ||
101 | - { | ||
102 | - char* __sanity; | ||
103 | - errno = 0; | ||
104 | - long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
105 | - if (__sanity != __s && errno != ERANGE) | ||
106 | - __v = __ld; | ||
107 | - else | ||
108 | - __err |= ios_base::failbit; | ||
109 | - } | ||
110 | + char* __sanity; | ||
111 | + errno = 0; | ||
112 | + long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
113 | + if (__sanity != __s && errno != ERANGE) | ||
114 | + __v = __ld; | ||
115 | + else | ||
116 | + __err |= ios_base::failbit; | ||
117 | } | ||
118 | |||
119 | void | ||
120 | @@ -110,17 +101,18 @@ namespace std | ||
121 | void | ||
122 | locale::facet::_S_destroy_c_locale(__c_locale& __cloc) | ||
123 | { | ||
124 | - if (_S_get_c_locale() != __cloc) | ||
125 | + if (__cloc && _S_get_c_locale() != __cloc) | ||
126 | __freelocale(__cloc); | ||
127 | } | ||
128 | |||
129 | __c_locale | ||
130 | locale::facet::_S_clone_c_locale(__c_locale& __cloc) | ||
131 | { return __duplocale(__cloc); } | ||
132 | -} // namespace std | ||
133 | |||
134 | -namespace __gnu_cxx | ||
135 | -{ | ||
136 | +_GLIBCXX_END_NAMESPACE | ||
137 | + | ||
138 | +_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) | ||
139 | + | ||
140 | const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = | ||
141 | { | ||
142 | "LC_CTYPE", | ||
143 | @@ -138,9 +130,11 @@ namespace __gnu_cxx | ||
144 | "LC_IDENTIFICATION" | ||
145 | #endif | ||
146 | }; | ||
147 | -} | ||
148 | |||
149 | -namespace std | ||
150 | -{ | ||
151 | +_GLIBCXX_END_NAMESPACE | ||
152 | + | ||
153 | +_GLIBCXX_BEGIN_NAMESPACE(std) | ||
154 | + | ||
155 | const char* const* const locale::_S_categories = __gnu_cxx::category_names; | ||
156 | -} // namespace std | ||
157 | + | ||
158 | +_GLIBCXX_END_NAMESPACE | ||
159 | diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
160 | index 4bca5f1..64a6d46 100644 | ||
161 | --- a/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
162 | +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
163 | @@ -39,21 +39,23 @@ | ||
164 | #pragma GCC system_header | ||
165 | |||
166 | #include <cstring> // get std::strlen | ||
167 | -#include <cstdio> // get std::snprintf or std::sprintf | ||
168 | +#include <cstdio> // get std::vsnprintf or std::vsprintf | ||
169 | #include <clocale> | ||
170 | #include <langinfo.h> // For codecvt | ||
171 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
172 | #warning fix this | ||
173 | #endif | ||
174 | -#ifdef __UCLIBC_HAS_LOCALE__ | ||
175 | +#ifdef _GLIBCXX_USE_ICONV | ||
176 | #include <iconv.h> // For codecvt using iconv, iconv_t | ||
177 | #endif | ||
178 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
179 | -#include <libintl.h> // For messages | ||
180 | +#ifdef HAVE_LIBINTL_H | ||
181 | +#include <libintl.h> // For messages | ||
182 | #endif | ||
183 | +#include <cstdarg> | ||
184 | |||
185 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
186 | #warning what is _GLIBCXX_C_LOCALE_GNU for | ||
187 | +// psm: used in os/gnu-linux/ctype_noninline.h | ||
188 | #endif | ||
189 | #define _GLIBCXX_C_LOCALE_GNU 1 | ||
190 | |||
191 | @@ -78,23 +80,25 @@ namespace std | ||
192 | #else | ||
193 | typedef int* __c_locale; | ||
194 | #endif | ||
195 | - | ||
196 | - // Convert numeric value of type _Tv to string and return length of | ||
197 | - // string. If snprintf is available use it, otherwise fall back to | ||
198 | - // the unsafe sprintf which, in general, can be dangerous and should | ||
199 | + // Convert numeric value of type double to string and return length of | ||
200 | + // string. If vsnprintf is available use it, otherwise fall back to | ||
201 | + // the unsafe vsprintf which, in general, can be dangerous and should | ||
202 | // be avoided. | ||
203 | - template<typename _Tv> | ||
204 | - int | ||
205 | - __convert_from_v(char* __out, | ||
206 | - const int __size __attribute__ ((__unused__)), | ||
207 | - const char* __fmt, | ||
208 | -#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
209 | - _Tv __v, const __c_locale& __cloc, int __prec) | ||
210 | + inline int | ||
211 | + __convert_from_v(const __c_locale& | ||
212 | +#ifndef __UCLIBC_HAS_XCLOCALE__ | ||
213 | + __cloc __attribute__ ((__unused__)) | ||
214 | +#endif | ||
215 | + , | ||
216 | + char* __out, | ||
217 | + const int __size, | ||
218 | + const char* __fmt, ...) | ||
219 | { | ||
220 | + va_list __args; | ||
221 | +#ifdef __UCLIBC_HAS_XCLOCALE__ | ||
222 | + | ||
223 | __c_locale __old = __gnu_cxx::__uselocale(__cloc); | ||
224 | #else | ||
225 | - _Tv __v, const __c_locale&, int __prec) | ||
226 | - { | ||
227 | # ifdef __UCLIBC_HAS_LOCALE__ | ||
228 | char* __old = std::setlocale(LC_ALL, NULL); | ||
229 | char* __sav = new char[std::strlen(__old) + 1]; | ||
230 | @@ -103,7 +107,9 @@ namespace std | ||
231 | # endif | ||
232 | #endif | ||
233 | |||
234 | - const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | ||
235 | + va_start(__args, __fmt); | ||
236 | + const int __ret = std::vsnprintf(__out, __size, __fmt, __args); | ||
237 | + va_end(__args); | ||
238 | |||
239 | #ifdef __UCLIBC_HAS_XCLOCALE__ | ||
240 | __gnu_cxx::__uselocale(__old); | ||
241 | diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
242 | index 7b12861..13e011d 100644 | ||
243 | --- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
244 | +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
245 | @@ -33,16 +33,20 @@ | ||
246 | |||
247 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
248 | |||
249 | +#include <features.h> | ||
250 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
251 | #define _LIBC | ||
252 | #include <locale> | ||
253 | #undef _LIBC | ||
254 | +#else | ||
255 | +#include <locale> | ||
256 | +#endif | ||
257 | #include <bits/c++locale_internal.h> | ||
258 | |||
259 | -namespace std | ||
260 | -{ | ||
261 | +_GLIBCXX_BEGIN_NAMESPACE(std) | ||
262 | + | ||
263 | // NB: The other ctype<char> specializations are in src/locale.cc and | ||
264 | // various /config/os/* files. | ||
265 | - template<> | ||
266 | ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) | ||
267 | : ctype<char>(0, false, __refs) | ||
268 | { | ||
269 | @@ -57,6 +61,8 @@ namespace std | ||
270 | #endif | ||
271 | } | ||
272 | } | ||
273 | + ctype_byname<char>::~ctype_byname() | ||
274 | + { } | ||
275 | |||
276 | #ifdef _GLIBCXX_USE_WCHAR_T | ||
277 | ctype<wchar_t>::__wmask_type | ||
278 | @@ -138,17 +144,33 @@ namespace std | ||
279 | ctype<wchar_t>:: | ||
280 | do_is(mask __m, wchar_t __c) const | ||
281 | { | ||
282 | - // Highest bitmask in ctype_base == 10, but extra in "C" | ||
283 | - // library for blank. | ||
284 | + // The case of __m == ctype_base::space is particularly important, | ||
285 | + // due to its use in many istream functions. Therefore we deal with | ||
286 | + // it first, exploiting the knowledge that on GNU systems _M_bit[5] | ||
287 | + // is the mask corresponding to ctype_base::space. NB: an encoding | ||
288 | + // change would not affect correctness! | ||
289 | + | ||
290 | bool __ret = false; | ||
291 | - const size_t __bitmasksize = 11; | ||
292 | - for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
293 | - if (__m & _M_bit[__bitcur] | ||
294 | - && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
295 | - { | ||
296 | - __ret = true; | ||
297 | - break; | ||
298 | - } | ||
299 | + if (__m == _M_bit[5]) | ||
300 | + __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); | ||
301 | + else | ||
302 | + { | ||
303 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
304 | + // library for blank. | ||
305 | + const size_t __bitmasksize = 11; | ||
306 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
307 | + if (__m & _M_bit[__bitcur]) | ||
308 | + { | ||
309 | + if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
310 | + { | ||
311 | + __ret = true; | ||
312 | + break; | ||
313 | + } | ||
314 | + else if (__m == _M_bit[__bitcur]) | ||
315 | + break; | ||
316 | + } | ||
317 | + } | ||
318 | + | ||
319 | return __ret; | ||
320 | } | ||
321 | |||
322 | @@ -290,4 +312,5 @@ namespace std | ||
323 | #endif | ||
324 | } | ||
325 | #endif // _GLIBCXX_USE_WCHAR_T | ||
326 | -} | ||
327 | + | ||
328 | +_GLIBCXX_END_NAMESPACE | ||
329 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
330 | index d89da33..067657a 100644 | ||
331 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
332 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
333 | @@ -53,12 +53,16 @@ | ||
334 | template<typename _CharT> | ||
335 | messages<_CharT>::messages(__c_locale __cloc, const char* __s, | ||
336 | size_t __refs) | ||
337 | - : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), | ||
338 | - _M_name_messages(__s) | ||
339 | + : facet(__refs), _M_c_locale_messages(NULL), | ||
340 | + _M_name_messages(NULL) | ||
341 | { | ||
342 | - char* __tmp = new char[std::strlen(__s) + 1]; | ||
343 | - std::strcpy(__tmp, __s); | ||
344 | + const size_t __len = std::strlen(__s) + 1; | ||
345 | + char* __tmp = new char[__len]; | ||
346 | + std::memcpy(__tmp, __s, __len); | ||
347 | _M_name_messages = __tmp; | ||
348 | + | ||
349 | + // Last to avoid leaking memory if new throws. | ||
350 | + _M_c_locale_messages = _S_clone_c_locale(__cloc); | ||
351 | } | ||
352 | |||
353 | template<typename _CharT> | ||
354 | diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
355 | index 31ebb9f..7679b9c 100644 | ||
356 | --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
357 | +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
358 | @@ -33,9 +33,14 @@ | ||
359 | |||
360 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
361 | |||
362 | +#include <features.h> | ||
363 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
364 | #define _LIBC | ||
365 | #include <locale> | ||
366 | #undef _LIBC | ||
367 | +#else | ||
368 | +#include <locale> | ||
369 | +#endif | ||
370 | #include <bits/c++locale_internal.h> | ||
371 | |||
372 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
373 | @@ -206,7 +211,7 @@ namespace std | ||
374 | } | ||
375 | break; | ||
376 | default: | ||
377 | - ; | ||
378 | + __ret = pattern(); | ||
379 | } | ||
380 | return __ret; | ||
381 | } | ||
382 | @@ -390,7 +395,9 @@ namespace std | ||
383 | __c_locale __old = __uselocale(__cloc); | ||
384 | #else | ||
385 | // Switch to named locale so that mbsrtowcs will work. | ||
386 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
387 | + char* __old = setlocale(LC_ALL, NULL); | ||
388 | + const size_t __llen = strlen(__old) + 1; | ||
389 | + char* __sav = new char[__llen]; | ||
390 | setlocale(LC_ALL, __name); | ||
391 | #endif | ||
392 | |||
393 | @@ -477,8 +484,8 @@ namespace std | ||
394 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
395 | __uselocale(__old); | ||
396 | #else | ||
397 | - setlocale(LC_ALL, __old); | ||
398 | - free(__old); | ||
399 | + setlocale(LC_ALL, __sav); | ||
400 | + delete [] __sav; | ||
401 | #endif | ||
402 | __throw_exception_again; | ||
403 | } | ||
404 | @@ -498,8 +505,8 @@ namespace std | ||
405 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
406 | __uselocale(__old); | ||
407 | #else | ||
408 | - setlocale(LC_ALL, __old); | ||
409 | - free(__old); | ||
410 | + setlocale(LC_ALL, __sav); | ||
411 | + delete [] __sav; | ||
412 | #endif | ||
413 | } | ||
414 | } | ||
415 | @@ -545,8 +552,11 @@ namespace std | ||
416 | __c_locale __old = __uselocale(__cloc); | ||
417 | #else | ||
418 | // Switch to named locale so that mbsrtowcs will work. | ||
419 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
420 | - setlocale(LC_ALL, __name); | ||
421 | + char* __old = setlocale(LC_ALL, NULL); | ||
422 | + const size_t __llen = strlen(__old) + 1; | ||
423 | + char* __sav = new char[__llen]; | ||
424 | + memcpy(__sav, __old, __llen); | ||
425 | + setlocale(LC_ALL, __name); | ||
426 | #endif | ||
427 | |||
428 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
429 | @@ -633,8 +643,8 @@ namespace std | ||
430 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
431 | __uselocale(__old); | ||
432 | #else | ||
433 | - setlocale(LC_ALL, __old); | ||
434 | - free(__old); | ||
435 | + setlocale(LC_ALL, __sav); | ||
436 | + delete [] __sav; | ||
437 | #endif | ||
438 | __throw_exception_again; | ||
439 | } | ||
440 | @@ -653,8 +663,8 @@ namespace std | ||
441 | #ifdef __UCLIBC_HAS_XLOCALE__ | ||
442 | __uselocale(__old); | ||
443 | #else | ||
444 | - setlocale(LC_ALL, __old); | ||
445 | - free(__old); | ||
446 | + setlocale(LC_ALL, __sav); | ||
447 | + delete [] __sav; | ||
448 | #endif | ||
449 | } | ||
450 | } | ||
451 | diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
452 | index d5c8961..8ae8969 100644 | ||
453 | --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
454 | +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
455 | @@ -33,9 +33,14 @@ | ||
456 | |||
457 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
458 | |||
459 | +#include <features.h> | ||
460 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
461 | #define _LIBC | ||
462 | #include <locale> | ||
463 | #undef _LIBC | ||
464 | +#else | ||
465 | +#include <locale> | ||
466 | +#endif | ||
467 | #include <bits/c++locale_internal.h> | ||
468 | |||
469 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
470 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
471 | index d848ed5..f24d53e 100644 | ||
472 | --- a/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
473 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
474 | @@ -53,11 +53,14 @@ namespace std | ||
475 | const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, | ||
476 | _M_c_locale_timepunct); | ||
477 | #else | ||
478 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
479 | + char* __old = setlocale(LC_ALL, NULL); | ||
480 | + const size_t __llen = strlen(__old) + 1; | ||
481 | + char* __sav = new char[__llen]; | ||
482 | + memcpy(__sav, __old, __llen); | ||
483 | setlocale(LC_ALL, _M_name_timepunct); | ||
484 | const size_t __len = strftime(__s, __maxlen, __format, __tm); | ||
485 | - setlocale(LC_ALL, __old); | ||
486 | - free(__old); | ||
487 | + setlocale(LC_ALL, __sav); | ||
488 | + delete [] __sav; | ||
489 | #endif | ||
490 | // Make sure __s is null terminated. | ||
491 | if (__len == 0) | ||
492 | @@ -207,11 +210,14 @@ namespace std | ||
493 | const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, | ||
494 | _M_c_locale_timepunct); | ||
495 | #else | ||
496 | - char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
497 | + char* __old = setlocale(LC_ALL, NULL); | ||
498 | + const size_t __llen = strlen(__old) + 1; | ||
499 | + char* __sav = new char[__llen]; | ||
500 | + memcpy(__sav, __old, __llen); | ||
501 | setlocale(LC_ALL, _M_name_timepunct); | ||
502 | const size_t __len = wcsftime(__s, __maxlen, __format, __tm); | ||
503 | - setlocale(LC_ALL, __old); | ||
504 | - free(__old); | ||
505 | + setlocale(LC_ALL, __sav); | ||
506 | + delete [] __sav; | ||
507 | #endif | ||
508 | // Make sure __s is null terminated. | ||
509 | if (__len == 0) | ||
510 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
511 | index ba8e858..1665dde 100644 | ||
512 | --- a/libstdc++-v3/config/locale/uclibc/time_members.h | ||
513 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
514 | @@ -50,12 +50,21 @@ | ||
515 | __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | ||
516 | size_t __refs) | ||
517 | : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
518 | - _M_name_timepunct(__s) | ||
519 | + _M_name_timepunct(NULL) | ||
520 | { | ||
521 | - char* __tmp = new char[std::strlen(__s) + 1]; | ||
522 | - std::strcpy(__tmp, __s); | ||
523 | + const size_t __len = std::strlen(__s) + 1; | ||
524 | + char* __tmp = new char[__len]; | ||
525 | + std::memcpy(__tmp, __s, __len); | ||
526 | _M_name_timepunct = __tmp; | ||
527 | - _M_initialize_timepunct(__cloc); | ||
528 | + | ||
529 | + try | ||
530 | + { _M_initialize_timepunct(__cloc); } | ||
531 | + catch(...) | ||
532 | + { | ||
533 | + delete [] _M_name_timepunct; | ||
534 | + __throw_exception_again; | ||
535 | + } | ||
536 | + | ||
537 | } | ||
538 | |||
539 | template<typename _CharT> | ||
540 | -- | ||
541 | 1.7.10.4 | ||
542 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0008-missing-execinfo_h.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0008-missing-execinfo_h.patch new file mode 100644 index 0000000..2823809 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0008-missing-execinfo_h.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 9f2158451981cf0a80cfabdc79ae31bb6976a801 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:48:10 +0400 | ||
4 | Subject: [PATCH 08/35] missing-execinfo_h | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | boehm-gc/include/gc.h | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h | ||
14 | index c51e017..a7ba8dc 100644 | ||
15 | --- a/boehm-gc/include/gc.h | ||
16 | +++ b/boehm-gc/include/gc.h | ||
17 | @@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); | ||
18 | #if defined(__linux__) || defined(__GLIBC__) | ||
19 | # include <features.h> | ||
20 | # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ | ||
21 | - && !defined(__ia64__) | ||
22 | + && !defined(__ia64__) && !defined(__UCLIBC__) | ||
23 | # ifndef GC_HAVE_BUILTIN_BACKTRACE | ||
24 | # define GC_HAVE_BUILTIN_BACKTRACE | ||
25 | # endif | ||
26 | -- | ||
27 | 1.7.10.4 | ||
28 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0009-c99-snprintf.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0009-c99-snprintf.patch new file mode 100644 index 0000000..7168778 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0009-c99-snprintf.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From e393e076f1ab82d25e1aa04d6edea27b41d3eb06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:49:03 +0400 | ||
4 | Subject: [PATCH 09/35] c99-snprintf | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/include/c_std/cstdio | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio | ||
14 | index e85bd83..6af839a 100644 | ||
15 | --- a/libstdc++-v3/include/c_std/cstdio | ||
16 | +++ b/libstdc++-v3/include/c_std/cstdio | ||
17 | @@ -139,7 +139,7 @@ namespace std | ||
18 | using ::vsprintf; | ||
19 | } // namespace std | ||
20 | |||
21 | -#if _GLIBCXX_USE_C99 | ||
22 | +#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) | ||
23 | |||
24 | #undef snprintf | ||
25 | #undef vfscanf | ||
26 | -- | ||
27 | 1.7.10.4 | ||
28 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0010-c99-complex-ugly-hack.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0010-c99-complex-ugly-hack.patch new file mode 100644 index 0000000..b628571 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0010-c99-complex-ugly-hack.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 73f69d806e2c9561a54995223431a1076cfd6164 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:49:57 +0400 | ||
4 | Subject: [PATCH 10/35] c99-complex-ugly-hack | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | --- | ||
10 | libstdc++-v3/configure | 3 +++ | ||
11 | 1 file changed, 3 insertions(+) | ||
12 | |||
13 | diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure | ||
14 | index c57a751..a1333e2 100755 | ||
15 | --- a/libstdc++-v3/configure | ||
16 | +++ b/libstdc++-v3/configure | ||
17 | @@ -18734,6 +18734,9 @@ $as_echo_n "checking for ISO C99 support to TR1 in <complex.h>... " >&6; } | ||
18 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
19 | /* end confdefs.h. */ | ||
20 | #include <complex.h> | ||
21 | +#ifdef __UCLIBC__ | ||
22 | +#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs | ||
23 | +#endif | ||
24 | int | ||
25 | main () | ||
26 | { | ||
27 | -- | ||
28 | 1.7.10.4 | ||
29 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0011-index_macro.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0011-index_macro.patch new file mode 100644 index 0000000..8ee79b0 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0011-index_macro.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From b037953e40312b45ab84ed0a3ad882bb5e413101 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:51:02 +0400 | ||
4 | Subject: [PATCH 11/35] index_macro | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/include/ext/rope | 3 +++ | ||
11 | libstdc++-v3/include/ext/ropeimpl.h | 3 +++ | ||
12 | 2 files changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope | ||
15 | index 38eb1e8..158d21a 100644 | ||
16 | --- a/libstdc++-v3/include/ext/rope | ||
17 | +++ b/libstdc++-v3/include/ext/rope | ||
18 | @@ -55,6 +55,9 @@ | ||
19 | #include <bits/gthr.h> | ||
20 | #include <tr1/functional> | ||
21 | |||
22 | +/* cope w/ index defined as macro, SuSv3 proposal */ | ||
23 | +#undef index | ||
24 | + | ||
25 | # ifdef __GC | ||
26 | # define __GC_CONST const | ||
27 | # else | ||
28 | diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h | ||
29 | index d7b5cbd..b9b3acb 100644 | ||
30 | --- a/libstdc++-v3/include/ext/ropeimpl.h | ||
31 | +++ b/libstdc++-v3/include/ext/ropeimpl.h | ||
32 | @@ -48,6 +48,9 @@ | ||
33 | #include <ext/memory> // For uninitialized_copy_n | ||
34 | #include <ext/numeric> // For power | ||
35 | |||
36 | +/* cope w/ index defined as macro, SuSv3 proposal */ | ||
37 | +#undef index | ||
38 | + | ||
39 | namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) | ||
40 | { | ||
41 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
42 | -- | ||
43 | 1.7.10.4 | ||
44 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0013-libstdc-namespace.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0013-libstdc-namespace.patch new file mode 100644 index 0000000..4a3efde --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0013-libstdc-namespace.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 104e4d66208f2726b14d2f5eebce90700cbc83c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:54:02 +0400 | ||
4 | Subject: [PATCH 13/35] libstdc++-namespace | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | libstdc++-v3/config/locale/uclibc/messages_members.h | 4 +++- | ||
11 | libstdc++-v3/config/locale/uclibc/time_members.h | 4 +++- | ||
12 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
15 | index 067657a..dd76a6c 100644 | ||
16 | --- a/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
17 | +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
18 | @@ -32,7 +32,8 @@ | ||
19 | // | ||
20 | |||
21 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
22 | - | ||
23 | +namespace std | ||
24 | +{ | ||
25 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
26 | #warning fix prototypes for *textdomain funcs | ||
27 | #endif | ||
28 | @@ -116,3 +117,4 @@ | ||
29 | this->_S_create_c_locale(this->_M_c_locale_messages, __s); | ||
30 | } | ||
31 | } | ||
32 | +} | ||
33 | diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
34 | index 1665dde..905c433 100644 | ||
35 | --- a/libstdc++-v3/config/locale/uclibc/time_members.h | ||
36 | +++ b/libstdc++-v3/config/locale/uclibc/time_members.h | ||
37 | @@ -33,7 +33,8 @@ | ||
38 | // | ||
39 | |||
40 | // Written by Benjamin Kosnik <bkoz@redhat.com> | ||
41 | - | ||
42 | +namespace std | ||
43 | +{ | ||
44 | template<typename _CharT> | ||
45 | __timepunct<_CharT>::__timepunct(size_t __refs) | ||
46 | : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
47 | @@ -75,3 +76,4 @@ | ||
48 | delete _M_data; | ||
49 | _S_destroy_c_locale(_M_c_locale_timepunct); | ||
50 | } | ||
51 | +} | ||
52 | -- | ||
53 | 1.7.10.4 | ||
54 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0014-sh-pr24836.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0014-sh-pr24836.patch new file mode 100644 index 0000000..cb8fd52 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0014-sh-pr24836.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From edc9acb181810f234b6b9f7d2820b0e4f6a1eeaf Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:54:48 +0400 | ||
4 | Subject: [PATCH 14/35] sh-pr24836 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 | ||
11 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 | ||
12 | --- | ||
13 | gcc/configure | 2 +- | ||
14 | gcc/configure.ac | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/gcc/configure b/gcc/configure | ||
18 | index e12a180..135bbf5 100755 | ||
19 | --- a/gcc/configure | ||
20 | +++ b/gcc/configure | ||
21 | @@ -23378,7 +23378,7 @@ foo: .long 25 | ||
22 | tls_first_minor=14 | ||
23 | tls_as_opt="-m64 -Aesame --fatal-warnings" | ||
24 | ;; | ||
25 | - sh-*-* | sh[34]-*-*) | ||
26 | + sh-*-* | sh[34]*-*-*) | ||
27 | conftest_s=' | ||
28 | .section ".tdata","awT",@progbits | ||
29 | foo: .long 25 | ||
30 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
31 | index eba3577..6363a21 100644 | ||
32 | --- a/gcc/configure.ac | ||
33 | +++ b/gcc/configure.ac | ||
34 | @@ -3141,7 +3141,7 @@ foo: .long 25 | ||
35 | tls_first_minor=14 | ||
36 | tls_as_opt="-m64 -Aesame --fatal-warnings" | ||
37 | ;; | ||
38 | - sh-*-* | sh[34]-*-*) | ||
39 | + sh-*-* | sh[34]*-*-*) | ||
40 | conftest_s=' | ||
41 | .section ".tdata","awT",@progbits | ||
42 | foo: .long 25 | ||
43 | -- | ||
44 | 1.7.10.4 | ||
45 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch new file mode 100644 index 0000000..ba0a227 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 50e5366005b0f6af27378e2a5c3cb9f9936a7e62 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:58:36 +0400 | ||
4 | Subject: [PATCH 15/35] arm: Use TARGET_ENDIAN_OPTION for determining | ||
5 | MULTILIB_DEFAULTS | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | --- | ||
11 | gcc/config/arm/linux-elf.h | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | Index: gcc-4.9-20140316/gcc/config/arm/coff.h | ||
15 | =================================================================== | ||
16 | --- gcc-4.9-20140316.orig/gcc/config/arm/coff.h | ||
17 | +++ gcc-4.9-20140316/gcc/config/arm/coff.h | ||
18 | @@ -33,7 +33,7 @@ | ||
19 | |||
20 | #ifndef MULTILIB_DEFAULTS | ||
21 | #define MULTILIB_DEFAULTS \ | ||
22 | - { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" } | ||
23 | + { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork" } | ||
24 | #endif | ||
25 | |||
26 | /* This is COFF, but prefer stabs. */ | ||
27 | Index: gcc-4.9-20140316/gcc/config/arm/elf.h | ||
28 | =================================================================== | ||
29 | --- gcc-4.9-20140316.orig/gcc/config/arm/elf.h | ||
30 | +++ gcc-4.9-20140316/gcc/config/arm/elf.h | ||
31 | @@ -112,7 +112,7 @@ | ||
32 | |||
33 | #ifndef MULTILIB_DEFAULTS | ||
34 | #define MULTILIB_DEFAULTS \ | ||
35 | - { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" } | ||
36 | + { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" } | ||
37 | #endif | ||
38 | |||
39 | #define TARGET_ASM_FILE_START_APP_OFF true | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0016-gcc-poison-system-directories.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0016-gcc-poison-system-directories.patch new file mode 100644 index 0000000..475ef96 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0016-gcc-poison-system-directories.patch | |||
@@ -0,0 +1,190 @@ | |||
1 | From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:59:00 +0400 | ||
4 | Subject: [PATCH 16/35] gcc: poison-system-directories | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [distribution: codesourcery] | ||
9 | --- | ||
10 | gcc/Makefile.in | 2 +- | ||
11 | gcc/common.opt | 4 ++++ | ||
12 | gcc/config.in | 6 ++++++ | ||
13 | gcc/configure | 20 ++++++++++++++++++-- | ||
14 | gcc/configure.ac | 10 ++++++++++ | ||
15 | gcc/doc/invoke.texi | 9 +++++++++ | ||
16 | gcc/gcc.c | 2 ++ | ||
17 | gcc/incpath.c | 19 +++++++++++++++++++ | ||
18 | 8 files changed, 69 insertions(+), 3 deletions(-) | ||
19 | |||
20 | Index: gcc-4.9-20140316/gcc/common.opt | ||
21 | =================================================================== | ||
22 | --- gcc-4.9-20140316.orig/gcc/common.opt | ||
23 | +++ gcc-4.9-20140316/gcc/common.opt | ||
24 | @@ -603,6 +603,10 @@ Wpedantic | ||
25 | Common Var(pedantic) Warning | ||
26 | Issue warnings needed for strict compliance to the standard | ||
27 | |||
28 | +Wpoison-system-directories | ||
29 | +Common Var(flag_poison_system_directories) Init(1) Warning | ||
30 | +Warn for -I and -L options using system directories if cross compiling | ||
31 | + | ||
32 | Wshadow | ||
33 | Common Var(warn_shadow) Warning | ||
34 | Warn when one local variable shadows another | ||
35 | Index: gcc-4.9-20140316/gcc/config.in | ||
36 | =================================================================== | ||
37 | --- gcc-4.9-20140316.orig/gcc/config.in | ||
38 | +++ gcc-4.9-20140316/gcc/config.in | ||
39 | @@ -138,6 +138,12 @@ | ||
40 | #endif | ||
41 | |||
42 | |||
43 | +/* Define to warn for use of native system header directories */ | ||
44 | +#ifndef USED_FOR_TARGET | ||
45 | +#undef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
46 | +#endif | ||
47 | + | ||
48 | + | ||
49 | /* Define if you want all operations on RTL (the basic data structure of the | ||
50 | optimizer and back end) to be checked for dynamic type safety at runtime. | ||
51 | This is quite expensive. */ | ||
52 | Index: gcc-4.9-20140316/gcc/configure | ||
53 | =================================================================== | ||
54 | --- gcc-4.9-20140316.orig/gcc/configure | ||
55 | +++ gcc-4.9-20140316/gcc/configure | ||
56 | @@ -928,6 +928,7 @@ with_system_zlib | ||
57 | enable_maintainer_mode | ||
58 | enable_link_mutex | ||
59 | enable_version_specific_runtime_libs | ||
60 | +enable_poison_system_directories | ||
61 | enable_plugin | ||
62 | enable_host_shared | ||
63 | enable_libquadmath_support | ||
64 | @@ -1648,6 +1649,8 @@ Optional Features: | ||
65 | --enable-version-specific-runtime-libs | ||
66 | specify that runtime libraries should be installed | ||
67 | in a compiler-specific directory | ||
68 | + --enable-poison-system-directories | ||
69 | + warn for use of native system header directories | ||
70 | --enable-plugin enable plugin support | ||
71 | --enable-host-shared build host code as shared libraries | ||
72 | --disable-libquadmath-support | ||
73 | @@ -27702,6 +27705,19 @@ if test "${enable_version_specific_runti | ||
74 | fi | ||
75 | |||
76 | |||
77 | +# Check whether --enable-poison-system-directories was given. | ||
78 | +if test "${enable_poison_system_directories+set}" = set; then : | ||
79 | + enableval=$enable_poison_system_directories; | ||
80 | +else | ||
81 | + enable_poison_system_directories=no | ||
82 | +fi | ||
83 | + | ||
84 | +if test "x${enable_poison_system_directories}" = "xyes"; then | ||
85 | + | ||
86 | +$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h | ||
87 | + | ||
88 | +fi | ||
89 | + | ||
90 | # Substitute configuration variables | ||
91 | |||
92 | |||
93 | Index: gcc-4.9-20140316/gcc/configure.ac | ||
94 | =================================================================== | ||
95 | --- gcc-4.9-20140316.orig/gcc/configure.ac | ||
96 | +++ gcc-4.9-20140316/gcc/configure.ac | ||
97 | @@ -5366,6 +5366,16 @@ AC_ARG_ENABLE(version-specific-runtime-l | ||
98 | [specify that runtime libraries should be | ||
99 | installed in a compiler-specific directory])]) | ||
100 | |||
101 | +AC_ARG_ENABLE([poison-system-directories], | ||
102 | + AS_HELP_STRING([--enable-poison-system-directories], | ||
103 | + [warn for use of native system header directories]),, | ||
104 | + [enable_poison_system_directories=no]) | ||
105 | +if test "x${enable_poison_system_directories}" = "xyes"; then | ||
106 | + AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], | ||
107 | + [1], | ||
108 | + [Define to warn for use of native system header directories]) | ||
109 | +fi | ||
110 | + | ||
111 | # Substitute configuration variables | ||
112 | AC_SUBST(subdirs) | ||
113 | AC_SUBST(srcdir) | ||
114 | Index: gcc-4.9-20140316/gcc/doc/invoke.texi | ||
115 | =================================================================== | ||
116 | --- gcc-4.9-20140316.orig/gcc/doc/invoke.texi | ||
117 | +++ gcc-4.9-20140316/gcc/doc/invoke.texi | ||
118 | @@ -260,6 +260,7 @@ Objective-C and Objective-C++ Dialects}. | ||
119 | -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol | ||
120 | -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol | ||
121 | -Wpointer-arith -Wno-pointer-to-int-cast @gol | ||
122 | +-Wno-poison-system-directories @gol | ||
123 | -Wredundant-decls -Wno-return-local-addr @gol | ||
124 | -Wreturn-type -Wsequence-point -Wshadow @gol | ||
125 | -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol | ||
126 | @@ -4230,6 +4231,14 @@ headers---for that, @option{-Wunknown-pr | ||
127 | for most targets, it is made up of code and thus requires the stack | ||
128 | to be made executable in order for the program to work properly. | ||
129 | |||
130 | +@item -Wno-poison-system-directories | ||
131 | +@opindex Wno-poison-system-directories | ||
132 | +Do not warn for @option{-I} or @option{-L} options using system | ||
133 | +directories such as @file{/usr/include} when cross compiling. This | ||
134 | +option is intended for use in chroot environments when such | ||
135 | +directories contain the correct headers and libraries for the target | ||
136 | +system rather than the host. | ||
137 | + | ||
138 | @item -Wfloat-equal | ||
139 | @opindex Wfloat-equal | ||
140 | @opindex Wno-float-equal | ||
141 | Index: gcc-4.9-20140316/gcc/gcc.c | ||
142 | =================================================================== | ||
143 | --- gcc-4.9-20140316.orig/gcc/gcc.c | ||
144 | +++ gcc-4.9-20140316/gcc/gcc.c | ||
145 | @@ -764,6 +764,8 @@ proper position among the other output f | ||
146 | "%{fuse-ld=*:-fuse-ld=%*}\ | ||
147 | %X %{o*} %{e*} %{N} %{n} %{r}\ | ||
148 | %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ | ||
149 | + %{Wno-poison-system-directories:--no-poison-system-directories}\ | ||
150 | + %{Werror=poison-system-directories:--error-poison-system-directories}\ | ||
151 | %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ | ||
152 | %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ | ||
153 | %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ | ||
154 | Index: gcc-4.9-20140316/gcc/incpath.c | ||
155 | =================================================================== | ||
156 | --- gcc-4.9-20140316.orig/gcc/incpath.c | ||
157 | +++ gcc-4.9-20140316/gcc/incpath.c | ||
158 | @@ -28,6 +28,7 @@ | ||
159 | #include "intl.h" | ||
160 | #include "incpath.h" | ||
161 | #include "cppdefault.h" | ||
162 | +#include "diagnostic-core.h" | ||
163 | |||
164 | /* Microsoft Windows does not natively support inodes. | ||
165 | VMS has non-numeric inodes. */ | ||
166 | @@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo | ||
167 | } | ||
168 | fprintf (stderr, _("End of search list.\n")); | ||
169 | } | ||
170 | + | ||
171 | +#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
172 | + if (flag_poison_system_directories) | ||
173 | + { | ||
174 | + struct cpp_dir *p; | ||
175 | + | ||
176 | + for (p = heads[QUOTE]; p; p = p->next) | ||
177 | + { | ||
178 | + if ((!strncmp (p->name, "/usr/include", 12)) | ||
179 | + || (!strncmp (p->name, "/usr/local/include", 18)) | ||
180 | + || (!strncmp (p->name, "/usr/X11R6/include", 18))) | ||
181 | + warning (OPT_Wpoison_system_directories, | ||
182 | + "include location \"%s\" is unsafe for " | ||
183 | + "cross-compilation", | ||
184 | + p->name); | ||
185 | + } | ||
186 | + } | ||
187 | +#endif | ||
188 | } | ||
189 | |||
190 | /* Use given -I paths for #include "..." but not #include <...>, and | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0017-gcc-poison-dir-extend.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0017-gcc-poison-dir-extend.patch new file mode 100644 index 0000000..9e81efd --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0017-gcc-poison-dir-extend.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From e99c9c97266d6d3e8cac798aa91408250c4d60cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:00:34 +0400 | ||
4 | Subject: [PATCH 17/35] gcc-poison-dir-extend | ||
5 | |||
6 | Add /sw/include and /opt/include based on the original | ||
7 | zecke-no-host-includes.patch patch. The original patch checked for | ||
8 | /usr/include, /sw/include and /opt/include and then triggered a failure and | ||
9 | aborted. | ||
10 | |||
11 | Instead, we add the two missing items to the current scan. If the user | ||
12 | wants this to be a failure, they can add "-Werror=poison-system-directories". | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Pending | ||
18 | --- | ||
19 | gcc/incpath.c | 4 +++- | ||
20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/gcc/incpath.c b/gcc/incpath.c | ||
23 | index cd41c78..eac4a92 100644 | ||
24 | --- a/gcc/incpath.c | ||
25 | +++ b/gcc/incpath.c | ||
26 | @@ -393,7 +393,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) | ||
27 | { | ||
28 | if ((!strncmp (p->name, "/usr/include", 12)) | ||
29 | || (!strncmp (p->name, "/usr/local/include", 18)) | ||
30 | - || (!strncmp (p->name, "/usr/X11R6/include", 18))) | ||
31 | + || (!strncmp (p->name, "/usr/X11R6/include", 18)) | ||
32 | + || (!strncmp (p->name, "/sw/include", 11)) | ||
33 | + || (!strncmp (p->name, "/opt/include", 12))) | ||
34 | warning (OPT_Wpoison_system_directories, | ||
35 | "include location \"%s\" is unsafe for " | ||
36 | "cross-compilation", | ||
37 | -- | ||
38 | 1.7.10.4 | ||
39 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 0000000..a28cafd --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 56207fa2923e8edf774e98ffac82666091076be3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:08:31 +0400 | ||
4 | Subject: [PATCH 18/35] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET | ||
5 | |||
6 | Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. | ||
7 | |||
8 | This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. | ||
9 | |||
10 | Other changes I had to do include: | ||
11 | |||
12 | - moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. | ||
13 | |||
14 | - passing the right CFLAGS to configure scripts as exported environment variables | ||
15 | |||
16 | I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. | ||
17 | |||
18 | Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? | ||
19 | |||
20 | Signed-off-by: Paolo Bonzini <bonzini@gnu.org> | ||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | |||
23 | Upstream-Status: Pending | ||
24 | --- | ||
25 | configure | 32 ++++++++++++++++++++++++++++++++ | ||
26 | 1 file changed, 32 insertions(+) | ||
27 | |||
28 | diff --git a/configure b/configure | ||
29 | index 1b76c90..e4dce7c 100755 | ||
30 | --- a/configure | ||
31 | +++ b/configure | ||
32 | @@ -6772,6 +6772,38 @@ fi | ||
33 | |||
34 | |||
35 | |||
36 | +# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS | ||
37 | +# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS | ||
38 | +# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). | ||
39 | +# We want to ensure that TARGET libraries (which we know are built with | ||
40 | +# gcc) are built with "-O2 -g", so include those options when setting | ||
41 | +# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. | ||
42 | +if test "x$CFLAGS_FOR_TARGET" = x; then | ||
43 | + CFLAGS_FOR_TARGET=$CFLAGS | ||
44 | + case " $CFLAGS " in | ||
45 | + *" -O2 "*) ;; | ||
46 | + *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; | ||
47 | + esac | ||
48 | + case " $CFLAGS " in | ||
49 | + *" -g "* | *" -g3 "*) ;; | ||
50 | + *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; | ||
51 | + esac | ||
52 | +fi | ||
53 | + | ||
54 | + | ||
55 | +if test "x$CXXFLAGS_FOR_TARGET" = x; then | ||
56 | + CXXFLAGS_FOR_TARGET=$CXXFLAGS | ||
57 | + case " $CXXFLAGS " in | ||
58 | + *" -O2 "*) ;; | ||
59 | + *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; | ||
60 | + esac | ||
61 | + case " $CXXFLAGS " in | ||
62 | + *" -g "* | *" -g3 "*) ;; | ||
63 | + *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; | ||
64 | + esac | ||
65 | +fi | ||
66 | + | ||
67 | + | ||
68 | # Handle --with-headers=XXX. If the value is not "yes", the contents of | ||
69 | # the named directory are copied to $(tooldir)/sys-include. | ||
70 | if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then | ||
71 | -- | ||
72 | 1.7.10.4 | ||
73 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0019-64-bit-multilib-hack.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0019-64-bit-multilib-hack.patch new file mode 100644 index 0000000..058be0c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0019-64-bit-multilib-hack.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From 18fde5740b09324dfb9cf41e9849672573ff5fa0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:10:06 +0400 | ||
4 | Subject: [PATCH 19/35] 64-bit multilib hack. | ||
5 | |||
6 | GCC has internal multilib handling code but it assumes a very specific rigid directory | ||
7 | layout. The build system implementation of multilib layout is very generic and allows | ||
8 | complete customisation of the library directories. | ||
9 | |||
10 | This patch is a partial solution to allow any custom directories to be passed into gcc | ||
11 | and handled correctly. It forces gcc to use the base_libdir (which is the current | ||
12 | directory, "."). We need to do this for each multilib that is configured as we don't | ||
13 | know which compiler options may be being passed into the compiler. Since we have a compiler | ||
14 | per mulitlib at this point that isn't an issue. | ||
15 | |||
16 | The one problem is the target compiler is only going to work for the default multlilib at | ||
17 | this point. Ideally we'd figure out which multilibs were being enabled with which paths | ||
18 | and be able to patch these entries with a complete set of correct paths but this we | ||
19 | don't have such code at this point. This is something the target gcc recipe should do | ||
20 | and override these platform defaults in its build config. | ||
21 | |||
22 | RP 15/8/11 | ||
23 | |||
24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
25 | Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> | ||
26 | |||
27 | Upstream-Status: Pending | ||
28 | --- | ||
29 | gcc/config/i386/t-linux64 | 6 ++---- | ||
30 | gcc/config/mips/t-linux64 | 10 +++------- | ||
31 | gcc/config/rs6000/t-linux64 | 5 ++--- | ||
32 | 3 files changed, 7 insertions(+), 14 deletions(-) | ||
33 | |||
34 | Index: gcc-4.9-20140316/gcc/config/i386/t-linux64 | ||
35 | =================================================================== | ||
36 | --- gcc-4.9-20140316.orig/gcc/config/i386/t-linux64 | ||
37 | +++ gcc-4.9-20140316/gcc/config/i386/t-linux64 | ||
38 | @@ -32,7 +32,5 @@ | ||
39 | # | ||
40 | comma=, | ||
41 | MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) | ||
42 | -MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) | ||
43 | -MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) | ||
44 | -MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) | ||
45 | -MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) | ||
46 | +MULTILIB_DIRNAMES = . . | ||
47 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
48 | Index: gcc-4.9-20140316/gcc/config/mips/t-linux64 | ||
49 | =================================================================== | ||
50 | --- gcc-4.9-20140316.orig/gcc/config/mips/t-linux64 | ||
51 | +++ gcc-4.9-20140316/gcc/config/mips/t-linux64 | ||
52 | @@ -17,10 +17,6 @@ | ||
53 | # <http://www.gnu.org/licenses/>. | ||
54 | |||
55 | MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 | ||
56 | -MULTILIB_DIRNAMES = n32 32 64 | ||
57 | -MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) | ||
58 | -MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) | ||
59 | -MULTILIB_OSDIRNAMES = \ | ||
60 | - ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ | ||
61 | - ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ | ||
62 | - ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) | ||
63 | +MULTILIB_DIRNAMES = . . . | ||
64 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
65 | + | ||
66 | Index: gcc-4.9-20140316/gcc/config/rs6000/t-linux64 | ||
67 | =================================================================== | ||
68 | --- gcc-4.9-20140316.orig/gcc/config/rs6000/t-linux64 | ||
69 | +++ gcc-4.9-20140316/gcc/config/rs6000/t-linux64 | ||
70 | @@ -26,10 +26,9 @@ | ||
71 | # MULTILIB_OSDIRNAMES according to what is found on the target. | ||
72 | |||
73 | MULTILIB_OPTIONS := m64/m32 | ||
74 | -MULTILIB_DIRNAMES := 64 32 | ||
75 | +MULTILIB_DIRNAMES := . . | ||
76 | MULTILIB_EXTRA_OPTS := | ||
77 | -MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) | ||
78 | -MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) | ||
79 | +MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
80 | |||
81 | rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c | ||
82 | $(COMPILE) $< | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0020-optional-libstdc.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0020-optional-libstdc.patch new file mode 100644 index 0000000..5b46614 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0020-optional-libstdc.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From 307c8ff3ef666b7bd5ac733863f2fbb27a9d521e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:12:56 +0400 | ||
4 | Subject: [PATCH 20/35] optional libstdc | ||
5 | |||
6 | gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ | ||
7 | will not run correctly since by default the linker will try to link against libstdc++ | ||
8 | which shouldn't exist yet. We need an option to disable -lstdc++ | ||
9 | option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc | ||
10 | driver. This patch adds such an option which only disables the -lstdc++. | ||
11 | |||
12 | A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to | ||
13 | do this officially, the likely answer is don't build libstdc++ separately. | ||
14 | |||
15 | RP 29/6/10 | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | |||
19 | Upstream-Status: Inappropriate [embedded specific] | ||
20 | --- | ||
21 | gcc/c-family/c.opt | 4 ++++ | ||
22 | gcc/cp/g++spec.c | 1 + | ||
23 | gcc/doc/invoke.texi | 9 +++++++-- | ||
24 | gcc/gcc.c | 1 + | ||
25 | 4 files changed, 13 insertions(+), 2 deletions(-) | ||
26 | |||
27 | Index: gcc-4.9-20140316/gcc/c-family/c.opt | ||
28 | =================================================================== | ||
29 | --- gcc-4.9-20140316.orig/gcc/c-family/c.opt | ||
30 | +++ gcc-4.9-20140316/gcc/c-family/c.opt | ||
31 | @@ -1323,6 +1323,10 @@ nostdinc++ | ||
32 | C++ ObjC++ | ||
33 | Do not search standard system include directories for C++ | ||
34 | |||
35 | +nostdlib++ | ||
36 | +Driver | ||
37 | +Do not link standard C++ runtime library | ||
38 | + | ||
39 | o | ||
40 | C ObjC C++ ObjC++ Joined Separate | ||
41 | ; Documented in common.opt | ||
42 | Index: gcc-4.9-20140316/gcc/cp/g++spec.c | ||
43 | =================================================================== | ||
44 | --- gcc-4.9-20140316.orig/gcc/cp/g++spec.c | ||
45 | +++ gcc-4.9-20140316/gcc/cp/g++spec.c | ||
46 | @@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_ | ||
47 | switch (decoded_options[i].opt_index) | ||
48 | { | ||
49 | case OPT_nostdlib: | ||
50 | + case OPT_nostdlib__: | ||
51 | case OPT_nodefaultlibs: | ||
52 | library = -1; | ||
53 | break; | ||
54 | Index: gcc-4.9-20140316/gcc/doc/invoke.texi | ||
55 | =================================================================== | ||
56 | --- gcc-4.9-20140316.orig/gcc/doc/invoke.texi | ||
57 | +++ gcc-4.9-20140316/gcc/doc/invoke.texi | ||
58 | @@ -193,6 +193,7 @@ in the following sections. | ||
59 | -fvisibility-inlines-hidden @gol | ||
60 | -fvtable-verify=@var{std|preinit|none} @gol | ||
61 | -fvtv-counts -fvtv-debug @gol | ||
62 | +-nostdlib++ @gol | ||
63 | -fvisibility-ms-compat @gol | ||
64 | -fext-numeric-literals @gol | ||
65 | -Wabi -Wconversion-null -Wctor-dtor-privacy @gol | ||
66 | @@ -457,7 +458,7 @@ Objective-C and Objective-C++ Dialects}. | ||
67 | -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol | ||
68 | -s -static -static-libgcc -static-libstdc++ @gol | ||
69 | -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol | ||
70 | --shared -shared-libgcc -symbolic @gol | ||
71 | +-shared -shared-libgcc -symbolic -nostdlib++ @gol | ||
72 | -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol | ||
73 | -u @var{symbol}} | ||
74 | |||
75 | @@ -10285,6 +10286,11 @@ These entries are usually resolved by en | ||
76 | libc. These entry points should be supplied through some other | ||
77 | mechanism when this option is specified. | ||
78 | |||
79 | +@item -nostdlib++ | ||
80 | +@opindex nostdlib++ | ||
81 | +Do not use the standard system C++ runtime libraries when linking. | ||
82 | +Only the libraries you specify will be passed to the linker. | ||
83 | + | ||
84 | @cindex @option{-lgcc}, use with @option{-nostdlib} | ||
85 | @cindex @option{-nostdlib} and unresolved references | ||
86 | @cindex unresolved references and @option{-nostdlib} | ||
87 | Index: gcc-4.9-20140316/gcc/gcc.c | ||
88 | =================================================================== | ||
89 | --- gcc-4.9-20140316.orig/gcc/gcc.c | ||
90 | +++ gcc-4.9-20140316/gcc/gcc.c | ||
91 | @@ -772,6 +772,7 @@ proper position among the other output f | ||
92 | %(mflib) " STACK_SPLIT_SPEC "\ | ||
93 | %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ | ||
94 | %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ | ||
95 | + %{!nostdlib++:}\ | ||
96 | %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" | ||
97 | #endif | ||
98 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch new file mode 100644 index 0000000..eb3c61f --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 004696e054ae9dc71d512cc755ccc4074fc62b2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:14:20 +0400 | ||
4 | Subject: [PATCH 21/35] gcc: disable MASK_RELAX_PIC_CALLS bit | ||
5 | |||
6 | The new feature added after 4.3.3 | ||
7 | "http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" | ||
8 | will cause cc1plus eat up all the system memory when build webkit-gtk. | ||
9 | The function mips_get_pic_call_symbol keeps on recursively calling itself. | ||
10 | Disable this feature to walk aside the bug. | ||
11 | |||
12 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | Upstream-Status: Inappropriate [configuration] | ||
16 | --- | ||
17 | gcc/configure | 7 ------- | ||
18 | gcc/configure.ac | 7 ------- | ||
19 | 2 files changed, 14 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/configure b/gcc/configure | ||
22 | index b65d21d..bdab45a 100755 | ||
23 | --- a/gcc/configure | ||
24 | +++ b/gcc/configure | ||
25 | @@ -25829,13 +25829,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; | ||
26 | rm -f conftest.* | ||
27 | fi | ||
28 | fi | ||
29 | - if test $gcc_cv_as_ld_jalr_reloc = yes; then | ||
30 | - if test x$target_cpu_default = x; then | ||
31 | - target_cpu_default=MASK_RELAX_PIC_CALLS | ||
32 | - else | ||
33 | - target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" | ||
34 | - fi | ||
35 | - fi | ||
36 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 | ||
37 | $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } | ||
38 | |||
39 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
40 | index e226b85..5f5c909 100644 | ||
41 | --- a/gcc/configure.ac | ||
42 | +++ b/gcc/configure.ac | ||
43 | @@ -4099,13 +4099,6 @@ x: | ||
44 | rm -f conftest.* | ||
45 | fi | ||
46 | fi | ||
47 | - if test $gcc_cv_as_ld_jalr_reloc = yes; then | ||
48 | - if test x$target_cpu_default = x; then | ||
49 | - target_cpu_default=MASK_RELAX_PIC_CALLS | ||
50 | - else | ||
51 | - target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" | ||
52 | - fi | ||
53 | - fi | ||
54 | AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) | ||
55 | |||
56 | AC_CACHE_CHECK([linker for .eh_frame personality relaxation], | ||
57 | -- | ||
58 | 1.7.10.4 | ||
59 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0022-COLLECT_GCC_OPTIONS.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0022-COLLECT_GCC_OPTIONS.patch new file mode 100644 index 0000000..40c8abf --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0022-COLLECT_GCC_OPTIONS.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 7f5c9dcc71c8b83a0b5596266cc4bdf0936e8e00 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:16:28 +0400 | ||
4 | Subject: [PATCH 22/35] COLLECT_GCC_OPTIONS | ||
5 | |||
6 | This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to | ||
7 | invoke collect2. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | gcc/gcc.c | 9 +++++++++ | ||
14 | 1 file changed, 9 insertions(+) | ||
15 | |||
16 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
17 | index 477752f..51062aa 100644 | ||
18 | --- a/gcc/gcc.c | ||
19 | +++ b/gcc/gcc.c | ||
20 | @@ -4098,6 +4098,15 @@ set_collect_gcc_options (void) | ||
21 | sizeof ("COLLECT_GCC_OPTIONS=") - 1); | ||
22 | |||
23 | first_time = TRUE; | ||
24 | +#ifdef HAVE_LD_SYSROOT | ||
25 | + if (target_system_root_changed && target_system_root) | ||
26 | + { | ||
27 | + obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); | ||
28 | + obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); | ||
29 | + obstack_grow (&collect_obstack, "'", 1); | ||
30 | + first_time = FALSE; | ||
31 | + } | ||
32 | +#endif | ||
33 | for (i = 0; (int) i < n_switches; i++) | ||
34 | { | ||
35 | const char *const *args; | ||
36 | -- | ||
37 | 1.7.10.4 | ||
38 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file mode 100644 index 0000000..9e4435c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 46d52439052f0876a92dcf8a0ab9c60d75c8030b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:17:25 +0400 | ||
4 | Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe | ||
5 | in ${B} | ||
6 | |||
7 | Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that | ||
8 | the source can be shared between gcc-cross-initial, | ||
9 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | --- | ||
15 | gcc/Makefile.in | 2 +- | ||
16 | gcc/configure | 4 ++-- | ||
17 | gcc/configure.ac | 4 ++-- | ||
18 | gcc/mkconfig.sh | 4 ++-- | ||
19 | 4 files changed, 7 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
22 | index 90a2bba..2320497 100644 | ||
23 | --- a/gcc/Makefile.in | ||
24 | +++ b/gcc/Makefile.in | ||
25 | @@ -469,7 +469,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ | ||
26 | TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ | ||
27 | |||
28 | xmake_file=@xmake_file@ | ||
29 | -tmake_file=@tmake_file@ | ||
30 | +tmake_file=@tmake_file@ ./t-oe | ||
31 | TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ | ||
32 | TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ | ||
33 | TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ | ||
34 | diff --git a/gcc/configure b/gcc/configure | ||
35 | index bdab45a..d587993 100755 | ||
36 | --- a/gcc/configure | ||
37 | +++ b/gcc/configure | ||
38 | @@ -11539,8 +11539,8 @@ for f in $tm_file; do | ||
39 | tm_include_list="${tm_include_list} $f" | ||
40 | ;; | ||
41 | defaults.h ) | ||
42 | - tm_file_list="${tm_file_list} \$(srcdir)/$f" | ||
43 | - tm_include_list="${tm_include_list} $f" | ||
44 | + tm_file_list="${tm_file_list} ./$f" | ||
45 | + tm_include_list="${tm_include_list} ./$f" | ||
46 | ;; | ||
47 | * ) | ||
48 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | ||
49 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
50 | index 5f5c909..5e5e84f 100644 | ||
51 | --- a/gcc/configure.ac | ||
52 | +++ b/gcc/configure.ac | ||
53 | @@ -1720,8 +1720,8 @@ for f in $tm_file; do | ||
54 | tm_include_list="${tm_include_list} $f" | ||
55 | ;; | ||
56 | defaults.h ) | ||
57 | - tm_file_list="${tm_file_list} \$(srcdir)/$f" | ||
58 | - tm_include_list="${tm_include_list} $f" | ||
59 | + tm_file_list="${tm_file_list} ./$f" | ||
60 | + tm_include_list="${tm_include_list} ./$f" | ||
61 | ;; | ||
62 | * ) | ||
63 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | ||
64 | diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh | ||
65 | index 29fdfc7..e048dce 100644 | ||
66 | --- a/gcc/mkconfig.sh | ||
67 | +++ b/gcc/mkconfig.sh | ||
68 | @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then | ||
69 | if [ $# -ge 1 ]; then | ||
70 | echo '#ifdef IN_GCC' >> ${output}T | ||
71 | for file in "$@"; do | ||
72 | - if test x"$file" = x"defaults.h"; then | ||
73 | + if test x"$file" = x"./defaults.h"; then | ||
74 | postpone_defaults_h="yes" | ||
75 | else | ||
76 | echo "# include \"$file\"" >> ${output}T | ||
77 | @@ -103,7 +103,7 @@ esac | ||
78 | |||
79 | # If we postponed including defaults.h, add the #include now. | ||
80 | if test x"$postpone_defaults_h" = x"yes"; then | ||
81 | - echo "# include \"defaults.h\"" >> ${output}T | ||
82 | + echo "# include \"./defaults.h\"" >> ${output}T | ||
83 | fi | ||
84 | |||
85 | # Add multiple inclusion protection guard, part two. | ||
86 | -- | ||
87 | 1.7.10.4 | ||
88 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0024-PR-target-32219.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0024-PR-target-32219.patch new file mode 100644 index 0000000..45acf7f --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0024-PR-target-32219.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:18:54 +0400 | ||
4 | Subject: [PATCH 24/35] PR target/32219 | ||
5 | |||
6 | * varasm.c (default_binds_local_p_1): Weak data is not local. | ||
7 | |||
8 | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | --- | ||
13 | gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++ | ||
14 | gcc/varasm.c | 9 ++++----- | ||
15 | 2 files changed, 18 insertions(+), 5 deletions(-) | ||
16 | create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c | ||
17 | |||
18 | Index: gcc-4.9-20140316/gcc/varasm.c | ||
19 | =================================================================== | ||
20 | --- gcc-4.9-20140316.orig/gcc/varasm.c | ||
21 | +++ gcc-4.9-20140316/gcc/varasm.c | ||
22 | @@ -6771,6 +6771,10 @@ default_binds_local_p_1 (const_tree exp, | ||
23 | /* Static variables are always local. */ | ||
24 | else if (! TREE_PUBLIC (exp)) | ||
25 | local_p = true; | ||
26 | + /* hidden weak can't be overridden by something non-local, all | ||
27 | + that is possible is that it is not defined at all. */ | ||
28 | + else if (DECL_WEAK (exp)) | ||
29 | + local_p = false; | ||
30 | /* A variable is local if the user has said explicitly that it will | ||
31 | be. */ | ||
32 | else if ((DECL_VISIBILITY_SPECIFIED (exp) | ||
33 | @@ -6784,11 +6788,6 @@ default_binds_local_p_1 (const_tree exp, | ||
34 | local. */ | ||
35 | else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) | ||
36 | local_p = true; | ||
37 | - /* Default visibility weak data can be overridden by a strong symbol | ||
38 | - in another module and so are not local. */ | ||
39 | - else if (DECL_WEAK (exp) | ||
40 | - && !resolved_locally) | ||
41 | - local_p = false; | ||
42 | /* If PIC, then assume that any global name can be overridden by | ||
43 | symbols resolved from other modules. */ | ||
44 | else if (shlib) | ||
45 | Index: gcc-4.9-20140316/gcc/testsuite/gcc.dg/visibility-22.c | ||
46 | =================================================================== | ||
47 | --- /dev/null | ||
48 | +++ gcc-4.9-20140316/gcc/testsuite/gcc.dg/visibility-22.c | ||
49 | @@ -0,0 +1,13 @@ | ||
50 | +/* PR target/32219 */ | ||
51 | +/* { dg-do run } */ | ||
52 | +/* { dg-require-visibility "" } */ | ||
53 | +/* { dg-options "-fPIC" { target fpic } } */ | ||
54 | + | ||
55 | +extern void f() __attribute__((weak,visibility("hidden"))); | ||
56 | +extern int puts( char const* ); | ||
57 | +int main() | ||
58 | +{ | ||
59 | + if (f) | ||
60 | + f(); | ||
61 | + return 0; | ||
62 | +} | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0025-fortran-cross-compile-hack.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0025-fortran-cross-compile-hack.patch new file mode 100644 index 0000000..0e7914d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0025-fortran-cross-compile-hack.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From af8a56ea4e17b2909eff2c57704ab43ef24f28d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:20:01 +0400 | ||
4 | Subject: [PATCH 25/35] fortran cross-compile hack. | ||
5 | |||
6 | * Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used | ||
7 | used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross | ||
8 | directory. | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | |||
12 | Upstream-Status: Inappropriate [embedded specific] | ||
13 | --- | ||
14 | libgfortran/configure | 2 +- | ||
15 | libgfortran/configure.ac | 2 +- | ||
16 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/libgfortran/configure b/libgfortran/configure | ||
19 | index 8385e96..b8f7a92 100755 | ||
20 | --- a/libgfortran/configure | ||
21 | +++ b/libgfortran/configure | ||
22 | @@ -12704,7 +12704,7 @@ esac | ||
23 | |||
24 | # We need gfortran to compile parts of the library | ||
25 | #AC_PROG_FC(gfortran) | ||
26 | -FC="$GFORTRAN" | ||
27 | +#FC="$GFORTRAN" | ||
28 | ac_ext=${ac_fc_srcext-f} | ||
29 | ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' | ||
30 | ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' | ||
31 | diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac | ||
32 | index 7d97fed..3f9f484 100644 | ||
33 | --- a/libgfortran/configure.ac | ||
34 | +++ b/libgfortran/configure.ac | ||
35 | @@ -227,7 +227,7 @@ AC_SUBST(enable_static) | ||
36 | |||
37 | # We need gfortran to compile parts of the library | ||
38 | #AC_PROG_FC(gfortran) | ||
39 | -FC="$GFORTRAN" | ||
40 | +#FC="$GFORTRAN" | ||
41 | AC_PROG_FC(gfortran) | ||
42 | |||
43 | # extra LD Flags which are required for targets | ||
44 | -- | ||
45 | 1.7.10.4 | ||
46 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0026-libgcc-sjlj-check.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0026-libgcc-sjlj-check.patch new file mode 100644 index 0000000..d4efab9 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0026-libgcc-sjlj-check.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 08c2398445e6cac282488f64ae6bf29cbcd8db23 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:20:50 +0400 | ||
4 | Subject: [PATCH 26/35] libgcc-sjlj-check | ||
5 | |||
6 | ac_fn_c_try_compile doesnt seem to keep the intermediate files | ||
7 | which are needed for sjlj test to pass since it greps into the | ||
8 | generated file. So we run the compiler command using AC_TRY_COMMAND | ||
9 | which then generates the needed .s file | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | --- | ||
15 | libgcc/configure | 10 ++++++---- | ||
16 | libgcc/configure.ac | 10 ++++------ | ||
17 | 2 files changed, 10 insertions(+), 10 deletions(-) | ||
18 | |||
19 | diff --git a/libgcc/configure b/libgcc/configure | ||
20 | index 1425df6..d18e3cb 100644 | ||
21 | --- a/libgcc/configure | ||
22 | +++ b/libgcc/configure | ||
23 | @@ -4208,17 +4208,19 @@ void foo () | ||
24 | } | ||
25 | |||
26 | _ACEOF | ||
27 | -CFLAGS_hold=$CFLAGS | ||
28 | -CFLAGS="--save-temps -fexceptions" | ||
29 | libgcc_cv_lib_sjlj_exceptions=unknown | ||
30 | -if ac_fn_c_try_compile; then : | ||
31 | +if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5' | ||
32 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | ||
33 | + (eval $ac_try) 2>&5 | ||
34 | + ac_status=$? | ||
35 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
36 | + test $ac_status = 0; }; }; then | ||
37 | if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then | ||
38 | libgcc_cv_lib_sjlj_exceptions=yes | ||
39 | elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then | ||
40 | libgcc_cv_lib_sjlj_exceptions=no | ||
41 | fi | ||
42 | fi | ||
43 | -CFLAGS=$CFLAGS_hold | ||
44 | rm -f conftest* | ||
45 | |||
46 | fi | ||
47 | diff --git a/libgcc/configure.ac b/libgcc/configure.ac | ||
48 | index 8b7aba5..c7c9644 100644 | ||
49 | --- a/libgcc/configure.ac | ||
50 | +++ b/libgcc/configure.ac | ||
51 | @@ -216,16 +216,14 @@ void foo () | ||
52 | bar(); | ||
53 | } | ||
54 | ])]) | ||
55 | -CFLAGS_hold=$CFLAGS | ||
56 | -CFLAGS="--save-temps -fexceptions" | ||
57 | libgcc_cv_lib_sjlj_exceptions=unknown | ||
58 | -AS_IF([ac_fn_c_try_compile], | ||
59 | - [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then | ||
60 | +if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then | ||
61 | + if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then | ||
62 | libgcc_cv_lib_sjlj_exceptions=yes | ||
63 | elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then | ||
64 | libgcc_cv_lib_sjlj_exceptions=no | ||
65 | - fi]) | ||
66 | -CFLAGS=$CFLAGS_hold | ||
67 | + fi | ||
68 | +fi | ||
69 | rm -f conftest* | ||
70 | ]) | ||
71 | |||
72 | -- | ||
73 | 1.7.10.4 | ||
74 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0027-cpp-honor-sysroot.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0027-cpp-honor-sysroot.patch new file mode 100644 index 0000000..05e9521 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0027-cpp-honor-sysroot.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From a0f9bd09c816ad29ecf7c29d6c27f7df97710364 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:22:00 +0400 | ||
4 | Subject: [PATCH 27/35] cpp: honor sysroot. | ||
5 | |||
6 | Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile | ||
7 | preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location | ||
8 | rather than the --sysroot option specified on the commandline. If access to that directory is | ||
9 | permission denied (unreadable), gcc will error. | ||
10 | |||
11 | This happens when ccache is in use due to the fact it uses preprocessed source files. | ||
12 | |||
13 | The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, | ||
14 | -isystem, -isysroot happen and the correct sysroot is used. | ||
15 | |||
16 | [YOCTO #2074] | ||
17 | |||
18 | RP 2012/04/13 | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | |||
22 | Upstream-Status: Pending | ||
23 | --- | ||
24 | gcc/cp/lang-specs.h | 2 +- | ||
25 | gcc/gcc.c | 2 +- | ||
26 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h | ||
29 | index a001c3e..1aae1e4 100644 | ||
30 | --- a/gcc/cp/lang-specs.h | ||
31 | +++ b/gcc/cp/lang-specs.h | ||
32 | @@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see | ||
33 | {".ii", "@c++-cpp-output", 0, 0, 0}, | ||
34 | {"@c++-cpp-output", | ||
35 | "%{!M:%{!MM:%{!E:\ | ||
36 | - cc1plus -fpreprocessed %i %(cc1_options) %2\ | ||
37 | + cc1plus -fpreprocessed %i %I %(cc1_options) %2\ | ||
38 | %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
39 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
40 | index 51062aa..cf6b99e 100644 | ||
41 | --- a/gcc/gcc.c | ||
42 | +++ b/gcc/gcc.c | ||
43 | @@ -1042,7 +1042,7 @@ static const struct compiler default_compilers[] = | ||
44 | %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, | ||
45 | {".i", "@cpp-output", 0, 0, 0}, | ||
46 | {"@cpp-output", | ||
47 | - "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
48 | + "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
49 | {".s", "@assembler", 0, 0, 0}, | ||
50 | {"@assembler", | ||
51 | "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, | ||
52 | -- | ||
53 | 1.7.10.4 | ||
54 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0028-MIPS64-Default-to-N64-ABI.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0028-MIPS64-Default-to-N64-ABI.patch new file mode 100644 index 0000000..2638720 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0028-MIPS64-Default-to-N64-ABI.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 301e18d4711db5925e767fad08dffa9cfe0a2f1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:23:08 +0400 | ||
4 | Subject: [PATCH 28/35] MIPS64: Default to N64 ABI | ||
5 | |||
6 | MIPS64 defaults to n32 ABI, this patch makes it | ||
7 | so that it defaults to N64 ABI | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE config specific] | ||
12 | --- | ||
13 | gcc/config.gcc | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/gcc/config.gcc b/gcc/config.gcc | ||
17 | index 1a0be50..989c2fb 100644 | ||
18 | --- a/gcc/config.gcc | ||
19 | +++ b/gcc/config.gcc | ||
20 | @@ -1797,7 +1797,7 @@ mips*-mti-linux*) | ||
21 | mips64*-*-linux* | mipsisa64*-*-linux*) | ||
22 | tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h" | ||
23 | tmake_file="${tmake_file} mips/t-linux64" | ||
24 | - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" | ||
25 | + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" | ||
26 | case ${target} in | ||
27 | mips64el-st-linux-gnu) | ||
28 | tm_file="${tm_file} mips/st.h" | ||
29 | -- | ||
30 | 1.7.10.4 | ||
31 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 0000000..969d290 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | |||
@@ -0,0 +1,228 @@ | |||
1 | From 29d12344fb682a053de53eb08b95704cf3b67af2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:24:50 +0400 | ||
4 | Subject: [PATCH 29/35] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
5 | relative to SYSTEMLIBS_DIR | ||
6 | |||
7 | This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
8 | relative to SYSTEMLIBS_DIR which can be set in generated headers | ||
9 | This breaks the assumption of hardcoded multilib in gcc | ||
10 | Change is only for the supported architectures in OE including | ||
11 | SH, sparc, alpha for possible future support (if any) | ||
12 | |||
13 | Removes the do_headerfix task in metadata | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Inappropriate [OE configuration] | ||
18 | --- | ||
19 | gcc/config/alpha/linux-elf.h | 4 ++-- | ||
20 | gcc/config/arm/linux-eabi.h | 4 ++-- | ||
21 | gcc/config/arm/linux-elf.h | 2 +- | ||
22 | gcc/config/i386/linux.h | 2 +- | ||
23 | gcc/config/i386/linux64.h | 6 +++--- | ||
24 | gcc/config/mips/linux.h | 2 +- | ||
25 | gcc/config/mips/linux64.h | 8 ++++---- | ||
26 | gcc/config/rs6000/linux64.h | 8 ++++---- | ||
27 | gcc/config/sh/linux.h | 2 +- | ||
28 | gcc/config/sparc/linux.h | 2 +- | ||
29 | gcc/config/sparc/linux64.h | 4 ++-- | ||
30 | 11 files changed, 22 insertions(+), 22 deletions(-) | ||
31 | |||
32 | Index: gcc-4.9.0/gcc/config/alpha/linux-elf.h | ||
33 | =================================================================== | ||
34 | --- gcc-4.9.0.orig/gcc/config/alpha/linux-elf.h 2014-05-07 16:43:50.609106535 +0000 | ||
35 | +++ gcc-4.9.0/gcc/config/alpha/linux-elf.h 2014-05-07 16:43:50.605106535 +0000 | ||
36 | @@ -23,8 +23,8 @@ | ||
37 | #define EXTRA_SPECS \ | ||
38 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | ||
39 | |||
40 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
41 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
42 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
43 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
44 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
45 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
46 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
47 | Index: gcc-4.9.0/gcc/config/arm/linux-eabi.h | ||
48 | =================================================================== | ||
49 | --- gcc-4.9.0.orig/gcc/config/arm/linux-eabi.h 2014-05-07 16:43:50.609106535 +0000 | ||
50 | +++ gcc-4.9.0/gcc/config/arm/linux-eabi.h 2014-05-07 16:43:50.605106535 +0000 | ||
51 | @@ -68,8 +68,8 @@ | ||
52 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ | ||
53 | |||
54 | #undef GLIBC_DYNAMIC_LINKER | ||
55 | -#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" | ||
56 | -#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" | ||
57 | +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" | ||
58 | +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" | ||
59 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT | ||
60 | |||
61 | #define GLIBC_DYNAMIC_LINKER \ | ||
62 | Index: gcc-4.9.0/gcc/config/arm/linux-elf.h | ||
63 | =================================================================== | ||
64 | --- gcc-4.9.0.orig/gcc/config/arm/linux-elf.h 2014-05-07 16:43:50.609106535 +0000 | ||
65 | +++ gcc-4.9.0/gcc/config/arm/linux-elf.h 2014-05-07 16:43:50.605106535 +0000 | ||
66 | @@ -57,7 +57,7 @@ | ||
67 | |||
68 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | ||
69 | |||
70 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
71 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
72 | |||
73 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
74 | %{static:-Bstatic} \ | ||
75 | Index: gcc-4.9.0/gcc/config/i386/linux.h | ||
76 | =================================================================== | ||
77 | --- gcc-4.9.0.orig/gcc/config/i386/linux.h 2014-05-07 16:43:50.609106535 +0000 | ||
78 | +++ gcc-4.9.0/gcc/config/i386/linux.h 2014-05-07 16:43:50.605106535 +0000 | ||
79 | @@ -20,4 +20,4 @@ | ||
80 | <http://www.gnu.org/licenses/>. */ | ||
81 | |||
82 | #define GNU_USER_LINK_EMULATION "elf_i386" | ||
83 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
84 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
85 | Index: gcc-4.9.0/gcc/config/i386/linux64.h | ||
86 | =================================================================== | ||
87 | --- gcc-4.9.0.orig/gcc/config/i386/linux64.h 2014-05-07 16:43:50.609106535 +0000 | ||
88 | +++ gcc-4.9.0/gcc/config/i386/linux64.h 2014-05-07 16:43:50.605106535 +0000 | ||
89 | @@ -27,6 +27,6 @@ | ||
90 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | ||
91 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | ||
92 | |||
93 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
94 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
95 | -#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | ||
96 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
97 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | ||
98 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | ||
99 | Index: gcc-4.9.0/gcc/config/mips/linux.h | ||
100 | =================================================================== | ||
101 | --- gcc-4.9.0.orig/gcc/config/mips/linux.h 2014-05-07 16:43:50.609106535 +0000 | ||
102 | +++ gcc-4.9.0/gcc/config/mips/linux.h 2014-05-07 16:43:50.605106535 +0000 | ||
103 | @@ -18,8 +18,8 @@ | ||
104 | <http://www.gnu.org/licenses/>. */ | ||
105 | |||
106 | #define GLIBC_DYNAMIC_LINKER \ | ||
107 | - "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" | ||
108 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
109 | |||
110 | #undef UCLIBC_DYNAMIC_LINKER | ||
111 | #define UCLIBC_DYNAMIC_LINKER \ | ||
112 | - "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" | ||
113 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
114 | Index: gcc-4.9.0/gcc/config/mips/linux64.h | ||
115 | =================================================================== | ||
116 | --- gcc-4.9.0.orig/gcc/config/mips/linux64.h 2014-05-07 16:43:50.609106535 +0000 | ||
117 | +++ gcc-4.9.0/gcc/config/mips/linux64.h 2014-05-07 16:43:50.605106535 +0000 | ||
118 | @@ -23,20 +23,20 @@ | ||
119 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | ||
120 | |||
121 | #define GLIBC_DYNAMIC_LINKER32 \ | ||
122 | - "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" | ||
123 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
124 | #define GLIBC_DYNAMIC_LINKER64 \ | ||
125 | - "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" | ||
126 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
127 | #define GLIBC_DYNAMIC_LINKERN32 \ | ||
128 | - "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" | ||
129 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
130 | |||
131 | #undef UCLIBC_DYNAMIC_LINKER32 | ||
132 | #define UCLIBC_DYNAMIC_LINKER32 \ | ||
133 | - "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" | ||
134 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
135 | #undef UCLIBC_DYNAMIC_LINKER64 | ||
136 | #define UCLIBC_DYNAMIC_LINKER64 \ | ||
137 | - "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" | ||
138 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" | ||
139 | #define UCLIBC_DYNAMIC_LINKERN32 \ | ||
140 | - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" | ||
141 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
142 | |||
143 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | ||
144 | #define GNU_USER_DYNAMIC_LINKERN32 \ | ||
145 | Index: gcc-4.9.0/gcc/config/rs6000/linux64.h | ||
146 | =================================================================== | ||
147 | --- gcc-4.9.0.orig/gcc/config/rs6000/linux64.h 2014-05-07 16:43:50.609106535 +0000 | ||
148 | +++ gcc-4.9.0/gcc/config/rs6000/linux64.h 2014-05-07 16:43:50.605106535 +0000 | ||
149 | @@ -367,14 +367,14 @@ | ||
150 | #undef LINK_OS_DEFAULT_SPEC | ||
151 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
152 | |||
153 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
154 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
155 | #ifdef LINUX64_DEFAULT_ABI_ELFv2 | ||
156 | -#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}" | ||
157 | +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" | ||
158 | #else | ||
159 | -#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}" | ||
160 | +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" | ||
161 | #endif | ||
162 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
163 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
164 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
165 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
166 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
167 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
168 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
169 | Index: gcc-4.9.0/gcc/config/sh/linux.h | ||
170 | =================================================================== | ||
171 | --- gcc-4.9.0.orig/gcc/config/sh/linux.h 2014-05-07 16:43:50.609106535 +0000 | ||
172 | +++ gcc-4.9.0/gcc/config/sh/linux.h 2014-05-07 16:43:50.605106535 +0000 | ||
173 | @@ -43,7 +43,7 @@ | ||
174 | |||
175 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | ||
176 | |||
177 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
178 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
179 | |||
180 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
181 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" | ||
182 | Index: gcc-4.9.0/gcc/config/sparc/linux.h | ||
183 | =================================================================== | ||
184 | --- gcc-4.9.0.orig/gcc/config/sparc/linux.h 2014-05-07 16:43:50.609106535 +0000 | ||
185 | +++ gcc-4.9.0/gcc/config/sparc/linux.h 2014-05-07 16:43:50.605106535 +0000 | ||
186 | @@ -83,7 +83,7 @@ | ||
187 | When the -shared link option is used a final link is not being | ||
188 | done. */ | ||
189 | |||
190 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
191 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
192 | |||
193 | #undef LINK_SPEC | ||
194 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ | ||
195 | Index: gcc-4.9.0/gcc/config/sparc/linux64.h | ||
196 | =================================================================== | ||
197 | --- gcc-4.9.0.orig/gcc/config/sparc/linux64.h 2014-05-07 16:43:50.609106535 +0000 | ||
198 | +++ gcc-4.9.0/gcc/config/sparc/linux64.h 2014-05-07 16:43:50.605106535 +0000 | ||
199 | @@ -92,8 +92,8 @@ | ||
200 | When the -shared link option is used a final link is not being | ||
201 | done. */ | ||
202 | |||
203 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
204 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | ||
205 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
206 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
207 | |||
208 | #ifdef SPARC_BI_ARCH | ||
209 | |||
210 | Index: gcc-4.9.0/gcc/config/linux.h | ||
211 | =================================================================== | ||
212 | --- gcc-4.9.0.orig/gcc/config/linux.h 2014-05-07 16:43:50.609106535 +0000 | ||
213 | +++ gcc-4.9.0/gcc/config/linux.h 2014-05-07 16:43:50.605106535 +0000 | ||
214 | @@ -73,10 +73,10 @@ | ||
215 | GLIBC_DYNAMIC_LINKER must be defined for each target using them, or | ||
216 | GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets | ||
217 | supporting both 32-bit and 64-bit compilation. */ | ||
218 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
219 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
220 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
221 | -#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" | ||
222 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
223 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
224 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
225 | +#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" | ||
226 | #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" | ||
227 | #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" | ||
228 | #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0030-gcc-Fix-argument-list-too-long-error.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0030-gcc-Fix-argument-list-too-long-error.patch new file mode 100644 index 0000000..2ceaff6 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0030-gcc-Fix-argument-list-too-long-error.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From c1816c160156f99c34e6a0a0311bb0219326804e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:26:37 +0400 | ||
4 | Subject: [PATCH 30/35] gcc: Fix argument list too long error. | ||
5 | |||
6 | There would be an "Argument list too long" error when the | ||
7 | build directory is longer than 200, this is caused by: | ||
8 | |||
9 | headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` | ||
10 | |||
11 | The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle | ||
12 | it, use the $(sort list) of GNU make which can handle the too long list | ||
13 | would fix the problem, the header would be short enough after sorted. | ||
14 | The "tr ' ' '\012'" was used for translating the space to "\n", the | ||
15 | $(sort list) doesn't need this. | ||
16 | |||
17 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | --- | ||
22 | gcc/Makefile.in | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
26 | index 2320497..8562a62 100644 | ||
27 | --- a/gcc/Makefile.in | ||
28 | +++ b/gcc/Makefile.in | ||
29 | @@ -4627,7 +4627,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype | ||
30 | # We keep the directory structure for files in config or c-family and .def | ||
31 | # files. All other files are flattened to a single directory. | ||
32 | $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) | ||
33 | - headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \ | ||
34 | + headers="$(sort $(PLUGIN_HEADERS))"; \ | ||
35 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ | ||
36 | for file in $$headers; do \ | ||
37 | if [ -f $$file ] ; then \ | ||
38 | -- | ||
39 | 1.7.10.4 | ||
40 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0031-Disable-sdt.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0031-Disable-sdt.patch new file mode 100644 index 0000000..2c1d5e0 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0031-Disable-sdt.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | From b85265bc94ec1beaf1d3b697c03db62991553467 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:28:10 +0400 | ||
4 | Subject: [PATCH 31/35] Disable sdt. | ||
5 | |||
6 | We don't list dtrace in DEPENDS so we shouldn't be depending on this header. | ||
7 | It may or may not exist from preivous builds though. To be determinstic, disable | ||
8 | sdt.h usage always. This avoids build failures if the header is removed after configure | ||
9 | but before libgcc is compiled for example. | ||
10 | |||
11 | RP 2012/8/7 | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | Disable sdt for libstdc++-v3. | ||
16 | |||
17 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
18 | |||
19 | Upstream-Status: Inappropriate [hack] | ||
20 | --- | ||
21 | gcc/configure | 12 ++++++------ | ||
22 | gcc/configure.ac | 18 +++++++++--------- | ||
23 | libstdc++-v3/configure | 6 +++--- | ||
24 | libstdc++-v3/configure.ac | 2 +- | ||
25 | 4 files changed, 19 insertions(+), 19 deletions(-) | ||
26 | |||
27 | diff --git a/gcc/configure b/gcc/configure | ||
28 | index 3c550a6..01c7626 100755 | ||
29 | --- a/gcc/configure | ||
30 | +++ b/gcc/configure | ||
31 | @@ -26812,12 +26812,12 @@ fi | ||
32 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 | ||
33 | $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } | ||
34 | have_sys_sdt_h=no | ||
35 | -if test -f $target_header_dir/sys/sdt.h; then | ||
36 | - have_sys_sdt_h=yes | ||
37 | - | ||
38 | -$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h | ||
39 | - | ||
40 | -fi | ||
41 | +#if test -f $target_header_dir/sys/sdt.h; then | ||
42 | +# have_sys_sdt_h=yes | ||
43 | +# | ||
44 | +#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h | ||
45 | +# | ||
46 | +#fi | ||
47 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 | ||
48 | $as_echo "$have_sys_sdt_h" >&6; } | ||
49 | |||
50 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
51 | index 3601ab6..06e501f 100644 | ||
52 | --- a/gcc/configure.ac | ||
53 | +++ b/gcc/configure.ac | ||
54 | @@ -4779,15 +4779,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then | ||
55 | fi | ||
56 | |||
57 | # Test for <sys/sdt.h> on the target. | ||
58 | -GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) | ||
59 | -AC_MSG_CHECKING(sys/sdt.h in the target C library) | ||
60 | -have_sys_sdt_h=no | ||
61 | -if test -f $target_header_dir/sys/sdt.h; then | ||
62 | - have_sys_sdt_h=yes | ||
63 | - AC_DEFINE(HAVE_SYS_SDT_H, 1, | ||
64 | - [Define if your target C library provides sys/sdt.h]) | ||
65 | -fi | ||
66 | -AC_MSG_RESULT($have_sys_sdt_h) | ||
67 | +#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) | ||
68 | +#AC_MSG_CHECKING(sys/sdt.h in the target C library) | ||
69 | +#have_sys_sdt_h=no | ||
70 | +#if test -f $target_header_dir/sys/sdt.h; then | ||
71 | +# have_sys_sdt_h=yes | ||
72 | +# AC_DEFINE(HAVE_SYS_SDT_H, 1, | ||
73 | +# [Define if your target C library provides sys/sdt.h]) | ||
74 | +#fi | ||
75 | +#AC_MSG_RESULT($have_sys_sdt_h) | ||
76 | |||
77 | # Check if TFmode long double should be used by default or not. | ||
78 | # Some glibc targets used DFmode long double, but with glibc 2.4 | ||
79 | diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure | ||
80 | index 4953c9f..53a1145 100755 | ||
81 | --- a/libstdc++-v3/configure | ||
82 | +++ b/libstdc++-v3/configure | ||
83 | @@ -20578,11 +20578,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
84 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
85 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
86 | |||
87 | - if test $glibcxx_cv_sys_sdt_h = yes; then | ||
88 | +# if test $glibcxx_cv_sys_sdt_h = yes; then | ||
89 | |||
90 | -$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h | ||
91 | +#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h | ||
92 | |||
93 | - fi | ||
94 | +# fi | ||
95 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5 | ||
96 | $as_echo "$glibcxx_cv_sys_sdt_h" >&6; } | ||
97 | |||
98 | diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac | ||
99 | index 73d430a..f2135e2 100644 | ||
100 | --- a/libstdc++-v3/configure.ac | ||
101 | +++ b/libstdc++-v3/configure.ac | ||
102 | @@ -211,7 +211,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN | ||
103 | GLIBCXX_CHECK_SC_NPROC_ONLN | ||
104 | GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP | ||
105 | GLIBCXX_CHECK_SYSCTL_HW_NCPU | ||
106 | -GLIBCXX_CHECK_SDT_H | ||
107 | +#GLIBCXX_CHECK_SDT_H | ||
108 | |||
109 | # Check for available headers. | ||
110 | AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \ | ||
111 | -- | ||
112 | 1.8.3.1 | ||
113 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0032-libtool.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0032-libtool.patch new file mode 100644 index 0000000..3b3d1b6 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0032-libtool.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 6c715fcfa262adadca81c68a1f3f69aa3187a501 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:29:11 +0400 | ||
4 | Subject: [PATCH 32/35] libtool | ||
5 | |||
6 | libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 | ||
7 | when running on am x86_64 build host. | ||
8 | |||
9 | This patch stops this speading to libdir in the libstdc++.la file within libtool. | ||
10 | Arguably, it shouldn't be passing this into libtool in the first place but | ||
11 | for now this resolves the nastiest problems this causes. | ||
12 | |||
13 | func_normal_abspath would resolve an empty path to `pwd` so we need | ||
14 | to filter the zero case. | ||
15 | |||
16 | RP 2012/8/24 | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | --- | ||
22 | ltmain.sh | 4 ++++ | ||
23 | 1 file changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/ltmain.sh b/ltmain.sh | ||
26 | index a03433f..46f47c2 100644 | ||
27 | --- a/ltmain.sh | ||
28 | +++ b/ltmain.sh | ||
29 | @@ -6359,6 +6359,10 @@ func_mode_link () | ||
30 | func_warning "ignoring multiple \`-rpath's for a libtool library" | ||
31 | |||
32 | install_libdir="$1" | ||
33 | + if test -n "$install_libdir"; then | ||
34 | + func_normal_abspath "$install_libdir" | ||
35 | + install_libdir=$func_normal_abspath_result | ||
36 | + fi | ||
37 | |||
38 | oldlibs= | ||
39 | if test -z "$rpath"; then | ||
40 | -- | ||
41 | 1.7.10.4 | ||
42 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file mode 100644 index 0000000..b236c37 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 97e4591c20310425e7aca0e6712a8d9480e7744c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:30:32 +0400 | ||
4 | Subject: [PATCH 33/35] gcc: armv4: pass fix-v4bx to linker to support EABI. | ||
5 | |||
6 | The LINK_SPEC for linux gets overwritten by linux-eabi.h which | ||
7 | means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result | ||
8 | the option is not passed to linker when chosing march=armv4 | ||
9 | This patch redefines this in linux-eabi.h and reinserts it | ||
10 | for eabi defaulting toolchains. | ||
11 | |||
12 | We might want to send it upstream. | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | --- | ||
18 | gcc/config/arm/linux-eabi.h | 6 +++++- | ||
19 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
20 | |||
21 | Index: gcc-4.9-20140316/gcc/config/arm/linux-eabi.h | ||
22 | =================================================================== | ||
23 | --- gcc-4.9-20140316.orig/gcc/config/arm/linux-eabi.h | ||
24 | +++ gcc-4.9-20140316/gcc/config/arm/linux-eabi.h | ||
25 | @@ -77,10 +77,14 @@ | ||
26 | %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ | ||
27 | %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" | ||
28 | |||
29 | +/* For armv4 we pass --fix-v4bx to linker to support EABI */ | ||
30 | +#undef TARGET_FIX_V4BX_SPEC | ||
31 | +#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" | ||
32 | + | ||
33 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
34 | use the GNU/Linux version, not the generic BPABI version. */ | ||
35 | #undef LINK_SPEC | ||
36 | -#define LINK_SPEC EABI_LINK_SPEC \ | ||
37 | +#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ | ||
38 | LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ | ||
39 | LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) | ||
40 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file mode 100644 index 0000000..66b9f89 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From fc5e4beaea856a2b486c770ad3addc0f5bb3100e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:33:04 +0400 | ||
4 | Subject: [PATCH 34/35] Use the multilib config files from ${B} instead of | ||
5 | using the ones from ${S} | ||
6 | |||
7 | Use the multilib config files from ${B} instead of using the ones from ${S} | ||
8 | so that the source can be shared between gcc-cross-initial, | ||
9 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | ||
13 | |||
14 | Upstream-Status: Inappropriate [configuration] | ||
15 | --- | ||
16 | gcc/configure | 22 ++++++++++++++++++---- | ||
17 | gcc/configure.ac | 22 ++++++++++++++++++---- | ||
18 | 2 files changed, 36 insertions(+), 8 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/configure b/gcc/configure | ||
21 | index 8bc0c98..3cd0817 100755 | ||
22 | --- a/gcc/configure | ||
23 | +++ b/gcc/configure | ||
24 | @@ -11519,10 +11519,20 @@ done | ||
25 | tmake_file_= | ||
26 | for f in ${tmake_file} | ||
27 | do | ||
28 | - if test -f ${srcdir}/config/$f | ||
29 | - then | ||
30 | - tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
31 | - fi | ||
32 | + case $f in | ||
33 | + */t-linux64 ) | ||
34 | + if test -f ./config/$f | ||
35 | + then | ||
36 | + tmake_file_="${tmake_file_} ./config/$f" | ||
37 | + fi | ||
38 | + ;; | ||
39 | + * ) | ||
40 | + if test -f ${srcdir}/config/$f | ||
41 | + then | ||
42 | + tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
43 | + fi | ||
44 | + ;; | ||
45 | + esac | ||
46 | done | ||
47 | tmake_file="${tmake_file_}" | ||
48 | |||
49 | @@ -11533,6 +11543,10 @@ tm_file_list="options.h" | ||
50 | tm_include_list="options.h insn-constants.h" | ||
51 | for f in $tm_file; do | ||
52 | case $f in | ||
53 | + */linux64.h ) | ||
54 | + tm_file_list="${tm_file_list} ./config/$f" | ||
55 | + tm_include_list="${tm_include_list} ./config/$f" | ||
56 | + ;; | ||
57 | ./* ) | ||
58 | f=`echo $f | sed 's/^..//'` | ||
59 | tm_file_list="${tm_file_list} $f" | ||
60 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
61 | index 5e5e84f..415a6df 100644 | ||
62 | --- a/gcc/configure.ac | ||
63 | +++ b/gcc/configure.ac | ||
64 | @@ -1700,10 +1700,20 @@ done | ||
65 | tmake_file_= | ||
66 | for f in ${tmake_file} | ||
67 | do | ||
68 | - if test -f ${srcdir}/config/$f | ||
69 | - then | ||
70 | - tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
71 | - fi | ||
72 | + case $f in | ||
73 | + */t-linux64 ) | ||
74 | + if test -f ./config/$f | ||
75 | + then | ||
76 | + tmake_file_="${tmake_file_} ./config/$f" | ||
77 | + fi | ||
78 | + ;; | ||
79 | + * ) | ||
80 | + if test -f ${srcdir}/config/$f | ||
81 | + then | ||
82 | + tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
83 | + fi | ||
84 | + ;; | ||
85 | + esac | ||
86 | done | ||
87 | tmake_file="${tmake_file_}" | ||
88 | |||
89 | @@ -1714,6 +1724,10 @@ tm_file_list="options.h" | ||
90 | tm_include_list="options.h insn-constants.h" | ||
91 | for f in $tm_file; do | ||
92 | case $f in | ||
93 | + */linux64.h ) | ||
94 | + tm_file_list="${tm_file_list} ./config/$f" | ||
95 | + tm_include_list="${tm_include_list} ./config/$f" | ||
96 | + ;; | ||
97 | ./* ) | ||
98 | f=`echo $f | sed 's/^..//'` | ||
99 | tm_file_list="${tm_file_list} $f" | ||
100 | -- | ||
101 | 1.7.10.4 | ||
102 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0037-gcc-4.8-PR56797.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0037-gcc-4.8-PR56797.patch new file mode 100644 index 0000000..b5d7b86 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0037-gcc-4.8-PR56797.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | From patchwork Fri Apr 19 09:34:49 2013 | ||
5 | Content-Type: text/plain; charset="utf-8" | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Transfer-Encoding: 7bit | ||
8 | Subject: [ARM] Fix PR56797 | ||
9 | Date: Thu, 18 Apr 2013 23:34:49 -0000 | ||
10 | From: Greta Yorsh <Greta.Yorsh@arm.com> | ||
11 | X-Patchwork-Id: 237891 | ||
12 | Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com> | ||
13 | To: "GCC Patches" <gcc-patches@gcc.gnu.org> | ||
14 | Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>, | ||
15 | "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com> | ||
16 | |||
17 | Fix PR56797 | ||
18 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797 | ||
19 | |||
20 | The problem is that peephole optimizer thinks it can generate an ldm, but | ||
21 | the pattern for ldm no longer matches, because after r188738 it requires | ||
22 | that if one of the destination registers is SP then the base register must | ||
23 | be SP, and it's not SP in the test case. | ||
24 | |||
25 | The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because | ||
26 | peephole doesn't trigger there (because there is a different epilogue | ||
27 | sequence). It looks like a latent problem for other architecture or CPUs. | ||
28 | |||
29 | This patch adds this condition to the peephole optimizer. | ||
30 | |||
31 | No regression on qemu for arm-none-eabi and fixes the test reported in the | ||
32 | PR. I couldn't minimize the test sufficiently to include it in the | ||
33 | testsuite. | ||
34 | |||
35 | Ok for trunk? | ||
36 | |||
37 | Thanks, | ||
38 | Greta | ||
39 | |||
40 | gcc/ | ||
41 | |||
42 | 2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com> | ||
43 | |||
44 | PR target/56797 | ||
45 | * config/arm/arm.c (load_multiple_sequence): Require SP | ||
46 | as base register for loads if SP is in the register list. | ||
47 | |||
48 | |||
49 | diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c | ||
50 | index d00849c..60fef78 100644 | ||
51 | --- a/gcc/config/arm/arm.c | ||
52 | +++ b/gcc/config/arm/arm.c | ||
53 | @@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order, | ||
54 | || (i != nops - 1 && unsorted_regs[i] == base_reg)) | ||
55 | return 0; | ||
56 | |||
57 | + /* Don't allow SP to be loaded unless it is also the base | ||
58 | + register. It guarantees that SP is reset correctly when | ||
59 | + an LDM instruction is interruptted. Otherwise, we might | ||
60 | + end up with a corrupt stack. */ | ||
61 | + if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM) | ||
62 | + return 0; | ||
63 | + | ||
64 | unsorted_offsets[i] = INTVAL (offset); | ||
65 | if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]]) | ||
66 | order[0] = i; | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0040-fix-g++-sysroot.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0040-fix-g++-sysroot.patch new file mode 100644 index 0000000..d50aa5c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0040-fix-g++-sysroot.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | Portions of | ||
2 | |||
3 | http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html | ||
4 | |||
5 | are not upstreamed yet. So lets keep missing pieces. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Index: gcc-4.8.1/gcc/configure.ac | ||
12 | =================================================================== | ||
13 | --- gcc-4.8.1.orig/gcc/configure.ac 2013-07-15 15:55:49.488399132 -0700 | ||
14 | +++ gcc-4.8.1/gcc/configure.ac 2013-07-15 16:02:31.772406679 -0700 | ||
15 | @@ -148,7 +148,9 @@ | ||
16 | if test "${with_sysroot+set}" = set; then | ||
17 | gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` | ||
18 | if test "${gcc_gxx_without_sysroot}"; then | ||
19 | - gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
20 | + if test x${with_sysroot} != x/; then | ||
21 | + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
22 | + fi | ||
23 | gcc_gxx_include_dir_add_sysroot=1 | ||
24 | fi | ||
25 | fi | ||
26 | Index: gcc-4.8.1/gcc/configure | ||
27 | =================================================================== | ||
28 | --- gcc-4.8.1.orig/gcc/configure 2013-07-15 15:55:49.472399132 -0700 | ||
29 | +++ gcc-4.8.1/gcc/configure 2013-07-15 16:02:31.780406680 -0700 | ||
30 | @@ -3325,7 +3325,9 @@ | ||
31 | if test "${with_sysroot+set}" = set; then | ||
32 | gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` | ||
33 | if test "${gcc_gxx_without_sysroot}"; then | ||
34 | - gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
35 | + if test x${with_sysroot} != x/; then | ||
36 | + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | ||
37 | + fi | ||
38 | gcc_gxx_include_dir_add_sysroot=1 | ||
39 | fi | ||
40 | fi | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0041-libtool-avoid-libdir.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0041-libtool-avoid-libdir.patch new file mode 100644 index 0000000..2dd9610 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0041-libtool-avoid-libdir.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Avoid using libdir from .la which usually points to a host path | ||
2 | |||
3 | Upstream-Status: Inappropriate [embedded specific] | ||
4 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
5 | |||
6 | diff --git a/ltmain.sh b/ltmain.sh | ||
7 | index a03433f..1902a90 100644 | ||
8 | --- a/ltmain.sh | ||
9 | +++ b/ltmain.sh | ||
10 | @@ -5628,6 +5628,9 @@ func_mode_link () | ||
11 | absdir="$abs_ladir" | ||
12 | libdir="$abs_ladir" | ||
13 | else | ||
14 | + # Instead of using libdir from .la which usually points to a host path, | ||
15 | + # use the path the .la is contained in. | ||
16 | + libdir="$abs_ladir" | ||
17 | dir="$libdir" | ||
18 | absdir="$libdir" | ||
19 | fi | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0043-cpp.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0043-cpp.patch new file mode 100644 index 0000000..eaf8646 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0043-cpp.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | The OE environment sets and exports CPP as being the target gcc. When building | ||
2 | gcc-cross-canadian for a mingw targetted sdk, the following can be found in | ||
3 | build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: | ||
4 | |||
5 | configure:3641: checking for _FILE_OFFSET_BITS value needed for large files | ||
6 | configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 | ||
7 | configure:3666: $? = 0 | ||
8 | configure:3698: result: no | ||
9 | configure:3786: checking how to run the C preprocessor | ||
10 | configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 | ||
11 | configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c | ||
12 | configure:3876: $? = 0 | ||
13 | |||
14 | Note this is a *build* target (in build-x86_64-linux) so it should be using | ||
15 | the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 headers are | ||
16 | very different, using the wrong cpp is a real problem. It is leaking into | ||
17 | configure through the CPP variable. Ultimately this leads to build failures | ||
18 | related to not being able to include a process.h file for pem-unix.c. | ||
19 | |||
20 | The fix is to ensure we export a sane CPP value into the build environment when | ||
21 | using build targets. We could define a CPP_FOR_BUILD value which may be the version | ||
22 | which needs to be upstreamed but for now, this fix is good enough to avoid the | ||
23 | problem. | ||
24 | |||
25 | RP 22/08/2013 | ||
26 | |||
27 | Upstream-Status: Pending | ||
28 | |||
29 | Index: gcc-4.8.1/Makefile.in | ||
30 | =================================================================== | ||
31 | --- gcc-4.8.1.orig/Makefile.in 2013-03-30 11:25:03.000000000 +0000 | ||
32 | +++ gcc-4.8.1/Makefile.in 2013-08-13 12:03:17.151988882 +0000 | ||
33 | @@ -149,6 +149,7 @@ | ||
34 | AR="$(AR_FOR_BUILD)"; export AR; \ | ||
35 | AS="$(AS_FOR_BUILD)"; export AS; \ | ||
36 | CC="$(CC_FOR_BUILD)"; export CC; \ | ||
37 | + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ | ||
38 | CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ | ||
39 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
40 | CXX="$(CXX_FOR_BUILD)"; export CXX; \ | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0044-gengtypes.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0044-gengtypes.patch new file mode 100644 index 0000000..e38761d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0044-gengtypes.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | gengtype is generated for both the build system and the target. -DGENERATOR_FILE | ||
2 | was added in the patch http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00273.html | ||
3 | and was applied to both versions of gengtype. | ||
4 | |||
5 | Unfortunately the presence of this flag triggers the build configuration (bconfig.h) | ||
6 | to be included for the target build of gengtype. Compiling gengtype with the target | ||
7 | compiler and bconfig.h can result in errors if the build and target systems are | ||
8 | dissimilar. An example case this fails is cross compiling gcc on linux for a darwin | ||
9 | target system: | ||
10 | |||
11 | In file included from /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c:25:0: | ||
12 | | /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c: In function 'void parse_error(const char*, ...)': | ||
13 | | /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/system.h:93:53: error: 'fputc_unlocked' was not declared in this scope | ||
14 | | # define fputc(C, Stream) fputc_unlocked (C, Stream) | ||
15 | |||
16 | which occurs since auto-build.h and auto-host.h have differnet values of | ||
17 | HAVE_FPUTC_UNLOCKED: | ||
18 | |||
19 | #define HAVE_FPUTC_UNLOCKED 1 | ||
20 | /* #undef HAVE_FPUTS_UNLOCKED */ | ||
21 | |||
22 | The obvious fix is to only include the flag on build/ targets which this patch does, however | ||
23 | this also leads to compile errors due to const_tree being undefined but used in double_int.h | ||
24 | |||
25 | I added a GENERATOR_FILE2 flag to workaround those in the | ||
26 | target case and allow the build to succeed. | ||
27 | |||
28 | Only the build/gengtypes should have the -DGENERATOR_FILE | ||
29 | |||
30 | RP 22/8/2013 | ||
31 | |||
32 | Upstream-Status: Pending | ||
33 | |||
34 | Index: gcc-4.8.1/gcc/Makefile.in | ||
35 | =================================================================== | ||
36 | --- gcc-4.8.1.orig/gcc/Makefile.in 2013-08-19 11:40:36.844014424 +0000 | ||
37 | +++ gcc-4.8.1/gcc/Makefile.in 2013-08-19 11:40:37.784014402 +0000 | ||
38 | @@ -3903,27 +3903,29 @@ | ||
39 | |||
40 | gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H) | ||
41 | gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H) | ||
42 | -CFLAGS-gengtype-lex.o += -DGENERATOR_FILE | ||
43 | +CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE | ||
44 | build/gengtype-lex.o: $(BCONFIG_H) | ||
45 | |||
46 | gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \ | ||
47 | $(SYSTEM_H) | ||
48 | gengtype-parse.o: $(CONFIG_H) | ||
49 | -CFLAGS-gengtype-parse.o += -DGENERATOR_FILE | ||
50 | +CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE | ||
51 | build/gengtype-parse.o: $(BCONFIG_H) | ||
52 | |||
53 | gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ | ||
54 | gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ | ||
55 | $(XREGEX_H) | ||
56 | gengtype-state.o: $(CONFIG_H) | ||
57 | -CFLAGS-gengtype-state.o += -DGENERATOR_FILE | ||
58 | +CFLAGS-gengtype-state.o += -DGENERATOR_FILE2 | ||
59 | +CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE | ||
60 | build/gengtype-state.o: $(BCONFIG_H) | ||
61 | |||
62 | gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \ | ||
63 | rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \ | ||
64 | $(OBSTACK_H) $(XREGEX_H) | ||
65 | gengtype.o: $(CONFIG_H) | ||
66 | -CFLAGS-gengtype.o += -DGENERATOR_FILE | ||
67 | +CFLAGS-gengtype.o += -DGENERATOR_FILE2 | ||
68 | +CFLAGS-build/gengtype.o += -DGENERATOR_FILE | ||
69 | build/gengtype.o: $(BCONFIG_H) | ||
70 | |||
71 | build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ | ||
72 | @@ -3988,7 +3990,7 @@ | ||
73 | # any system header is included. | ||
74 | gengtype-lex.c : gengtype-lex.l | ||
75 | -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ | ||
76 | - echo '#include "bconfig.h"' > $@.tmp; \ | ||
77 | + echo '' > $@.tmp; \ | ||
78 | cat $@ >> $@.tmp; \ | ||
79 | mv $@.tmp $@; \ | ||
80 | } | ||
81 | Index: gcc-4.8.1/gcc/double-int.h | ||
82 | =================================================================== | ||
83 | --- gcc-4.8.1.orig/gcc/double-int.h 2013-01-30 11:04:30.000000000 +0000 | ||
84 | +++ gcc-4.8.1/gcc/double-int.h 2013-08-19 11:41:51.564012719 +0000 | ||
85 | @@ -448,10 +448,12 @@ | ||
86 | |||
87 | |||
88 | #ifndef GENERATOR_FILE | ||
89 | +#ifndef GENERATOR_FILE2 | ||
90 | /* Conversion to and from GMP integer representations. */ | ||
91 | |||
92 | void mpz_set_double_int (mpz_t, double_int, bool); | ||
93 | double_int mpz_get_double_int (const_tree, mpz_t, bool); | ||
94 | #endif | ||
95 | +#endif | ||
96 | |||
97 | #endif /* DOUBLE_INT_H */ | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0046-libatomic-deptracking.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0046-libatomic-deptracking.patch new file mode 100644 index 0000000..6ea4f42 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0046-libatomic-deptracking.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | gcc 4.8 won't build with --disable-dependency-tracking since the *.Ppo files | ||
2 | don't get created unless --enable-dependency-tracking is true. | ||
3 | |||
4 | This patch ensures we only use those compiler options when its enabled. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | |||
8 | (Problem was already reported upstream, attached this patch there | ||
9 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) | ||
10 | |||
11 | RP | ||
12 | 2012/09/22 | ||
13 | |||
14 | Index: gcc-4.8.1/libatomic/Makefile.am | ||
15 | =================================================================== | ||
16 | --- gcc-4.8.1.orig/libatomic/Makefile.am 2013-01-14 18:16:23.000000000 +0000 | ||
17 | +++ gcc-4.8.1/libatomic/Makefile.am 2013-09-22 10:38:18.904064750 +0000 | ||
18 | @@ -100,7 +100,8 @@ | ||
19 | IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) | ||
20 | IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) | ||
21 | |||
22 | -M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
23 | +@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
24 | +@AMDEP_FALSE@M_DEPS = | ||
25 | M_SIZE = -DN=$(PAT_N) | ||
26 | M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) | ||
27 | M_FILE = $(PAT_BASE)_n.c | ||
28 | Index: gcc-4.8.1/libatomic/Makefile.in | ||
29 | =================================================================== | ||
30 | --- gcc-4.8.1.orig/libatomic/Makefile.in 2013-05-31 09:09:26.000000000 +0000 | ||
31 | +++ gcc-4.8.1/libatomic/Makefile.in 2013-09-22 10:40:42.520059917 +0000 | ||
32 | @@ -298,7 +298,8 @@ | ||
33 | PAT_S = $(word 3,$(PAT_SPLIT)) | ||
34 | IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) | ||
35 | IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) | ||
36 | -M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
37 | +@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo | ||
38 | +@AMDEP_FALSE@M_DEPS = | ||
39 | M_SIZE = -DN=$(PAT_N) | ||
40 | M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) | ||
41 | M_FILE = $(PAT_BASE)_n.c | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0047-repomembug.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0047-repomembug.patch new file mode 100644 index 0000000..9afd55c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0047-repomembug.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | When compiling a project using -frepo, .rpo files are written alongside | ||
2 | the .o file, the symbols either have O or C against them. During final linking, | ||
3 | the objects can be recompiled with some of the entries tweaked/chosen by the | ||
4 | tlink.c code (visible with TLINK_VERBOSE=3), it does this by changing O -> C | ||
5 | in the .rpo files. | ||
6 | |||
7 | My tests showed that init_repo (cp/repo.c) was correctly calling | ||
8 | IDENTIFIER_REPO_CHOSEN against the right identifers and setting the | ||
9 | chosen bit. | ||
10 | |||
11 | By the time finish_repo() or emit_repo_p() were called, the pointer returned | ||
12 | by get_identifier() for the symbol marked during init_repo had changed and | ||
13 | the chosen bit was no longer set. This lead to linking bugs like: | ||
14 | |||
15 | collect: relinking | ||
16 | collect2: error: '_ZNK6sudoku5ClearINS_8SequenceEEclERS1_' was assigned to 'board.rpo', but was not defined during recompilation, or vice versa | ||
17 | |||
18 | The problem is that the garbage collection is getting called before | ||
19 | finish_repo() is called and ggc_protect_identifiers is set to false | ||
20 | so the identifiers are not preserved. They are recreated but the | ||
21 | chosen bits get wiped out which is why the pointer changes and the | ||
22 | chosen bit is not set. | ||
23 | |||
24 | The fix is to change ggc_protect_identifiers *after* the finish_repo | ||
25 | calls are made. | ||
26 | |||
27 | Reproduction is tricky since you need to trigger the garbage collector at | ||
28 | just the right moment. | ||
29 | |||
30 | RP 2013/10/9 | ||
31 | |||
32 | [YOCTO #5133] | ||
33 | |||
34 | Upstream-Status: Pending | ||
35 | |||
36 | Index: gcc-4.8.1/gcc/toplev.c | ||
37 | =================================================================== | ||
38 | --- gcc-4.8.1.orig/gcc/toplev.c 2013-03-28 08:29:51.000000000 +0000 | ||
39 | +++ gcc-4.8.1/gcc/toplev.c 2013-10-09 20:27:17.089228023 +0000 | ||
40 | @@ -551,11 +551,11 @@ | ||
41 | if (flag_syntax_only || flag_wpa) | ||
42 | return; | ||
43 | |||
44 | - ggc_protect_identifiers = false; | ||
45 | - | ||
46 | /* This must also call finalize_compilation_unit. */ | ||
47 | lang_hooks.decls.final_write_globals (); | ||
48 | |||
49 | + ggc_protect_identifiers = false; | ||
50 | + | ||
51 | if (seen_error ()) | ||
52 | return; | ||
53 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch new file mode 100644 index 0000000..b98f8ff --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 9e0e19eac2562f73858602fe26e2044eb8b20c47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com> | ||
3 | Date: Wed, 5 Feb 2014 16:52:31 +0200 | ||
4 | Subject: [PATCH] Enable SPE & AltiVec generation on powepc*linux target | ||
5 | |||
6 | When is configured with --target=powerpc-linux, the resulting GCC will | ||
7 | not be able to generate code for SPE targets (e500v1/v2). | ||
8 | GCC configured with --target=powerpc-linuxspe will not be able to | ||
9 | generate AltiVec instructions (for e6500). | ||
10 | This patch modifies the configured file such that SPE or AltiVec code | ||
11 | can be generated when gcc is configured with --target=powerpc-linux. | ||
12 | The ABI and speciffic instructions can be selected through the | ||
13 | "-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters. | ||
14 | |||
15 | Upstream-Status: Inappropriate [configuration] | ||
16 | |||
17 | Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com> | ||
18 | --- | ||
19 | gcc/config.gcc | 7 ++++++- | ||
20 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/gcc/config.gcc b/gcc/config.gcc | ||
23 | index cb7a94e..d392c2b 100644 | ||
24 | --- a/gcc/config.gcc | ||
25 | +++ b/gcc/config.gcc | ||
26 | @@ -2068,7 +2068,12 @@ powerpc-*-rtems*) | ||
27 | tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm" | ||
28 | ;; | ||
29 | powerpc*-*-linux*) | ||
30 | - tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" | ||
31 | + case ${target} in | ||
32 | + powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*) | ||
33 | + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" ;; | ||
34 | + *) | ||
35 | + tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" ;; | ||
36 | + esac | ||
37 | extra_options="${extra_options} rs6000/sysv4.opt" | ||
38 | tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" | ||
39 | case ${target} in | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch new file mode 100644 index 0000000..aead6f6 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From cb9b1c041b634a4c128896e3d3eed4082608c797 Mon Sep 17 00:00:00 2001 | ||
4 | From: Khem Raj <raj.khem@gmail.com> | ||
5 | Date: Sat, 3 May 2014 19:25:17 -0700 | ||
6 | Subject: [PATCH] Revert "2013-05-21 Christian Bruel | ||
7 | <christian.bruel@st.com>" | ||
8 | |||
9 | This reverts commit 3983036a8b6b2710c57777194f21507819a73553. | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Conflicts: | ||
14 | gcc/ChangeLog | ||
15 | --- | ||
16 | gcc/ChangeLog | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- | ||
17 | gcc/dwarf2out.c | 33 +++++---- | ||
18 | 2 files changed, 234 insertions(+), 18 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c | ||
21 | index 1272326..6ac2b28 100644 | ||
22 | --- a/gcc/dwarf2out.c | ||
23 | +++ b/gcc/dwarf2out.c | ||
24 | @@ -10870,27 +10870,25 @@ static dw_loc_descr_ref | ||
25 | multiple_reg_loc_descriptor (rtx rtl, rtx regs, | ||
26 | enum var_init_status initialized) | ||
27 | { | ||
28 | - int size, i; | ||
29 | + int nregs, size, i; | ||
30 | + unsigned reg; | ||
31 | dw_loc_descr_ref loc_result = NULL; | ||
32 | |||
33 | - /* Simple, contiguous registers. */ | ||
34 | - if (regs == NULL_RTX) | ||
35 | - { | ||
36 | - unsigned reg = REGNO (rtl); | ||
37 | - int nregs; | ||
38 | - | ||
39 | + reg = REGNO (rtl); | ||
40 | #ifdef LEAF_REG_REMAP | ||
41 | - if (crtl->uses_only_leaf_regs) | ||
42 | - { | ||
43 | - int leaf_reg = LEAF_REG_REMAP (reg); | ||
44 | - if (leaf_reg != -1) | ||
45 | - reg = (unsigned) leaf_reg; | ||
46 | - } | ||
47 | + if (crtl->uses_only_leaf_regs) | ||
48 | + { | ||
49 | + int leaf_reg = LEAF_REG_REMAP (reg); | ||
50 | + if (leaf_reg != -1) | ||
51 | + reg = (unsigned) leaf_reg; | ||
52 | + } | ||
53 | #endif | ||
54 | + gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl)); | ||
55 | + nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)]; | ||
56 | |||
57 | - gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl)); | ||
58 | - nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)]; | ||
59 | - | ||
60 | + /* Simple, contiguous registers. */ | ||
61 | + if (regs == NULL_RTX) | ||
62 | + { | ||
63 | size = GET_MODE_SIZE (GET_MODE (rtl)) / nregs; | ||
64 | |||
65 | loc_result = NULL; | ||
66 | @@ -10918,9 +10916,10 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs, | ||
67 | { | ||
68 | dw_loc_descr_ref t; | ||
69 | |||
70 | - t = one_reg_loc_descriptor (dbx_reg_number (XVECEXP (regs, 0, i)), | ||
71 | + t = one_reg_loc_descriptor (REGNO (XVECEXP (regs, 0, i)), | ||
72 | VAR_INIT_STATUS_INITIALIZED); | ||
73 | add_loc_descr (&loc_result, t); | ||
74 | + size = GET_MODE_SIZE (GET_MODE (XVECEXP (regs, 0, 0))); | ||
75 | add_loc_descr_op_piece (&loc_result, size); | ||
76 | } | ||
77 | |||
78 | -- | ||
79 | 1.9.2 | ||
80 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0051-eabispe.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0051-eabispe.patch new file mode 100644 index 0000000..55e3890 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0051-eabispe.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Taken from http://gcc.gnu.org/ml/gcc-patches/2014-04/msg02064.html | ||
4 | |||
5 | 2014-04-30 Cesar Philippidis <cesar@codesourcery.com> | ||
6 | |||
7 | gcc/ | ||
8 | * dwarf2cfi.c (dwf_regno): Don't assert reg is a pseudo | ||
9 | register. | ||
10 | |||
11 | |||
12 | diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c | ||
13 | index 4180890..40ef0e2 100644 | ||
14 | --- a/gcc/dwarf2cfi.c | ||
15 | +++ b/gcc/dwarf2cfi.c | ||
16 | @@ -906,7 +906,6 @@ notice_eh_throw (rtx insn) | ||
17 | static inline unsigned | ||
18 | dwf_regno (const_rtx reg) | ||
19 | { | ||
20 | - gcc_assert (REGNO (reg) < FIRST_PSEUDO_REGISTER); | ||
21 | return DWARF_FRAME_REGNUM (REGNO (reg)); | ||
22 | } | ||
23 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch new file mode 100644 index 0000000..b4be18e --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From e44a6d438db4848c2a555be773568a3cf7994206 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexandru-Cezar Sardan <alexandru.sardan-KZfg59tc24xl57MIdRCFDg@public.gmane.org> | ||
3 | Date: Mon, 26 May 2014 12:11:13 +0300 | ||
4 | Subject: [PATCH] Fix E500 with SPE errors with the _Decimal64 type | ||
5 | |||
6 | [gcc] | ||
7 | 2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> | ||
8 | |||
9 | PR target/60735 | ||
10 | * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64 case): | ||
11 | If mode is DDmode and TARGET_E500_DOUBLE allow move. | ||
12 | |||
13 | * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print some | ||
14 | more debug information for E500 if -mdebug=reg. | ||
15 | |||
16 | [gcc/testsuite] | ||
17 | 2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> | ||
18 | |||
19 | PR target/60735 | ||
20 | * gcc.target/powerpc/pr60735.c: New test. Insure _Decimal64 does | ||
21 | not cause errors if -mspe. | ||
22 | |||
23 | Upstream status: Accepted | ||
24 | |||
25 | This solves upstream bug 60735 | ||
26 | (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60735). | ||
27 | |||
28 | Patch taken from https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=209664 | ||
29 | --- | ||
30 | gcc/config/rs6000/rs6000.c | 18 ++++++++++++++++++ | ||
31 | gcc/config/rs6000/rs6000.md | 3 ++- | ||
32 | gcc/testsuite/gcc.target/powerpc/pr60735.c | 11 +++++++++++ | ||
33 | 3 files changed, 31 insertions(+), 1 deletion(-) | ||
34 | create mode 100644 gcc/testsuite/gcc.target/powerpc/pr60735.c | ||
35 | |||
36 | diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c | ||
37 | index 494efc5..6dcf440 100644 | ||
38 | --- a/gcc/config/rs6000/rs6000.c | ||
39 | +++ b/gcc/config/rs6000/rs6000.c | ||
40 | @@ -2283,6 +2283,24 @@ rs6000_debug_reg_global (void) | ||
41 | if (rs6000_float_gprs) | ||
42 | fprintf (stderr, DEBUG_FMT_S, "float_gprs", "true"); | ||
43 | |||
44 | + fprintf (stderr, DEBUG_FMT_S, "fprs", | ||
45 | + (TARGET_FPRS ? "true" : "false")); | ||
46 | + | ||
47 | + fprintf (stderr, DEBUG_FMT_S, "single_float", | ||
48 | + (TARGET_SINGLE_FLOAT ? "true" : "false")); | ||
49 | + | ||
50 | + fprintf (stderr, DEBUG_FMT_S, "double_float", | ||
51 | + (TARGET_DOUBLE_FLOAT ? "true" : "false")); | ||
52 | + | ||
53 | + fprintf (stderr, DEBUG_FMT_S, "soft_float", | ||
54 | + (TARGET_SOFT_FLOAT ? "true" : "false")); | ||
55 | + | ||
56 | + fprintf (stderr, DEBUG_FMT_S, "e500_single", | ||
57 | + (TARGET_E500_SINGLE ? "true" : "false")); | ||
58 | + | ||
59 | + fprintf (stderr, DEBUG_FMT_S, "e500_double", | ||
60 | + (TARGET_E500_DOUBLE ? "true" : "false")); | ||
61 | + | ||
62 | if (TARGET_LINK_STACK) | ||
63 | fprintf (stderr, DEBUG_FMT_S, "link_stack", "true"); | ||
64 | |||
65 | diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md | ||
66 | index 64c9e7c..9cefe15 100644 | ||
67 | --- a/gcc/config/rs6000/rs6000.md | ||
68 | +++ b/gcc/config/rs6000/rs6000.md | ||
69 | @@ -9395,7 +9395,8 @@ | ||
70 | (match_operand:FMOVE64 1 "input_operand" "r,Y,r,G,H,F"))] | ||
71 | "! TARGET_POWERPC64 | ||
72 | && ((TARGET_FPRS && TARGET_SINGLE_FLOAT) | ||
73 | - || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE) | ||
74 | + || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE | ||
75 | + || (<MODE>mode == DDmode && TARGET_E500_DOUBLE)) | ||
76 | && (gpc_reg_operand (operands[0], <MODE>mode) | ||
77 | || gpc_reg_operand (operands[1], <MODE>mode))" | ||
78 | "#" | ||
79 | diff --git a/gcc/testsuite/gcc.target/powerpc/pr60735.c b/gcc/testsuite/gcc.target/powerpc/pr60735.c | ||
80 | new file mode 100644 | ||
81 | index 0000000..9bac30b | ||
82 | --- /dev/null | ||
83 | +++ b/gcc/testsuite/gcc.target/powerpc/pr60735.c | ||
84 | @@ -0,0 +1,11 @@ | ||
85 | +/* { dg-do compile } */ | ||
86 | +/* { dg-options "-mcpu=8548 -mspe -mabi=spe -O2" } */ | ||
87 | +/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */ | ||
88 | + | ||
89 | +/* In PR60735, the type _Decimal64 generated an insn not found message. */ | ||
90 | + | ||
91 | +void | ||
92 | +pr60735 (_Decimal64 *p, _Decimal64 *q) | ||
93 | +{ | ||
94 | + *p = *q; | ||
95 | +} | ||
96 | -- | ||
97 | 1.7.9.5 | ||
98 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch new file mode 100644 index 0000000..23b445c --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From a22a222c8f9299f6c07a0274388ade7d4ab8c28d Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
3 | Date: Fri, 20 Jun 2014 16:41:08 -0400 | ||
4 | Subject: [PATCH] gcc: fix segfault from calling free on non-malloc'd area | ||
5 | |||
6 | We see the following on a 32bit gcc installed on 64 bit host: | ||
7 | |||
8 | Reading symbols from ./i586-pokymllib32-linux-gcc...done. | ||
9 | (gdb) run | ||
10 | Starting program: x86-pokymllib32-linux/lib32-gcc/4.9.0-r0/image/usr/bin/i586-pokymllib32-linux-gcc | ||
11 | |||
12 | Program received signal SIGSEGV, Segmentation fault. | ||
13 | 0xf7e957e0 in free () from /lib/i386-linux-gnu/libc.so.6 | ||
14 | (gdb) bt | ||
15 | #0 0xf7e957e0 in free () from /lib/i386-linux-gnu/libc.so.6 | ||
16 | #1 0x0804b73c in set_multilib_dir () at gcc-4.9.0/gcc/gcc.c:7827 | ||
17 | #2 main (argc=1, argv=0xffffd504) at gcc-4.9.0/gcc/gcc.c:6688 | ||
18 | (gdb) | ||
19 | |||
20 | The problem arises because we conditionally assign the pointer we | ||
21 | eventually free, and the conditional may assign the pointer to the | ||
22 | non-malloc'd internal string "." which fails when we free it here: | ||
23 | |||
24 | if (multilib_dir == NULL && multilib_os_dir != NULL | ||
25 | && strcmp (multilib_os_dir, ".") == 0) | ||
26 | { | ||
27 | free (CONST_CAST (char *, multilib_os_dir)); | ||
28 | ... | ||
29 | |||
30 | As suggested by Jakub, ensure the "." case is also malloc'd via | ||
31 | xstrdup() and hence the pointer for the "." case can be freed. | ||
32 | |||
33 | Cc: Jakub Jelinek <jakub@redhat.com> | ||
34 | Cc: Jeff Law <law@redhat.com> | ||
35 | Cc: Matthias Klose <doko@ubuntu.com> | ||
36 | CC: Tobias Burnus <burnus@net-b.de> | ||
37 | Upstream-Status: Accepted [ https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02069.html ] | ||
38 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
39 | |||
40 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
41 | index 9ac18e60d801..168acf7eb0c9 100644 | ||
42 | --- a/gcc/gcc.c | ||
43 | +++ b/gcc/gcc.c | ||
44 | @@ -7790,10 +7790,15 @@ set_multilib_dir (void) | ||
45 | q2++; | ||
46 | if (*q2 == ':') | ||
47 | ml_end = q2; | ||
48 | - new_multilib_os_dir = XNEWVEC (char, ml_end - q); | ||
49 | - memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1); | ||
50 | - new_multilib_os_dir[ml_end - q - 1] = '\0'; | ||
51 | - multilib_os_dir = *new_multilib_os_dir ? new_multilib_os_dir : "."; | ||
52 | + if (ml_end - q == 1) | ||
53 | + multilib_os_dir = xstrdup ("."); | ||
54 | + else | ||
55 | + { | ||
56 | + new_multilib_os_dir = XNEWVEC (char, ml_end - q); | ||
57 | + memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1); | ||
58 | + new_multilib_os_dir[ml_end - q - 1] = '\0'; | ||
59 | + multilib_os_dir = new_multilib_os_dir; | ||
60 | + } | ||
61 | |||
62 | if (q2 < end && *q2 == ':') | ||
63 | { | ||
64 | -- | ||
65 | 1.9.2 | ||
66 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch new file mode 100644 index 0000000..4c98ca2 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | gcc/Makefile.in: fix parallel building failure | ||
2 | |||
3 | The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included | ||
4 | config.h which was a generated file. But no explicity rule | ||
5 | to clarify the dependency. There was potential building | ||
6 | failure while parallel make. | ||
7 | |||
8 | For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C | ||
9 | source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the | ||
10 | '$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these | ||
11 | objects. | ||
12 | |||
13 | For errors.o, it is part of gengtype, and the gengtype generator program | ||
14 | is special: Two versions are built. One is for the build machine, and one | ||
15 | is for the host. We refered what gengtype-parse.o did (which also is part | ||
16 | of gengtype). | ||
17 | |||
18 | [GCC #61899] | ||
19 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899 | ||
20 | |||
21 | Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list | ||
22 | |||
23 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
24 | --- | ||
25 | gcc/Makefile.in | 7 ++++++- | ||
26 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
29 | index 6475cba..56e50bb 100644 | ||
30 | --- a/gcc/Makefile.in | ||
31 | +++ b/gcc/Makefile.in | ||
32 | @@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \ | ||
33 | opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \ | ||
34 | hash-table.o file-find.o | ||
35 | |||
36 | +# Objects compiled from one C source file gcc-ar.c | ||
37 | +OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o | ||
38 | + | ||
39 | # This lists all host objects for the front ends. | ||
40 | ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) | ||
41 | |||
42 | ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \ | ||
43 | $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \ | ||
44 | $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \ | ||
45 | - lto-wrapper.o | ||
46 | + lto-wrapper.o $(OBJS-gcc-ar) | ||
47 | |||
48 | # This lists all host object files, whether they are included in this | ||
49 | # compilation or not. | ||
50 | @@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H) | ||
51 | CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE | ||
52 | build/gengtype-parse.o: $(BCONFIG_H) | ||
53 | |||
54 | +errors.o : $(CONFIG_H) | ||
55 | + | ||
56 | gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ | ||
57 | gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ | ||
58 | $(XREGEX_H) | ||
59 | -- | ||
60 | 1.8.1.2 | ||
61 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0055-PR-rtl-optimization-61801.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0055-PR-rtl-optimization-61801.patch new file mode 100644 index 0000000..b27abde --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0055-PR-rtl-optimization-61801.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 556537c4ad0df4cbebb74197bb2bdea75cf5dd35 Mon Sep 17 00:00:00 2001 | ||
2 | From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Thu, 17 Jul 2014 07:48:49 +0000 | ||
4 | Subject: [PATCH] 2014-07-17 Richard Biener <rguenther@suse.de> | ||
5 | |||
6 | PR rtl-optimization/61801 | ||
7 | * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and | ||
8 | ASM_INPUT don't set reg_pending_barrier if it appears in a | ||
9 | debug-insn. | ||
10 | |||
11 | |||
12 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212739 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
13 | |||
14 | Upstream-Status: Backport [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801] | ||
15 | Signed-off-by: Peter A. Bigot <pab@pabigot.com> | ||
16 | |||
17 | --- | ||
18 | gcc/sched-deps.c | 3 ++- | ||
19 | |||
20 | diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c | ||
21 | index efc4223..df29bd3 100644 | ||
22 | --- a/gcc/sched-deps.c | ||
23 | +++ b/gcc/sched-deps.c | ||
24 | @@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) | ||
25 | Consider for instance a volatile asm that changes the fpu rounding | ||
26 | mode. An insn should not be moved across this even if it only uses | ||
27 | pseudo-regs because it might give an incorrectly rounded result. */ | ||
28 | - if (code != ASM_OPERANDS || MEM_VOLATILE_P (x)) | ||
29 | + if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x)) | ||
30 | + && !DEBUG_INSN_P (insn)) | ||
31 | reg_pending_barrier = TRUE_BARRIER; | ||
32 | |||
33 | /* For all ASM_OPERANDS, we must traverse the vector of input operands. | ||
34 | -- | ||
35 | 1.8.5.5 | ||
36 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0056-top-level-reorder_gcc-bug-61144.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0056-top-level-reorder_gcc-bug-61144.patch new file mode 100644 index 0000000..f448932 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0056-top-level-reorder_gcc-bug-61144.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | |||
2 | Upstream-Status: Backport | ||
3 | |||
4 | Originally-submitted-by: Peter Urbanec <openembedded-devel@urbanec.net> | ||
5 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
6 | |||
7 | --- /dev/null | ||
8 | +++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch | ||
9 | @@ -0,0 +1,21 @@ | ||
10 | +--- a/gcc/varpool.c 2014/10/05 02:50:01 215895 | ||
11 | ++++ b/gcc/varpool.c 2014/10/05 04:52:19 215896 | ||
12 | +@@ -329,8 +329,16 @@ | ||
13 | + | ||
14 | + /* Variables declared 'const' without an initializer | ||
15 | + have zero as the initializer if they may not be | ||
16 | +- overridden at link or run time. */ | ||
17 | +- if (!DECL_INITIAL (real_decl) | ||
18 | ++ overridden at link or run time. | ||
19 | ++ | ||
20 | ++ It is actually requirement for C++ compiler to optimize const variables | ||
21 | ++ consistently. As a GNU extension, do not enfore this rule for user defined | ||
22 | ++ weak variables, so we support interposition on: | ||
23 | ++ static const int dummy = 0; | ||
24 | ++ extern const int foo __attribute__((__weak__, __alias__("dummy"))); | ||
25 | ++ */ | ||
26 | ++ if ((!DECL_INITIAL (real_decl) | ||
27 | ++ || (DECL_WEAK (decl) && !DECL_COMDAT (decl))) | ||
28 | + && (DECL_EXTERNAL (decl) || decl_replaceable_p (decl))) | ||
29 | + return error_mark_node; | ||
30 | + | ||
31 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0058-gcc-r212171.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0058-gcc-r212171.patch new file mode 100644 index 0000000..4b312d4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0058-gcc-r212171.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | From ca03cf1b133d66eb978c68f6dbc345e9aabcba88 Mon Sep 17 00:00:00 2001 | ||
2 | From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Mon, 30 Jun 2014 19:30:52 +0000 | ||
4 | Subject: [PATCH] r212171 | ||
5 | |||
6 | * except.c (emit_note_eh_region_end): New helper | ||
7 | function. (convert_to_eh_region_ranges): Use | ||
8 | emit_note_eh_region_end to emit EH_REGION_END note. | ||
9 | * jump.c (cleanup_barriers): Do not split a call and its | ||
10 | corresponding CALL_ARG_LOCATION note. | ||
11 | |||
12 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212171 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
13 | |||
14 | Upstream-status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212171] | ||
15 | Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com> | ||
16 | --- | ||
17 | gcc/except.c | 23 ++++++++++++++++++----- | ||
18 | gcc/jump.c | 19 +++++++++++++++---- | ||
19 | 2 files changed, 33 insertions(+), 9 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/except.c b/gcc/except.c | ||
22 | index dc5c1d2..7ac114f 100644 | ||
23 | --- a/gcc/except.c | ||
24 | +++ b/gcc/except.c | ||
25 | @@ -2466,6 +2466,20 @@ add_call_site (rtx landing_pad, int action, int section) | ||
26 | return call_site_base + crtl->eh.call_site_record_v[section]->length () - 1; | ||
27 | } | ||
28 | |||
29 | +static rtx | ||
30 | +emit_note_eh_region_end (rtx insn) | ||
31 | +{ | ||
32 | + rtx next = NEXT_INSN (insn); | ||
33 | + | ||
34 | + /* Make sure we do not split a call and its corresponding | ||
35 | + CALL_ARG_LOCATION note. */ | ||
36 | + if (next && NOTE_P (next) | ||
37 | + && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION) | ||
38 | + insn = next; | ||
39 | + | ||
40 | + return emit_note_after (NOTE_INSN_EH_REGION_END, insn); | ||
41 | +} | ||
42 | + | ||
43 | /* Turn REG_EH_REGION notes back into NOTE_INSN_EH_REGION notes. | ||
44 | The new note numbers will not refer to region numbers, but | ||
45 | instead to call site entries. */ | ||
46 | @@ -2544,8 +2558,8 @@ convert_to_eh_region_ranges (void) | ||
47 | note = emit_note_before (NOTE_INSN_EH_REGION_BEG, | ||
48 | first_no_action_insn_before_switch); | ||
49 | NOTE_EH_HANDLER (note) = call_site; | ||
50 | - note = emit_note_after (NOTE_INSN_EH_REGION_END, | ||
51 | - last_no_action_insn_before_switch); | ||
52 | + note | ||
53 | + = emit_note_eh_region_end (last_no_action_insn_before_switch); | ||
54 | NOTE_EH_HANDLER (note) = call_site; | ||
55 | gcc_assert (last_action != -3 | ||
56 | || (last_action_insn | ||
57 | @@ -2569,8 +2583,7 @@ convert_to_eh_region_ranges (void) | ||
58 | first_no_action_insn = NULL_RTX; | ||
59 | } | ||
60 | |||
61 | - note = emit_note_after (NOTE_INSN_EH_REGION_END, | ||
62 | - last_action_insn); | ||
63 | + note = emit_note_eh_region_end (last_action_insn); | ||
64 | NOTE_EH_HANDLER (note) = call_site; | ||
65 | } | ||
66 | |||
67 | @@ -2617,7 +2630,7 @@ convert_to_eh_region_ranges (void) | ||
68 | |||
69 | if (last_action >= -1 && ! first_no_action_insn) | ||
70 | { | ||
71 | - note = emit_note_after (NOTE_INSN_EH_REGION_END, last_action_insn); | ||
72 | + note = emit_note_eh_region_end (last_action_insn); | ||
73 | NOTE_EH_HANDLER (note) = call_site; | ||
74 | } | ||
75 | |||
76 | diff --git a/gcc/jump.c b/gcc/jump.c | ||
77 | index 9418f65..a5e5f52 100644 | ||
78 | --- a/gcc/jump.c | ||
79 | +++ b/gcc/jump.c | ||
80 | @@ -121,15 +121,26 @@ rebuild_jump_labels_chain (rtx chain) | ||
81 | static unsigned int | ||
82 | cleanup_barriers (void) | ||
83 | { | ||
84 | - rtx insn, next, prev; | ||
85 | - for (insn = get_insns (); insn; insn = next) | ||
86 | + rtx insn; | ||
87 | + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) | ||
88 | { | ||
89 | - next = NEXT_INSN (insn); | ||
90 | if (BARRIER_P (insn)) | ||
91 | { | ||
92 | - prev = prev_nonnote_insn (insn); | ||
93 | + rtx prev = prev_nonnote_insn (insn); | ||
94 | if (!prev) | ||
95 | continue; | ||
96 | + | ||
97 | + if (CALL_P (prev)) | ||
98 | + { | ||
99 | + /* Make sure we do not split a call and its corresponding | ||
100 | + CALL_ARG_LOCATION note. */ | ||
101 | + rtx next = NEXT_INSN (prev); | ||
102 | + | ||
103 | + if (NOTE_P (next) | ||
104 | + && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION) | ||
105 | + prev = next; | ||
106 | + } | ||
107 | + | ||
108 | if (BARRIER_P (prev)) | ||
109 | delete_insn (insn); | ||
110 | else if (prev != PREV_INSN (insn)) | ||
111 | -- | ||
112 | 1.7.9.5 | ||
113 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0059-gcc-PR-rtl-optimization-63348.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0059-gcc-PR-rtl-optimization-63348.patch new file mode 100644 index 0000000..6d24aa4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/0059-gcc-PR-rtl-optimization-63348.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 6eae3e637fcc22d21b51d44d61e3a9cb4825e776 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Thu, 30 Oct 2014 20:37:14 -0700 | ||
4 | Subject: [PATCH]PR rtl-optimization/63348 | ||
5 | |||
6 | PR rtl-optimization/63348 | ||
7 | * emit-rtl.c (try_split): Do not emit extra barrier. | ||
8 | |||
9 | Note: this patch is to fix the side effect introduced by r212171 which was reported at: | ||
10 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63348 | ||
11 | |||
12 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215613 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
13 | |||
14 | Upstream-status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215613] | ||
15 | Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com> | ||
16 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
17 | --- | ||
18 | gcc/emit-rtl.c | 11 ----------- | ||
19 | 1 files changed, 0 insertions(+), 11 deletions(-) | ||
20 | |||
21 | diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c | ||
22 | index 4736f8d..ae69dbd 100644 | ||
23 | --- a/gcc/emit-rtl.c | ||
24 | +++ b/gcc/emit-rtl.c | ||
25 | @@ -3422,7 +3422,6 @@ try_split (rtx pat, rtx trial, int last) | ||
26 | { | ||
27 | rtx before = PREV_INSN (trial); | ||
28 | rtx after = NEXT_INSN (trial); | ||
29 | - int has_barrier = 0; | ||
30 | rtx note, seq, tem; | ||
31 | int probability; | ||
32 | rtx insn_last, insn; | ||
33 | @@ -3441,14 +3440,6 @@ try_split (rtx pat, rtx trial, int last) | ||
34 | |||
35 | split_branch_probability = -1; | ||
36 | |||
37 | - /* If we are splitting a JUMP_INSN, it might be followed by a BARRIER. | ||
38 | - We may need to handle this specially. */ | ||
39 | - if (after && BARRIER_P (after)) | ||
40 | - { | ||
41 | - has_barrier = 1; | ||
42 | - after = NEXT_INSN (after); | ||
43 | - } | ||
44 | - | ||
45 | if (!seq) | ||
46 | return trial; | ||
47 | |||
48 | @@ -3594,8 +3585,6 @@ try_split (rtx pat, rtx trial, int last) | ||
49 | tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial)); | ||
50 | |||
51 | delete_insn (trial); | ||
52 | - if (has_barrier) | ||
53 | - emit_barrier_after (tem); | ||
54 | |||
55 | /* Recursively call try_split for each new insn created; by the | ||
56 | time control returns here that insn will be fully split, so | ||
57 | -- | ||
58 | 1.7.1 | ||
59 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/AArch64-Define-BE-loader-name-default-be.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/AArch64-Define-BE-loader-name-default-be.patch new file mode 100644 index 0000000..8755241 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/AArch64-Define-BE-loader-name-default-be.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Index: gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h | ||
2 | =================================================================== | ||
3 | --- gcc-linaro-4.8-2014.03.orig/gcc/config/aarch64/aarch64-linux.h | ||
4 | +++ gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h | ||
5 | @@ -21,10 +21,23 @@ | ||
6 | #ifndef GCC_AARCH64_LINUX_H | ||
7 | #define GCC_AARCH64_LINUX_H | ||
8 | |||
9 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
10 | - | ||
11 | #define CPP_SPEC "%{pthread:-D_REENTRANT}" | ||
12 | |||
13 | +#if TARGET_BIG_ENDIAN_DEFAULT | ||
14 | +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{!mlittle-endian:_be}.so.1" | ||
15 | + | ||
16 | +#define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
17 | + %{static:-Bstatic} \ | ||
18 | + %{shared:-shared} \ | ||
19 | + %{symbolic:-Bsymbolic} \ | ||
20 | + %{rdynamic:-export-dynamic} \ | ||
21 | + -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ | ||
22 | + -X \ | ||
23 | + %{mbig-endian:-EB} %{mlittle-endian:-EL} \ | ||
24 | + -maarch64linux%{mabi=ilp32:32}%{!mlittle-endian:b}" | ||
25 | +#else | ||
26 | +#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
27 | + | ||
28 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
29 | %{static:-Bstatic} \ | ||
30 | %{shared:-shared} \ | ||
31 | @@ -34,6 +47,7 @@ | ||
32 | -X \ | ||
33 | %{mbig-endian:-EB} %{mlittle-endian:-EL} \ | ||
34 | -maarch64linux%{mabi=ilp32:32}%{mbig-endian:b}" | ||
35 | +#endif | ||
36 | |||
37 | #define LINK_SPEC LINUX_TARGET_LINK_SPEC | ||
38 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/use-lib-for-aarch64.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/use-lib-for-aarch64.patch new file mode 100644 index 0000000..62bb110 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/use-lib-for-aarch64.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux | ||
2 | index 147452b..1930046 100644 | ||
3 | --- a/gcc/config/aarch64/t-aarch64-linux | ||
4 | +++ b/gcc/config/aarch64/t-aarch64-linux | ||
5 | @@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm | ||
6 | LIB1ASMFUNCS = _aarch64_sync_cache_range | ||
7 | |||
8 | AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) | ||
9 | -MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) | ||
10 | +MULTILIB_OSDIRNAMES = mabi.lp64=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) | ||
11 | MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) | ||
12 | |||
13 | MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32 | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-common-4.8.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-common-4.8.inc new file mode 100644 index 0000000..ea97fdb --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-common-4.8.inc | |||
@@ -0,0 +1,2 @@ | |||
1 | BASEPV = "4.8" | ||
2 | PV = "linaro-${BASEPV}" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-common-4.9.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-common-4.9.inc new file mode 100644 index 0000000..52f0696 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-common-4.9.inc | |||
@@ -0,0 +1,2 @@ | |||
1 | BASEPV = "4.9" | ||
2 | PV = "linaro-${BASEPV}" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-runtime_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-runtime_linaro-4.8.bb new file mode 100644 index 0000000..971c1e4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-runtime_linaro-4.8.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/gcc-runtime_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-runtime_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-runtime_linaro-4.9.bb new file mode 100644 index 0000000..c298881 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-runtime_linaro-4.9.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/gcc-runtime_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-4.8.bb new file mode 100644 index 0000000..433f4e0 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-4.8.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
3 | require recipes-devtools/gcc/gcc-source.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-4.9.bb new file mode 100644 index 0000000..f77b2b2 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-4.9.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
3 | require recipes-devtools/gcc/gcc-source.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc_linaro-4.8.bb new file mode 100644 index 0000000..73ff5c4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc_linaro-4.8.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/gcc_${BASEPV}.bb | ||
3 | |||
4 | DEPENDS += "gmp-native" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/gcc_linaro-4.9.bb new file mode 100644 index 0000000..0306ed8 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc_linaro-4.9.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/gcc_${BASEPV}.bb | ||
3 | |||
4 | DEPENDS += "gmp-native" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-4.8.bb new file mode 100644 index 0000000..d9a99ec --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-4.8.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require gcc-linaro-4.8.inc | ||
3 | require recipes-devtools/gcc/libgcc-initial.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-4.9.bb new file mode 100644 index 0000000..987cc52 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc-initial_linaro-4.9.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require gcc-linaro-4.9.inc | ||
3 | require recipes-devtools/gcc/libgcc-initial.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/libgcc_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc_linaro-4.8.bb new file mode 100644 index 0000000..d37d511 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc_linaro-4.8.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require recipes-devtools/gcc/libgcc_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/libgcc_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc_linaro-4.9.bb new file mode 100644 index 0000000..540230d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/libgcc_linaro-4.9.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require recipes-devtools/gcc/libgcc_${BASEPV}.bb | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/libgfortran_linaro-4.8.bb b/meta-linaro-toolchain/recipes-devtools/gcc/libgfortran_linaro-4.8.bb new file mode 100644 index 0000000..4ec303b --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/libgfortran_linaro-4.8.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-linaro-common-4.8.inc | ||
2 | require gcc-linaro-4.8.inc | ||
3 | require recipes-devtools/gcc/libgfortran.inc | ||
4 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/libgfortran_linaro-4.9.bb b/meta-linaro-toolchain/recipes-devtools/gcc/libgfortran_linaro-4.9.bb new file mode 100644 index 0000000..181ef0a --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/libgfortran_linaro-4.9.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-linaro-common-4.9.inc | ||
2 | require gcc-linaro-4.9.inc | ||
3 | require recipes-devtools/gcc/libgfortran.inc | ||
4 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gdb/gdb-7.8/sim-install-6.6.patch b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-7.8/sim-install-6.6.patch new file mode 100644 index 0000000..f67c25d --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-7.8/sim-install-6.6.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | --- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000 | ||
4 | +++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100 | ||
5 | @@ -34,7 +34,7 @@ | ||
6 | |||
7 | datadir = @datadir@ | ||
8 | mandir = @mandir@ | ||
9 | -man1dir = $(mandir)/man1 | ||
10 | +man1dir = $(DESTDIR)$(mandir)/man1 | ||
11 | infodir = @infodir@ | ||
12 | includedir = @includedir@ | ||
13 | |||
14 | |||
diff --git a/meta-linaro-toolchain/recipes-devtools/gdb/gdb-cross-canadian_linaro-7.8.bb b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-cross-canadian_linaro-7.8.bb new file mode 100644 index 0000000..5c79fdd --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-cross-canadian_linaro-7.8.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require recipes-devtools/gdb/gdb-common.inc | ||
2 | require recipes-devtools/gdb/gdb-cross-canadian.inc | ||
3 | require gdb-${PV}.inc | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gdb/gdb-cross_linaro-7.8.bb b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-cross_linaro-7.8.bb new file mode 100644 index 0000000..b2003b4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-cross_linaro-7.8.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require recipes-devtools/gdb/gdb-cross.inc | ||
2 | require gdb-${PV}.inc | ||
3 | |||
4 | SRC_URI += "file://sim-install-6.6.patch" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gdb/gdb-linaro-7.8.inc b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-linaro-7.8.inc new file mode 100644 index 0000000..773fcea --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gdb/gdb-linaro-7.8.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | LICENSE="GPLv2 & GPLv3 & LGPLv2 & LGPLv3" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | ||
3 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
4 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
5 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" | ||
6 | |||
7 | |||
8 | MMYY = "14.09" | ||
9 | RELEASE = "20${MMYY}" | ||
10 | PR = "r${RELEASE}" | ||
11 | BINV = "7.8" | ||
12 | |||
13 | S = "${WORKDIR}/${BPN}-${PV}-${RELEASE}" | ||
14 | |||
15 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/gdb-${BINV}' ], d)}" | ||
16 | |||
17 | SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gdb-linaro/gdb-${PV}-${RELEASE}.tar.xz" | ||
18 | |||
19 | SRC_URI[md5sum] = "954e47e397de0b635ecdb5bb5d0f145f" | ||
20 | SRC_URI[sha256sum] = "fbbe96b8d0debf7c2d8c9a4a6c7ca0ba87d536e43289f81c4af56f95e5f7b5ea" | ||
diff --git a/meta-linaro-toolchain/recipes-devtools/gdb/gdb_linaro-7.8.bb b/meta-linaro-toolchain/recipes-devtools/gdb/gdb_linaro-7.8.bb new file mode 100644 index 0000000..3ce2de4 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gdb/gdb_linaro-7.8.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | require recipes-devtools/gdb/gdb.inc | ||
2 | require gdb-${PV}.inc | ||
3 | |||
4 | inherit python-dir | ||
5 | |||
6 | PACKAGECONFIG ??= "" | ||
7 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python" | ||
8 | |||
9 | do_configure_prepend() { | ||
10 | if [ -n "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then | ||
11 | cat > ${WORKDIR}/python << EOF | ||
12 | #!/bin/sh | ||
13 | case "\$2" in | ||
14 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;; | ||
15 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;; | ||
16 | --exec-prefix) echo "${exec_prefix}" ;; | ||
17 | *) exit 1 ;; | ||
18 | esac | ||
19 | exit 0 | ||
20 | EOF | ||
21 | chmod +x ${WORKDIR}/python | ||
22 | fi | ||
23 | } | ||